-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0919: Install BookStack - Documentation/Wiki Platform - on Linux
- Loading branch information
Showing
1 changed file
with
175 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>Install BookStack - Documentation/Wiki Platform - on Linux</title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<meta charset="UTF-8"> | ||
<meta name="keywords" content="Browser Based,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,BookStack,Debian,Homelab,KB,Knowledge Base,Linux,MariaDB,MySQL,PHP,PHP Based Application,Ubuntu,How To,Tutorial,i12bretro"> | ||
<meta name="author" content="i12bretro"> | ||
<meta name="description" content="Install BookStack - Documentation/Wiki Platform - on Linux"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta name="revised" content="04/20/2024 05:01:58 AM" /> | ||
<link rel="icon" type="image/x-icon" href="includes/favicon.ico"> | ||
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script> | ||
<script type="text/javascript" src="includes/js/steps.js"></script> | ||
<link href="css/steps.css" rel="stylesheet" type="text/css" /> | ||
</head> | ||
<body> | ||
<div id="gridContainer"> | ||
<div class="topMargin"></div> | ||
<div id="listName" class="topMargin"> | ||
<h1>Install BookStack - Documentation/Wiki Platform - on Linux</h1> | ||
</div> | ||
<div></div> | ||
<div id="content"> | ||
<h2>What is BookStack?</h2> | ||
|
||
<blockquote><em>BookStack is an opinionated wiki system that provides a pleasant and simple out-of-the-box experience. New users to an instance should find the experience intuitive and only basic word-processing skills should be required to get involved in creating content on BookStack. The platform should provide advanced power features to those that desire it but they should not interfere with the core simple user experience. -<a href="https://github.com/BookStackApp/BookStack" target="_blank">https://github.com/BookStackApp/BookStack</a></em></blockquote> | ||
|
||
<h2>Installation</h2> | ||
|
||
<ol> | ||
<li>Log into the Linux device</li> | ||
<li>Run the following commands in a terminal window: | ||
<div class="codeBlock"># update software respositories<br /> | ||
sudo apt update<br /> | ||
# install available software updates<br /> | ||
sudo apt upgrade -y<br /> | ||
# install prerequisites<br /> | ||
sudo apt install git openssl curl wget zip composer -y<br /> | ||
# install Apache HTTPD and MySQL<br /> | ||
sudo apt install apache2 mariadb-server mariadb-client -y<br /> | ||
# install PHP components<br /> | ||
sudo apt install php libapache2-mod-php php-curl php-tokenizer php-ldap php-cli php-json php-gd php-mbstring php-mysql php-xml php-zip php-bcmath -y<br /> | ||
# configure the MySQL database<br /> | ||
sudo su<br /> | ||
mysql_secure_installation</div> | ||
</li> | ||
<li>Press Enter to login as root</li> | ||
<li>Type Y and press Enter to set a root password, type the password twice to confirm</li> | ||
<li>Type Y and press Enter to remove anonymous users</li> | ||
<li>Type Y and press Enter to disallow root login remotely</li> | ||
<li>Type Y and press Enter to remove the test database</li> | ||
<li>Type Y and press Enter to reload privilege tables</li> | ||
<li>Run the following command to login into MySQL: | ||
<div class="codeBlock">mysql -u root -p</div> | ||
</li> | ||
<li>Authenticate with the root password set earlier</li> | ||
<li>Run the following commands to create the BookStack database and database user | ||
<div class="codeBlock">CREATE DATABASE bookstack;<br /> | ||
GRANT ALL ON bookstack.* to 'bookstack_rw'@'localhost' IDENTIFIED BY 'B00k$t@ck!';<br /> | ||
FLUSH PRIVILEGES;<br /> | ||
EXIT;<br /> | ||
exit</div> | ||
</li> | ||
<li>Continue with the following commands: | ||
<div class="codeBlock"># clone bookstack from github<br /> | ||
sudo git clone https://github.com/BookStackApp/BookStack.git --branch release --single-branch /var/www/bookstack<br /> | ||
# create a copy of the sample .env file<br /> | ||
sudo cp /var/www/bookstack/.env.example /var/www/bookstack/.env<br /> | ||
# edit the .env file<br /> | ||
sudo nano /var/www/bookstack/.env</div> | ||
</li> | ||
<li>Edit the following environment variables as needed | ||
<p>APP_ENV=production<br /> | ||
APP_DEBUG=false<br /> | ||
APP_KEY=SomethingSecure<br /> | ||
APP_URL=http://debian/bookstack<br /> | ||
APP_TIMEZONE='America/New_York'<br /> | ||
APP_LOCALE=en<br /> | ||
<br /> | ||
DB_CONNECTION=mysql<br /> | ||
DB_HOST=127.0.0.1<br /> | ||
DB_DATABASE=bookstack<br /> | ||
DB_USERNAME=bookstack_rw<br /> | ||
DB_PASSWORD=B00k$t@ck!<br /> | ||
<br /> | ||
MAIL_DRIVER=smtp<br /> | ||
MAIL_HOST=smtp.i12bretro.local<br /> | ||
MAIL_PORT=25<br /> | ||
MAIL_USERNAME=null<br /> | ||
MAIL_PASSWORD=null<br /> | ||
MAIL_ENCRYPTION=null<br /> | ||
MAIL_FROM_ADDR=bookstack@i12bretro.local<br /> | ||
MAIL_FROM_NAME='BookStack'<br /> | ||
MAIL_REPLYTO_ADDR=bookstack@i12bretro.local<br /> | ||
MAIL_REPLYTO_NAME='BookStack'<br /> | ||
MAIL_AUTO_EMBED_METHOD='attachment'</p> | ||
</li> | ||
<li>Press CTRL+O, Enter, CTRL+X to write the changes to .env</li> | ||
<li>Continue with the following commands: | ||
<div class="codeBlock"># set the owner of the bookstack directory<br /> | ||
sudo chown -R www-data:www-data /var/www/bookstack<br /> | ||
# setup composer working directory<br /> | ||
sudo mkdir /var/www/.composer<br /> | ||
sudo chown -R www-data:www-data /var/www/.composer<br /> | ||
cd /var/www/bookstack<br /> | ||
# install dependencies with composer<br /> | ||
sudo -u www-data composer install --no-dev --no-plugins<br /> | ||
# generate app key<br /> | ||
sudo php artisan key:generate --no-interaction --force<br /> | ||
# migrate the database<br /> | ||
sudo php artisan migrate --no-interaction --force<br /> | ||
# create bookstack apache configuration<br /> | ||
sudo nano /etc/apache2/sites-available/bookstack.conf</div> | ||
</li> | ||
<li>Paste the following configuration into bookstack.conf | ||
<p>Alias /bookstack "/var/www/bookstack/public"<br /> | ||
<Directory /var/www/bookstack/public></p> | ||
|
||
<p>Options Indexes FollowSymLinks<br /> | ||
AllowOverride None<br /> | ||
Require all granted<br /> | ||
<IfModule mod_rewrite.c><br /> | ||
<IfModule mod_negotiation.c><br /> | ||
Options -MultiViews -Indexes<br /> | ||
</IfModule></p> | ||
|
||
<p>RewriteEngine On</p> | ||
|
||
<p># Handle Authorization Header<br /> | ||
RewriteCond %{HTTP:Authorization} .<br /> | ||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]</p> | ||
|
||
<p># Redirect Trailing Slashes If Not A Folder...<br /> | ||
RewriteCond %{REQUEST_FILENAME} !-d<br /> | ||
RewriteCond %{REQUEST_URI} (.+)/$<br /> | ||
RewriteRule ^ %1 [L,R=301]</p> | ||
|
||
<p># Handle Front Controller...<br /> | ||
RewriteCond %{REQUEST_FILENAME} !-d<br /> | ||
RewriteCond %{REQUEST_FILENAME} !-f<br /> | ||
RewriteRule ^ index.php [L]<br /> | ||
</IfModule><br /> | ||
</Directory></p> | ||
</li> | ||
<li>Press CTRL+O, Enter, CTRL+X to write the changes to bookstack.conf</li> | ||
<li>Run the following command to enable the BookStack site | ||
<div class="codeBlock"># enable rewrite module<br /> | ||
sudo a2enmod rewrite<br /> | ||
# enable the bookstack site<br /> | ||
sudo a2ensite bookstack<br /> | ||
# restart the apache2 service<br /> | ||
sudo systemctl restart apache2</div> | ||
</li> | ||
</ol> | ||
|
||
<h2>BookStack Web Installer</h2> | ||
|
||
<ol> | ||
<li>Open a web browser and navigate to http://DNSorIP/bookstack</li> | ||
<li>Login with the username admin@admin.com and the password password</li> | ||
<li>Click the user dropdown at the top right > My Account</li> | ||
<li>Update the user name and email address as needed > Click Save</li> | ||
<li>Select Access & Security from the left navigation menu</li> | ||
<li>Enter and confirm a new password > Click Update</li> | ||
<li>Click the user dropdown at the top right > Logout</li> | ||
<li>Log back in using the updated email address and password</li> | ||
<li>Welcome to BookStack</li> | ||
</ol> | ||
|
||
<p>Source: <a href="https://www.bookstackapp.com/docs/admin/installation/#manual" target="_blank">https://www.bookstackapp.com/docs/admin/installation/#manual</a></p> </div> | ||
</div> | ||
</body> | ||
</html> | ||
|