Prepare LAMP for Gila CMS in Ubuntu 18.04

Posted by Vasilis on September 14, 2018

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 mod on Apache

sudo a2enmod rewrite

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) 

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 https://github.com/GilaCMS/gila.git gila
sudo chown www-data -R gila

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