Вы находитесь на странице: 1из 7

How To Install Joomla CMS On

CentOS 7 With LAMP Support


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 reusing 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.
Its that simple.
When youre ready to install Joomla on CentOS 7, continue below to learn how.
Since Joomla depends on the LAMP stack, were going to install it.

MySQL isnt available in CentOS anymore, so were 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 phpmysql php-curl php-gd php-pear php-memcache php-pspell php-snmp php-xmlrpc

Next, youll 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 youre 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 youre done.

When youre 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-StableFull_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.

Setup the Database with the information you created previously.

Continue with the setup until youre done.


If you run into issues with Joomla installation that configuration.php file isnt
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.

Enjoy!

Вам также может понравиться