How to Install BookStack on Fedora Server Latest

This tutorial will guide you through the steps required to install BookStack on Fedora server latest. BookStack is an open-source platform used for organizing and storing information of any type.

Prerequisites

Before proceeding to install BookStack on Fedora server, make sure you have the following requirements ready:

Step 1: Update the System

The first step is to ensure the Fedora server's packages are up-to-date by running the following command:

sudo dnf update

Step 2: Install LAMP Stack

BookStack requires LAMP (Linux, Apache, MySQL, PHP) stack. Therefore, install the LAMP stack using the following command:

sudo dnf install httpd mariadb-server php php-common php-cli php-json php-mysqlnd php-gd php-xml php-mbstring php-zip

Step 3: Configure the Firewall

By default, the firewall on Fedora server is enabled. Therefore, open Port 80 for the Apache server use the following command:

sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --reload

Step 4: Configure the Database

After installing LAMP, set up the MariaDB database by running:

sudo systemctl enable mariadb
sudo systemctl start mariadb
sudo mysql_secure_installation

Step 5: Create a BookStack Database

Next, log in to the MariaDB database using the following command:

sudo mysql -u root -p

Then create a BookStack database:

CREATE DATABASE bookstack DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Create a new user and grant them access to the BookStack database:

GRANT ALL ON bookstack.* TO 'bookstack'@'localhost' IDENTIFIED BY '<yourpassword>';

Flush the privileges:

FLUSH PRIVILEGES;

Exit the MySQL console:

EXIT;

Step 6: Install BookStack

Download the latest version of BookStack from its official website:

wget https://github.com/BookStackApp/BookStack/releases/download/v21.08.2/BookStack-21.08.2.zip

Next, create a directory for BookStack:

sudo mkdir /var/www/bookstack

Unzip the downloaded zip file:

sudo unzip BookStack-21.08.2.zip -d /var/www/bookstack/

Copy the configuration files:

sudo cp /var/www/bookstack/.env.example /var/www/bookstack/.env

Next, edit the .env file using nano or any editor of your choice:

sudo nano /var/www/bookstack/.env

Set the database details created in step 5:

DB_DATABASE=bookstack
DB_USERNAME=bookstack
DB_PASSWORD=<yourpassword>

Set the Application URL and other settings:

APP_URL=http://<your_ip_or_domain>/bookstack

Step 7: Set Permissions

Finally, set the correct permissions for the web files:

sudo chown -R apache:apache /var/www/bookstack
sudo chmod -R 755 /var/www/bookstack

Step 8: Configure Apache

Create a new Apache virtual host configuration file for BookStack:

sudo nano /etc/httpd/conf.d/bookstack.conf

Paste in the following configuration:

<VirtualHost *:80>
        DocumentRoot /var/www/bookstack/public

        <Directory /var/www/bookstack/public>
            AllowOverride All
            Order allow,deny
            Allow from all
            Require all granted
        </Directory>
</VirtualHost>

Save and close the file.

Step 9: Restart the Services

Restart Apache and MariaDB to apply the changes:

sudo systemctl restart httpd
sudo systemctl restart mariadb

Step 10: Complete the Installation

Open your favorite web browser and navigate to your Fedora server's IP address or domain name:

http://<your_ip_or_domain>/bookstack

The installer page will open where you need to fill in the required information. Then select "Install" to begin the installation.

After successfully installing BookStack, log in to your account using the admin username and password you set up during the installation process.

Congratulations! You have successfully installed BookStack on your Fedora server.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!