This brief tutorial shows you how to install Joomla CMS on CentOS 7 with LAMP (Linux, Apache, MariaDB & PHP) support. Joomla is a free content management system (CMS) which allows millions of users and webmasters to publish beautiful and power webpages online.

When it comes to CMSs, there are WordPress, Drupal and Joomla. These three powerful CMSs run more that half of all websites on the internet today. They make building and managing website easy using templates.

CMSs act like your local library. They organize your content for you. In the old days, webmasters and website builders used to create one webpage at a time. Looking back now you can see how that would be difficult to do today. Creating a single page at time would be very difficult with out fast pace internet today.

Just imagine all the pages on the blog being created one at a time with each HTML/CSS/JavaScript code.  It would take years to complete. CMSs help resolve this madness by creating templates that can be used to create each new page re-using the same HTML/CSS/JavaScript codes.

CMSs also act as library by storing and retrieving content when needed. Each page, image, video and other data are stored with information in databases. Retrieving these content is just a matter of looking in the database for references to them.

It’s that simple.

When you’re ready to install Joomla on CentOS 7, continue below to learn how. Since Joomla depends on the LAMP stack, we’re going to install it.

MySQL isn’t available in CentOS anymore, so we’re going to be using MariaDB database instead of MySQL. MariaDB server is a drop-in replacement for MySQL database server.

To install the LAMP stack in CentOS that works with Joomla, copy and paste the commands below.

sudo yum update && sudo yum install httpd mariadb-server mariadb php php-mysql php-curl php-gd php-pear php-memcache php-pspell php-snmp php-xmlrpc

 

Next, you’ll need to configure a database and a database user for Joomla to use. To do that, run the commands below to start the database server.

sudo systemctl start mariadb.service

 

Then run the commands below to configure the database server.

sudo mysql_secure_installation

 

Next, choose Yes for the rest of the prompts until you’re done.

  • Enter current password for root (enter for none): press Enter
  • Set root password? Y
    • New password: Type new root password
    • Re-enter new password: Confirm the password
  • Remove anonymous users? Y
  • Disallow root login remotely? Y
  • Remove test database and access to it? Y
  • Reload privilege tables now? Y

 

After that, run the commands below to sign on to the database

mysql -u root -p

 

Then run the SQL statement below to create a database called JoomlaDB

CREATE DATABASE JoomlaDB;

 

Next, create a database user called JoomlaDBUser

CREATE USER JoomlaDBUser@localhost IDENTIFIED BY 'password_here';

 

Finally, grant all privileges to JoomlaUser for JoomlaDB

GRANT ALL ON JoomlaDB.* TO JoomlaDBUser@localhost;

 

Exit and you’re done.

 

When  you’re done with creating the database, go and download Joomla content. To do that, run the commands below.

cd /tmp/ && wget http://joomlacode.org/gf/download/frsrelease/19665/160049/Joomla_3.3.3-Stable-Full_Package.zip

 

Then run the commands below to unzip or extract the downloaded content

sudo unzip -q Joomla*.zip -d /var/www/html

 

Next, change the ownership of the directory to Apache2

sudo chown -R apache:apache /var/www/html

 

Then change the permissions on the directory by running the commands below.

sudo chmod -R 755 /var/www/html

 

Restart Apache2

sudo systemctl restart httpd.service

 

To access the site, you must enable HTTP traffic remotely since all traffic except SSH are blocked by default on CentOS. To open the post, run the commands below.

sudo firewall-cmd --permanent --zone=public --add-service=http

 

Reload the firewall.

sudo firewall-cmd --reload

 

Now try to access the page and you should see Joomla setup page.

 

Joomla centos 7 setup

 

 

Setup the Database with the information you created previously.

 

Joomla centos 7 configuration

 

Continue with the setup until you’re done.

If you run into issues with Joomla installation that configuration.php file isn’t writable, run the commands below to fix that.

chcon -R -t httpd_sys_rw_content_t /var/www/html/

 

Restart Apache2 again for the changes to apply.

 

joomla installation on centos 7

 

Enjoy!