How to install Joomla on CentOS 7

Try it in our public cloud & Get $5 Credit
CLAIM NOW

Joomla is an easy to use content management system (CMS) that can ease the process of running a website or blog. Joomla is the second most used CMS on the web, right behind WordPress in popularity. It has the shortest average delay between updates out of the three major CMS platforms (WordPress, Joomla and Drupal), making it one of the most secure choices for hosting a website.

Written in PHP, Joomla runs on a LAMP stack and is extensible using the thousands of free extensions available online. The code is open-source and licensed under the GNU General Public License.

Getting Started

To complete this guide, you will need the following:
• 1 Node (Cloud Server or Dedicated Server) running CentOS 7.
• All commands should be run as the root user
• A LAMP stack with Apache, PHP and MySql

Tutorial

Joomla needs certain PHP modules to be installed. You can find these in the EPEL repository. Add the EPEL repository to your system if you don’t already have it and install the following modules.

yum -y install epel-release
yum install -y php-mysql php-curl php-gd php-pear php-memcache php-pspell php-snmp php-xmlrpc php-mcrypt

Next, create a database and user that your CMS will use to store your website data.

mysql -u root -p

create database joomla;
create user joomlauser@localhost IDENTIFIED BY 'joomlapassword';
GRANT all ON joomla.* TO joomlauser@localhost;
flush privileges;
exit

Now you can download the CMS. Make sure to unzip it into the Document root directory.

wget https://github.com/joomla/joomla-cms/releases/download/3.6.0/Joomla_3.6.0-Stable-Full_Package.zip
unzip -q Joomla*.zip -d /var/www/html

Change the permissions of the Document root directory in order that Apache, and thereby your web users, can access it.

chown -R apache:apache /var/www/html
chmod -R 755 /var/www/html
chcon -R -t httpd_sys_rw_content_t /var/www/html/

In order for Apache to recognize the new modules and permissions, you will have to restart its daemon.

systemctl restart httpd.service

In order to complete the setup for your CMS’ installation, visit the following address in a web browser:

http://your_ip/installation/

This online setup is where you can change your site name and description. You can also set the admin username, password and contact email here.

When installation is complete, for security reasons you must remove the installation directory.

cd /var/www/html/
rm -rf installation/

Conclusion

Now that Joomla is installed, be sure to keep current with the latest security updates as they are released. Whatever kind of site you decide to host, enjoy the easy moderation and versatile extensibility that comes with choosing Joomla as your CMS solution. If this guide was helpful to you, kindly share it with others who may also be interested.