How to Install Joomla on Ubuntu 18.04
When it comes to creating web sites, one of many best methods to have your web site up and operating is utilizing a CMS (content material administration system) that often comes with bundled PHP code and all themes and plugins you want.
Apart from PhrasePress, the opposite fashionable CMS is Joomla. Joomla is a free and open-source CMS that’s constructed on PHP and shops its knowledge on an SQL based mostly database engine on the backend.
In this text, you’ll learn the way to set up Joomla on Ubuntu 18.04 and newer Ubuntu releases.
Step 1: Update Ubuntu System Packages
It’s at all times a fantastic concept to replace system packages and repositories earlier than anything. So replace & improve your system by operating.
$ sudo apt replace -y && sudo apt improve -y
Step 2: Install Apache and PHP 7.2 in Ubuntu
Joomla is written on PHP and shops knowledge in MySQL on the back-end. Further, customers will entry any Joomla based mostly web site by way of a browser and for that motive, we want to set up an Apache net server that may serve Joomla pages.
To set up Apache and PHP ( we’re going to use PHP 7.2) execute the instructions beneath.
$ sudo apt set up apache2 libapache2-mod-php7.2 openssl php-imagick php7.2-common php7.2-curl php7.2-gd php7.2-imap php7.2-intl php7.2-json php7.2-ldap php7.2-mbstring php7.2-mysql php7.2-pgsql php-smbclient php-ssh2 php7.2-sqlite3 php7.2-xml php7.2-zip
With the set up full, you’ll be able to confirm the model of Apache put in by operating the dpkg command.
$ sudo dpkg -l apache
Now begin and allow the Apache webserver.
$ sudo systemctl begin apache2 $ sudo systemctl allow apache2
To verify that Apache is up and operating, run the command:
$ sudo systemctl standing apache2
Now head over to your browser and kind in your server’s IP tackle within the URL bar as proven:
You ought to get a webpage beneath exhibiting that Apache is put in and operating.
To verify if PHP is put in execute the command.
$ php -v
Step three: Install MariaDB in Ubuntu
Since Joomla would require a database on the backend to retailer its knowledge, we want to set up a relational database server. For this information, we’ll set up the MariaDB server which is a fork of MySQL. It’s a free and open-source database engine that packs with improved options and performance.
To set up MariaDB execute the command:
$ sudo apt set up mariadb-server
Since MariaDB isn’t secured by default, that leaves it weak to potential breaches. As a precaution, we’re going to safe the database engine
To obtain this, subject the command:
$ sudo mysql_secure_installation
Hit ENTER when prompted for the basis password and press
‘Y’ to set the basis password.
For the rest of the part, simply sort
‘Y’ and hit ENTER to set it to the advisable settings that may fortify its safety.
We have lastly secured our database engine.
Step four: Create a Joomla Database
As mentioned earlier, Joomla shops its knowledge on a backend SQL server, on this case, MariaDB. So we’re going to create a database to retailer its information.
First, we’re going to login to MariaDB utilizing the command:
$ sudo mysql -u root -p
To create the database, database person and grant privileges to the database person, run the instructions beneath.
MariaDB [(none)]> CREATE DATABASE joomla_db; MariaDB [(none)]> GRANT ALL ON joomla_db.* TO ‘joomla_user’@’localhost’ IDENTIFIED BY ‘[email protected]’; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> EXIT;
Step 5: Download Joomla in Ubuntu
In this step, we’re going to obtain the set up file from Joomla’s official web site. At the time of writing, the newest model is Joomla three.9.16. To obtain the set up package deal, execute the command beneath:
$ sudo wget https://downloads.joomla.org/cms/joomla3/3-9-16/Joomla_3-9-16-Stable-Full_Package.zip
Once the obtain is full. We want to unzip this to the webroot listing. So let’s make the listing and name it ‘Joomla’. You may give it no matter identify you would like.
$ sudo mkdir /var/www/html/joomla
Next, unzip the zipped Joomla file to the simply created ‘Joomla’ listing.
$ sudo unzip Joomla_3.19-16-Stable-Full_package.zip -d /var/www/html/joomla
Once finished, set the listing possession of the listing to Apache person and alter the permissions as indicated beneath:
$ sudo chown -R www-data:www-data /var/www/html/joomla $ sudo chmod -R 755 /var/www/html/joomla
For the adjustments to come into impact, restart the Apache webserver.
$ sudo systemctl restart apache2
Step 6: Configure Apache for Joomla
We are going to configure the Apache webserver to server Joomla webpages. For this to occur, we’ll create a digital host’s information for Joomla and name it Joomla.conf.
$ sudo vim /and so on/apache2/sites-available/joomla.conf
Paste the configuration beneath into the file and save.
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/joomla/ ServerName instance.com ServerAlias www.instance.com ErrorLog $APACHE_LOG_DIR/error.log CustomizedLog $APACHE_LOG_DIR/entry.log mixed <Directory /var/www/html/joomla/> Options FollowSymlinks AllowOverride All Require all granted </Directory> </VirtualHost>
Next, allow the digital hosts’ file.
$ sudo a2ensite joomla.conf $ sudo a2enmod rewrite
Then restart the Apache webserver service for the adjustments to come into impact.
$ sudo systemctl restart apache2
Step 7: Finalizing the Joomla Installation in Ubuntu
With all of the configurations in place, the one step remaining is to arrange Joomla by way of an online browser. So launch your browser and browse your server’s URL as proven
The webpage beneath can be displayed. Fill within the required particulars similar to Site identify, Email tackle, username and password and click on on the ‘Next’ button.
In the subsequent part, fill out the database particulars similar to database sort (Select MySQLI), database person, database identify, and database password. Then click on ‘Next’.
The following web page supplies an outline of all of the settings and permits you to carry out a pre-installation test.
Scroll down to the ‘Pre-installation Check’ and ‘Recommended settings’ sections and make sure that every one the required packages are put in and the settings are right.
Then click on the ‘Install’ button. The arrange of Joomla will start as proven.
When full, you’re going to get the notification beneath that Joomla has been put in.
As a safety precaution, the installer would require you to delete the set up folder earlier than continuing to log in, So scroll down and click on on the ‘Remove set up folder’ button proven beneath.
To log in, click on on the ‘Administrator’ button which can direct you to the web page beneath.
Provide your username and password and click on on the ‘Log In’ button. This ushers you to the Joomla dashboard proven beneath.
You can now create your weblog and use numerous plugins and settings to enhance its look. We have lastly wound up the set up of Joomla on Ubuntu 18.04.