Prepare LAMP for Gila CMS in Ubuntu 18.04

March 23, 2021

Install Apache server

sudo apt install apache2

Install Maria DB

sudo apt install mariadb-server

Install PHP and the required modules

sudo apt install php php-zip php-mysqli php-gd php-mbstring

Activate rewrite, headers and deflate(gzip) mod on Apache

sudo a2enmod rewrite headers deflate

To use .htaccess files edit the default VirtualHost with

sudo nano /etc/apache2/sites-available/000-default.conf

and add the following lines right after DocumentRoot /var/www/html 

<Directory "/var/www/html">
    AllowOverride All

Save the file and restart Apache serve

 sudo service apache2 restart

Create a database in Maria DB (change dbname,username,password) from command line:

sudo mysql
MariaDB [(none)]> create schema dbname;
MariaDB [(none)]> grant all privileges on dbname.* to username identified by 'password';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;

Now you can download Gila CMS and install it

Clone Gila CMS from repository and give the ownership to the server user (www-data)

cd /var/www/html
git clone gila
sudo chown www-data -R gila

localhost/gila now will send to to the installation page.