HugeServer Knowledgebase

How to install Joomla 3.8 with LAMP (Apache 2, MariaDB 10.2, PHP 7.0) on Ubuntu 16.04

Introduction

Joomla is an awesome content management system (CMS), which enables you to build websites and powerful online applications. Many aspects, including its ease-of-use and extensibility, have made Joomla one of the most popular website builder available. Best of all, Joomla is an open source solution that is freely available to everyone.




Requirments

In this tutorial we are going to install the following softwares:

We are assuming that you have root permission, otherwise, you may start commands with “sudo”.

Install Apache

You can easily install Apache from the official repository with the command below:

apt-get install apache2

After installation execute the following commands to start your Apache service and make it run at startup;

systemctl start apache2
systemctl enable apache2

Install MariaDB 10.2 (Latest)

At the time of the writing, 10.2 is the latest stable version of MariaDB.
First of all, you need to install the Software properties package:

apt-get install software-properties-common

Import the signing key with the following command:

apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8

Now you can add the MariaDB repository with the command below:

add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.utexas.edu/mariadb/repo/10.2/ubuntu xenial main'

Install MariaDB-Server package:

apt-get install mariadb-server

And after the installation, don’t forget to start and enable the service:

systemctl start mariadb
systemctl enable mariadb

Install PHP 7.0

PHP 7.0 is provided by the Ubuntu official repository, So you can download PHP and the needed extensions easily using “apt”:

 apt-get install php php-common php-mbstring php-mcrypt php-mysql php-xml libapache2-mod-php

Creating Database

First of all, we need to do some initial configuration for MariaDB.
Run the Mysql installer script with the following command:

mysql_secure_installation

Set a password for the “root” user and answer all other question with “y”
Login to root user with the following command:

mysql -u root -p

Now we can create our database with the command below (Make sure to replace the red parts with your preferred values):

create database HS;
grant all privileges on *.* to 'username'@'localhost' identified by 'password';
flush privileges;

Download and install Joomla

We are going to download Joomla using WGET:

wget https://downloads.joomla.org/cms/joomla3/3-8-1/joomla_3-8-1-stable-full_package-zip?format=zip

Now you have downloaded the Joomla source as a “zip” file, you have to unzip it first:

apt-get install unzip

Now you can extract the zip file with the following command:

unzip joomla_3-8-1-stable-full_package-zip?format=zip

We have to set the Apache user as the owner of the whole Document root:

cd ..
chown -R www-data:www-data www/

Now you can open your browser and see your Domain or your public IP address through it, The first page your will see should be like below:


That’s it you can easily install Joomla through your web browser.
 
You can find more information and news on Joomla official website!

Was this tutorial helpful?

Thank you for your vote.Thank you for your vote.

Similar Posts

3 thoughts on “How to install Joomla 3.8 with LAMP (Apache 2, MariaDB 10.2, PHP 7.0) on Ubuntu 16.04”

  1. Following these steps fails at:
    systemctl start mariadb
    Failed to start mariadb.service: Unit mariadb.service not found.
    This is a fresh 16.04 LAMP installation, with apt updates and upgrades applied priot to starting this procedure. I suspect the mariadb-server install does something different now and your procedure needs to be updated.

  2. Hi,
    thanks for the instructions… bat, you did not give another installation step …
    I created MariaDB 10.3 and when I try to install Joomla 3.x, there is only option to choose MySQL or MySQLi. MariaDB 10.3 does not see.
    How to link my site to MariaDB??? Please help me.

Leave a Reply

Your email address will not be published. Required fields are marked *

*