CMS/BookStack: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
imported>Import Version 150 |
|||
| Zeile 2: | Zeile 2: | ||
---- | ---- | ||
==Entwicklung Server== | == Entwicklung Server == | ||
<pre>sudo apt-get install php-mysql</pre> | |||
=== Mysql Datenbank Einrichten === | |||
<pre>sudo mysql | |||
<pre> | |||
sudo mysql | |||
CREATE DATABASE bookstack CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | CREATE DATABASE bookstack CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
CREATE USER 'thorsten'@'localhost' IDENTIFIED BY 'DEIN_STARKES_PASSWORT'; | CREATE USER 'thorsten'@'localhost' IDENTIFIED BY 'DEIN_STARKES_PASSWORT'; | ||
GRANT ALL PRIVILEGES ON bookstack.* TO 'thorsten'@'localhost'; | GRANT ALL PRIVILEGES ON bookstack.* TO 'thorsten'@'localhost'; | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES;</pre> | ||
</pre> | === BookStack herunterladen === | ||
<pre>sudo git clone https://source.bookstackapp.com/bookstack.git --branch release --single-branch bookstack | |||
<pre> | |||
sudo git clone https://source.bookstackapp.com/bookstack.git --branch release --single-branch bookstack | |||
cd bookstack | cd bookstack | ||
sudo composer install --no-dev | sudo composer install --no-dev | ||
sudo cp .env.example .env | sudo cp .env.example .env</pre> | ||
</pre> | === Konfiguration von BookStack === | ||
===Konfiguration von BookStack=== | |||
<pre> | <pre>sudo nano .env</pre> | ||
sudo nano .env | === Dateiberechtigungen setzen === | ||
</pre> | |||
<pre>sudo chmod 777 -R storage | |||
<pre> | |||
sudo chmod 777 -R storage | |||
sudo chmod 777 -R bootstrap/cache | sudo chmod 777 -R bootstrap/cache | ||
sudo chmod 777 -R public/uploads | sudo chmod 777 -R public/uploads | ||
sudo chown -R www-data:www-data storage bootstrap/cache | sudo chown -R www-data:www-data storage bootstrap/cache</pre> | ||
</pre> | === Artisan Nutzen === | ||
===Artisan Nutzen=== | |||
===Nginx Einstellung=== | <pre>php artisan key:generate --force --no-interaction | ||
<pre> | php artisan migrate --force --no-interaction</pre> | ||
sudo nano /etc/nginx/conf.d/bookstack.conf | === Nginx Einstellung === | ||
</pre> | |||
<pre>sudo nano /etc/nginx/conf.d/bookstack.conf</pre> | |||
Geben Sie Folgendes in die Datei `/etc/nginx/conf.d/bookstack.conf` ein: | Geben Sie Folgendes in die Datei `/etc/nginx/conf.d/bookstack.conf` ein: | ||
<pre>server { | |||
<pre> | |||
server { | |||
listen 80; | listen 80; | ||
listen [::]:80; | listen [::]:80; | ||
| Zeile 68: | Zeile 53: | ||
fastcgi_pass unix:/run/php/php8.4-fpm.sock; | fastcgi_pass unix:/run/php/php8.4-fpm.sock; | ||
} | } | ||
} | }</pre> | ||
</pre> | == Datenbank Übertragen auf dem Server == | ||
=== Auf dem Server === | |||
===Auf dem Server=== | |||
<pre> | <pre>mysql -u root -p | ||
mysql -u root -p | |||
CREATE USER 'BENUTZERNAME'@'localhost' IDENTIFIED BY 'DEIN_STARKES_PASSWORT'; | CREATE USER 'BENUTZERNAME'@'localhost' IDENTIFIED BY 'DEIN_STARKES_PASSWORT'; | ||
CREATE DATABASE DATENBANKNAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | CREATE DATABASE DATENBANKNAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
GRANT PROCESS ON *.* TO 'BENUTZERNAME'@'localhost'; | GRANT PROCESS ON *.* TO 'BENUTZERNAME'@'localhost'; | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES;</pre> | ||
</pre> | === Auf dem Entwicklungsserver === | ||
===Auf dem Entwicklungsserver=== | |||
<pre> | <pre>mysqldump -u BENUTZERNAME -p DATENBANKNAME > backup.sql | ||
mysqldump -u BENUTZERNAME -p DATENBANKNAME | |||
scp backup.sql thorsten@Servername:/home/thorsten/backup.sql | scp backup.sql thorsten@Servername:/home/thorsten/backup.sql | ||
rsync -avz --exclude '.env' --exclude 'vendor/' /var/www/bookstack/ user@prod:/var/www/bookstack/ | rsync -avz --exclude '.env' --exclude 'vendor/' /var/www/bookstack/ user@prod:/var/www/bookstack/ | ||
composer install | composer install | ||
sudo cp .env.example .env | sudo cp .env.example .env | ||
sudo nano .env | sudo nano .env</pre> | ||
</pre> | === Auf dem Server === | ||
===Auf dem Server=== | |||
</pre> | <pre>mysql -u thorsten -p DATENBANKNAME < backup.sql</pre> | ||
=== Nginx Einstellung === | |||
<pre>sudo nano /etc/nginx/conf.d/bookstack.conf</pre> | |||
<pre> | |||
sudo nano /etc/nginx/conf.d/bookstack.conf | |||
</pre> | |||
Geben Sie Folgendes in die Datei `/etc/nginx/conf.d/bookstack.conf` ein: | Geben Sie Folgendes in die Datei `/etc/nginx/conf.d/bookstack.conf` ein: | ||
<pre>server { | |||
<pre> | |||
server { | |||
listen 443 ssl http2; | listen 443 ssl http2; | ||
listen [::]:443 ssl http2; | listen [::]:443 ssl http2; | ||
| Zeile 122: | Zeile 97: | ||
fastcgi_pass unix:/run/php/php8.3-fpm.sock; | fastcgi_pass unix:/run/php/php8.3-fpm.sock; | ||
} | } | ||
} | }</pre> | ||
</pre> | |||
---- | ---- | ||
''Hinweis: Diese Inhalte wurden mit Unterstützung von Künstlicher Intelligenz erstellt und redaktionell überprüft (Transparenzhinweis gemäß Art. 50 EU AI Act).'' | ''Hinweis: Diese Inhalte wurden mit Unterstützung von Künstlicher Intelligenz erstellt und redaktionell überprüft (Transparenzhinweis gemäß Art. 50 EU AI Act).'' | ||
Version vom 26. Januar 2026, 23:53 Uhr
Hinweis: Diese Inhalte wurden mit Unterstützung von Künstlicher Intelligenz erstellt und redaktionell überprüft (Transparenzhinweis gemäß Art. 50 EU AI Act).
Entwicklung Server
sudo apt-get install php-mysql
Mysql Datenbank Einrichten
sudo mysql CREATE DATABASE bookstack CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER 'thorsten'@'localhost' IDENTIFIED BY 'DEIN_STARKES_PASSWORT'; GRANT ALL PRIVILEGES ON bookstack.* TO 'thorsten'@'localhost'; FLUSH PRIVILEGES;
BookStack herunterladen
sudo git clone https://source.bookstackapp.com/bookstack.git --branch release --single-branch bookstack cd bookstack sudo composer install --no-dev sudo cp .env.example .env
Konfiguration von BookStack
sudo nano .env
Dateiberechtigungen setzen
sudo chmod 777 -R storage sudo chmod 777 -R bootstrap/cache sudo chmod 777 -R public/uploads sudo chown -R www-data:www-data storage bootstrap/cache
Artisan Nutzen
php artisan key:generate --force --no-interaction php artisan migrate --force --no-interaction
Nginx Einstellung
sudo nano /etc/nginx/conf.d/bookstack.conf
Geben Sie Folgendes in die Datei `/etc/nginx/conf.d/bookstack.conf` ein:
server {
listen 80;
listen [::]:80;
server_name bookstack.localhost;
root /var/www/bookstack/public;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
}
}
Datenbank Übertragen auf dem Server
Auf dem Server
mysql -u root -p CREATE USER 'BENUTZERNAME'@'localhost' IDENTIFIED BY 'DEIN_STARKES_PASSWORT'; CREATE DATABASE DATENBANKNAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; GRANT PROCESS ON *.* TO 'BENUTZERNAME'@'localhost'; FLUSH PRIVILEGES;
Auf dem Entwicklungsserver
mysqldump -u BENUTZERNAME -p DATENBANKNAME > backup.sql scp backup.sql thorsten@Servername:/home/thorsten/backup.sql rsync -avz --exclude '.env' --exclude 'vendor/' /var/www/bookstack/ user@prod:/var/www/bookstack/ composer install sudo cp .env.example .env sudo nano .env
Auf dem Server
mysql -u thorsten -p DATENBANKNAME < backup.sql
Nginx Einstellung
sudo nano /etc/nginx/conf.d/bookstack.conf
Geben Sie Folgendes in die Datei `/etc/nginx/conf.d/bookstack.conf` ein:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name bookstack.ahrensburg.city
root /var/www/bookstack/public;
index index.php index.html;
ssl_certificate /etc/letsencrypt/live/ahrensburg.city/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ahrensburg.city/privkey.pem;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
}
}
Hinweis: Diese Inhalte wurden mit Unterstützung von Künstlicher Intelligenz erstellt und redaktionell überprüft (Transparenzhinweis gemäß Art. 50 EU AI Act).