Manual install instructions for Debian & Ubuntu Linux
This installation process applies to all linux distributions with the “apt”-package manager.
This is includes: Debian, Ubuntu, Kubuntu, Pop-os, Tuxedo OS, Raspberry Pi OS etc..
Too long or too boring? Might wanna try the automatic install script for Debian & Ubuntu
Posadoble is a web application.
This means it needs a webserver (Apache) and a database (MySQL/MariaDB) to run.
1. Install webserver and database first
Update package manager
Open the terminal and update the package manager:
sudo apt update
sudo apt upgrade
Enter your password if necessary.
Press “y” and press enter when it asks if you are sure you want to update.
Install Apache
In the terminal, type:
sudo apt install apache2
Press “y” and press enter when it asks if you want to install
Check
Let’s test if the webserver is installed by navigating to http://localhost in your browser (like Chrome or Firefox).
Enable rewrite module
So we can make pretty urls that don’t end on .php or .html
sudo a2enmod rewrite
Write permissions
We need permissions to write in the web documents directory (/var/www/).
To do this, we change the owner of the web documents to the current user of the computer:
sudo chown -R $(whoami) /var/www
Edit envvars
Now the computer user owns the directory, Apache can’t write to this directory anymore.
Let’s fix that by letting Apache act as our current computer user.
(it would be safer to create a new user with less permissions, but this is a quick tutorial).
sudo nano /etc/apache2/envvars
This opens the file envvars in the text editor Nano.
Look for the lines:
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
change both “www-data” into the name of your computer user.
If your user is named “bert”, it will look like this:
export APACHE_RUN_USER=bert
export APACHE_RUN_GROUP=bert
Exit Nano with CTRL-X.
If it asks to save modified buffer (aka save file): press “y”.
If it asks the name of the file, just press enter.
Install PHP
Install PHP and its MariaDB extension (MariaDB was formerly known as: MySQL):
sudo apt install php libapache2-mod-php
sudo apt install php-mysql
Lets also install the PHP modules we need for Posadoble:
sudo apt install -y openssl php-mail php-bcmath php-curl php-mbstring php-mysql php-tokenizer php-xml php-zip php-intl php-exif php-gd
Restart Apache
Restart the webserver for the changes to take effect:
sudo service apache2 restart
Install MySQL/MariaDB
sudo apt install mariadb-server
To be sure update the package manager again, otherwise the next command might not run.
sudo apt update
sudo apt upgrade
Out of the box mysql is installed with the default user: root with no password.
This is extremely insecure, because everyone and his dog knows this user and password combination.
There is a little tool to fix this security issue:
sudo mariadb-secure-installation
The tool asks a couple of questions:
- Current password for root:
just hit enter, because there is no password yet - Switch to unix_socket authentication? no
Because then you cant connect with windows to mysql - Change root password? yes
- New password
Enter a new password - Re-enter password
Repeat the password you just typed
- New password
- Remove anonymous users? yes
- Disallow root login remotely? yes
The database server and the webserver are installed on the same computer,
it doesn’t make sense that other computers can connect to the database. - remove test database? yes
- reload privilege tables? yes
To make the database extra secure, it is wise to create a new user with another password.
This will be the user that we use for Posadoble.
Make sure that this user has only access to one database: the database of Posadoble.
For the sake of a quick tutorial, I’ll skip this.
2. Install Posadoble
Delete index.html
Remove the example document index.html file from /var/www/html/index.html
because it might interfere with Posadoble.
rm /var/www/html/index.html
Download
Before we can download, make sure the program “wget” and “unzip” are installed:
sudo apt install wget
sudo apt install unzip
Now download the software:
wget https://github.com/grotebozewolfgromt/cms5/archive/refs/heads/main.zip --quiet --continue --show-progress --output-document /home/$(whoami)/Downloads/posadoble.zip
Extract the zip archive in your Downloads directory:
unzip /home/$(whoami)/Downloads/posadoble.zip -d /home/$(whoami)/Downloads/posadoble
Move the public directory into the public webserver directory (and remove empty left-over directory)
mv /home/$(whoami)/Downloads/posadoble/cms5-main/public/* /var/www/html
rm -r /home/$(whoami)/Downloads/posadoble/cms5-main/public
Move the rest of the files into the private webserver directory:
mv /home/$(whoami)/Downloads/posadoble/cms5-main/* /var/www/
Clean up the download (optional)
rm /home/$(whoami)/Downloads/posadoble.zip
rm -r /home/$(whoami)/Downloads/posadoble
Start Installer
In your browser, type in the address bar:
http://localhost/install/index.php
(you can also click the link above, it will open in a new tab)
- Choose “install” and click “next”
- Check the “I Agree box” and click “next”
Pre requisites checks
You will probably get a couple of errors in the pre-requisites screen, if not, congratulations, skip this step by clicking “next”.
mod_rewrite
Posadoble needs this to make pretty urls in the browser bar.
We enabled mod_rewrite before, so this shouldn’t be a problem.
When you get an error in the installer, you might have missed it earlier:
sudo a2enmod rewrite
Restart the webserver for the change to take effect:
sudo service apache2 restart
url rewriting
If you get an error here,
open the /etc/apache2/apache2.conf file:
sudo nano /etc/apache2/apache2.conf
In the /etc/apache2/apache2.conf file,
look for the following lines that start with “<Directory /var/www/>”:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
“AllowOverride None” should read “AllowOverride All“, so:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
CTRL-X out of Nano, when it asks to save: yes.
Restart the webserver for the change to take effect:
sudo service apache2 restart
Re-run checks
You can see if everything works by click on the “run checks again” link on the bottom of the page of the installer.
Everything should be good to go now!
Next, next, next
Just follow the guided instructions in the installer and click the “next” button on very screen.
Installation report
The last screen is the installation report.
Please write down (or copy or print) all the information of the installation report for your own administration.
Login
In the installation report you’ll find a button “login”, this takes you to the login screen of Posadoble.
Have fun!