Skip to main content

Book Stack

ID 111
Name BookStack
OS Ubuntu 20.04.3 LTS
Root Disk 20 G
RAM 2 G
Cores 2
Netzwerk 192.168.1.233

Obligatorisches Update

apt update && apt upgrade -y

Installation (via script)

wget https://raw.githubusercontent.com/BookStackApp/devops/main/scripts/installation-ubuntu-22.04.sh
chmod a+x installation-ubuntu-22.04.sh
sudo ./installation-ubuntu-22.04.sh

Udates

Diese Befehle sind wichtig

# Um in das Verzeichnis zu wechseln
cd /var/www/bookstack
# Überprüfung von Updates
git pull origin release
# Installation von Updates
composer install --no-dev
# Migration der Datenbank
php artisan migrate

Und dann kann man noch den Cache löschen

cd /var/www/bookstack    #Nicht notwendig wenn man schon im Verzeichnis ist.
php artisan cache:clear
php artisan config:clear
php artisan view:clear

Quelle: https://www.technik22.de/d/543-bookstack-ubuntu-2204-ct-faxen-dicke/7

Unüberwachte Security-Updates

apt-get install unattended-upgrades apt-listchanges
sudo dpkg-reconfigure -plow unattended-upgrades

Updating PHP


Currently the minimum version of PHP required by BookStack is PHP 8.2. You’ll need to update PHP if using a version lower than 8.2. You can usually check your installed PHP version by running php -v but in some cases your web-server could be running a different PHP version than what the command line reflects.

Updating to PHP 8.3 on most Debian & Ubuntu based systems using Apache

The commands below provide an example of how PHP can be updated to the PHP 8.3 on most Debian & Ubuntu based systems that are running PHP via Apache using mod-php.

Warnings:

    In most cases, especially if installed using our scripts and updating from a recent BookStack version, you won’t need to update PHP using the below as you’ll already be using PHP 8.1 or greater. If you run other applications on this machine, PHP applications in particular, then those may also be affected by these changes.
    sudo apt update
    sudo apt install software-properties-common
    sudo add-apt-repository ppa:ondrej/php
    sudo apt update
    sudo apt install -y php8.3 php8.3-curl php8.3-mbstring php8.3-ldap php8.3-xml php8.3-zip php8.3-gd php8.3-mysql libapache2-mod-php8.3
    sudo a2dismod php7.4 php8.0 php8.1 php8.2
    sudo a2enmod php8.3
    sudo systemctl restart apache2

    You may also need to update composer to be compatible with php8.3.


    Updating Composer

    You can check your current composer version by running composer -V. You can often update composer by running sudo composer self-update (Or you may be prompted to run sudo composer self-update --2). Typically it’s fine, and best practice, to be using the latest version of composer rather than a specific version near our minimum requirements.

    If you’re using a system-supplied composer package you may need to first uninstall that (eg. sudo apt remove composer) then follow the composer download documentation to get the latest version. Take notice of the sudo mv composer.phar /usr/local/bin/composer command shown in the documentation to install composer globally for easier usage.