A short summary of the complete setup from a fresh install to publish a Tiki website online using Virtualmin, Git and MariaDB.
I’ll explain how to setup your server, install Webmin and Virtuamin control panel, update MariaDB, install multiple version of PHP, setup and use Git, set an SSL certificat and setup a Tiki website online.
This quick tutorial is for intermediate IT Admin or fullstack developper. To follow the instruction, you need to know how use the shell, have root access and a minimum of knowledge about servers, mysql and hosting... or be adventurous. Not joking, today you can setup quickly a free instance on Amazon or Google Cloud and yes, try, create and terminate instance for 0 cost (use tier free option). You just need time and to be ready to fail and to learn.
Anyway, what you don’t want to do is to play on live data without backup or without knowing what to do.
Don’t risk catastrophe, you can always ask me to do it for you or search in the Tiki Consultants list if you need professional job done by... Specialist.
Not everybody will need this but as I used an AWS AMI Debian10 package I needed it so it may be useful for others in similar case. (default ssh user is admin)
sudo -i passwd
For Webmin to work properly, you need to configure the hostname and FQDN on the server itself by editing the /etc/hostname and /etc/hosts files.
It should display your hostname mostly your domain name like "mydomain" (without http or .com)
(by default Amazon set the internal IP instance address and later on Virtualmin won’t like it)
You can change this and set it for your host name (just the name without http or .com)
sudo nano /etc/hostname
You need to check add your host here too:
sudo nano /etc/hosts
Insert a new line with
127.0.1.1 your_hostname.your_domain.com your_hostname
Reboot and recheck (sudo reboot)
Log onto your server and first update/upgrade it with the following commands:
sudo apt update sudo apt upgrade
sudo apt install mariadb-server sudo mysql_secure_installation sudo systemctl status mariadb
Download Virtualmin using the below script. It is basically a shell script that will handle rest of the installation once executed.
Then run it
wget https://software.virtualmin.com/gpl/scripts/install.sh sudo /bin/sh ./install.sh
You have now to set your Webmin password (don’t use the letter & 😌).
sudo /usr/share/webmin/changepass.pl /etc/webmin root yourpassword
sudo systemctl restart webmin
You will now have access to your control panel if the port 10000 is open else, you may need to open the port it on the server. Because by default the Virtualmin will listen to the port Virtualmin. You only have to open this port if all the incoming requests on your server are blocked by default. (this is done using the security group on AWS)
Use https://your_server_domain:10000 (you can use your server IP too)
Once you are in , follow Virtualmin Post installation wizard.
It is pretty straightforward and everything is done to guide you.
Debian 10 come by default with 7.0 and installing MariaDB will add PHP7.4. As I wanted to keep PHP7.2 for a Tiki 21 I added it.
I enabled the sury.org repository and update the package list:
apt install apt-transport-https lsb-release ca-certificates wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list apt update
From here you can install any PHP package (change version number for what you need) and it will be accessible for your PHP version configuration in Virtualmin
sudo apt-get install php7.2 php7.2-cgi php7.2-cli php7.2-fpm php7.2-mysql
sudo apt-get install php7.2 php7.2-cgi php7.2-cli php7.2-fpm php7.2-mysql php7.2-xml php7.2-gd php7.2-intl php7.2-xsl php7.2-curl php7.2-zip php7.2-mbstring
Once I completed the installation of the second PHP I recheck the Virtualmin configuration it by logging into Virtualmin, and clicking System Settings -> Re-Check Config
You can configure which one is the default PHP version used on new Virtual Servers. The default is to use the newest available. You can change that default in System Settings -> Server Templates -> Default -> PHP Options. To set your host or domain PHP version go to Virtualmin -> Server configuration -> PHP version and on that screen you can set the PHP version to useversion.
Install and check git is running
sudo apt install git git --version
Navigate into your html directory. If you don’t know where it is located on your new server on Virtualmin check the Virtual Server Summary.
There, enter the git clone command. In my case I needed Tiki branch (version) 21.x without previous history (depth=1)
git clone --depth=1 --branch=21.x https://gitlab.com/tikiwiki/tiki.git .