How to Install Joomla 3.5.1 Using LAMP in Linux

To Install Joomla 3.5.1 Using LAMP on RHEL, CentOS & Fedora

Joomla is an open source CMS tool which helps to build dynamic website and manage online applications easily. It also publish and manage your website contents like pictures, articles, video on the website. Installation process of Joomla 3.5.1 on RHEL, CentOS and Fedora using LAMP is discussed in this article.

Requirements

  • Apache
  • MySQL/MariaDB
  • PHP

LAMP

It is a free source web development software stack, it contains Linux as the OS, Apache as the Web Server, MySQL as RDBMS and PHP as the object oriented scripting language.

Here we use hostname as " www.linuxhelp1.com" with the IP address " 192.168.5.64" .

[root@linuxhelp1 ~]# ip a
1: lo: < LOOPBACK,UP,LOWER_UP>  mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eno16777736: < BROADCAST,MULTICAST,UP,LOWER_UP>  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:c4:58:26 brd ff:ff:ff:ff:ff:ff
    inet 192.168.5.64/24 brd 192.168.5.255 scope global eno16777736
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fec4:5826/64 scope link 
       valid_lft forever preferred_lft forever
[root@linuxhelp1 ~]# hostname -f
www.linuxhelp1.com

To Download Joomla 3.5.1

Use " wget" command to download the latest source tarball.

[root@linuxhelp1 ~]# wget https://github.com/joomla/joomla-cms/releases/download/3.5.1/Joomla_3.5.1-Stable-Full_Package.zip
--2016-06-02 14:55:29--  https://github.com/joomla/joomla-cms/releases/download/3.5.1/Joomla_3.5.1-Stable-Full_Package.zip
Resolving github.com (github.com)... 192.30.252.122
Connecting to github.com (github.com)|192.30.252.122|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/2464908/c2a9ea34-fb82-11e5-9534-701271ce5d26.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256& X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160602%2Fus-east-
.
.
.
Connecting to github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)|54.231.13.73|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11806513 (11M) [application/octet-stream]
Saving to: ‘ Joomla_3.5.1-Stable-Full_Package.zip.’ 

100%[================================================================================> ] 11,806,513  16.9KB/s   in 12m 49s

2016-06-02 15:08:23 (15.0 KB/s) - ‘ Joomla_3.5.1-Stable-Full_Package.zip.1’  saved [11806513/11806513]

Create a directory called " joomla" in Apache DocumentRoot directory i.e., /var/www/html/. Now copy the downloaded source files package to that directory and extract it .

[root@linuxhelp1 ~]# cd /var/www/html
[root@linuxhelp1 html]# mkdir joomla
[root@linuxhelp1 html]# cd 
[root@linuxhelp1 ~]# cp Joomla_3.5.1-Stable-Full_Package.zip /var/www/html/joomla/
[root@linuxhelp1 ~]# cd /var/www/html/joomla/
[root@linuxhelp1 joomla]# ls
Joomla_3.5.1-Stable-Full_Package.zip
[root@linuxhelp1 joomla]# unzip Joomla_3.5.1-Stable-Full_Package.zip 
Archive:  Joomla_3.5.1-Stable-Full_Package.zip
  inflating: LICENSE.txt             
  inflating: README.txt              
   creating: administrator/
.
.
.
  inflating: templates/system/index.php  
  inflating: templates/system/offline.php  
   creating: tmp/
  inflating: tmp/index.html          
  inflating: web.config.txt


If you extract the files into a folder named as " Joomla" , then your site will be accessed at yoursitename.com/Joomla.

To change the Ownership of Directory

Remove the source file and change ownership of directory with user and group as " Apache" recursively using the following command.

[root@linuxhelp1 joomla]# rm -rf Joomla_3.5.1-Stable-Full_Package.zip 
[root@linuxhelp1 joomla]# chown -R apache:apache /var/www/html/joomla/
[root@linuxhelp1 joomla]# ls -l
total 112
drwxr-xr-x. 10 apache apache  4096 Apr  6 02:47 administrator
drwxr-xr-x.  2 apache apache  4096 Apr  6 02:47 bin
drwxr-xr-x.  2 apache apache  4096 Apr  6 02:47 cache
.
.
.
drwxr-xr-x.  5 apache apache  4096 Apr  6 02:47 templates
drwxr-xr-x.  2 apache apache  4096 Apr  6 02:47 tmp
-rw-r--r--.  1 apache apache  1690 Apr  6 02:47 web.config.txt

Apache Server Configuration

If you are going to host only your Joomla website under Apache server, then create a separate host for your Joomla site.

Open the Apache configuration file with your editor

[root@linuxhelp1 ~]# vim /etc/httpd/conf/httpd.conf

And search the directive as follows and change it appropriate.

ServerName www.linuxhelp1.com:80


User and Group must be apache

Restart and enable the Apache service using the following command.

[root@linuxhelp1 ~]# systemctl restart httpd.service
[root@linuxhelp1 ~]# systemctl enable httpd.service

Verify the httpd is running and listening the request on port 80

[root@linuxhelp1 ~]# netstat -antp | grep httpd
tcp6       0      0 :::80                   :::*                    LISTEN      14665/httpd

To create Joomla Database

Login with root to MySQL interface and create the database.

[root@linuxhelp1 ~]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with   or g.
Your MariaDB connection id is 80
Server version: 5.5.47-MariaDB MariaDB Server

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type ' help '  or ' h'  for help. Type ' c'  to clear the current input statement.

MariaDB [(none)]>  create database joomla 
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]>  grant all on joomla.* to ' root' @' localhost'  identified by ' linuxc'   
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]>  flush privileges 
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]>  exit
Bye

To restart MySQL service and auto enable at system startup run the following command.

On CentOS/RHEL 6

# service mysqld restart
# chkconfig --level 35 mysqld on

On CentOS/RHEL 7

[root@linuxhelp1 ~]# systemctl restart mariadb.service
[root@linuxhelp1 ~]# systemctl enable mariadb.service

To Install and Configure Joomla

Open your browser and type http://192.168.5.64 which will open the following screen to configure Joomla.

Configuration of Database

Fill the details including database name, username and password which was set earlier in MySQL settings and hit " Next" .

FTP Configuration

Leave blank as we are not using FTP and hit " Next" .

To Install Sample Data

Click " Install" to start installing Joomla.



As shown in the above screenshot, if you receive any error saying that the configuration directory or file is not writable then you have to copy and paste the below configuration code to the " configuration.php" file in your site root folder.

< ?php
class JConfig {
        public $offline = ' 0'  
        public $offline_message = ' This site is down for maintenance.
 Please check back again soon.'  
        public $display_offline_message = ' 1'  
        public $offline_image = ' '  
        public $sitename = ' www.linuxhelp1.com'  
        public $editor = ' linuxhelp'  
        public $captcha = ' 0'  
        public $list_limit = ' 20'  
        public $access = ' 1'  
        public $debug = ' 0'  
        public $debug_lang = ' 0'  
        public $dbtype = ' mysqli'  
        public $host = ' localhost'  
        public $user = ' root'  
        public $password = ' linuxc'  
        public $db = ' joomla'  
        public $dbprefix = ' v3rlo_'  
        public $live_site = ' '  
        public $secret = ' lb1sYEgHg0qZmyb7'  
        public $gzip = ' 0'  
        public $error_reporting = ' default'  
        public $helpurl = ' https://help.joomla.org/proxy/index.php?option=com_help& keyref=Help{major}{minor}:{keyref}'  
        public $ftp_host = ' 127.0.0.1'  
        public $ftp_port = ' 21'  
        public $ftp_user = ' '  
        public $ftp_pass = ' '  
        public $ftp_root = ' '  
        public $ftp_enable = ' 0'  
        public $offset = ' UTC'  
        public $mailonline = ' 1'  
        public $mailer = ' mail'  
        public $mailfrom = ‘ info@gmail.com 
        public $fromname = ‘ www.linuxhelp1.com’  
        public $sendmail = ' /usr/sbin/sendmail'  
        public $smtpauth = ' 0'  
        public $smtpuser = ' '  
        public $smtppass = ' '  
        public $smtphost = ' localhost'  
        public $smtpsecure = ' none'  
        public $smtpport = ' 25'  
        public $caching = ' 0'  
        public $cache_handler = ' file'  
        public $cachetime = ' 15'  
        public $MetaDesc = ' Joomla Testing Website'  
        public $MetaKeys = ' '  
        public $MetaTitle = ' 1'  
        public $MetaAuthor = ' 1'  
        public $MetaVersion = ' 0'  
        public $robots = ' '  
        public $sef = ' 1'  
        public $sef_rewrite = ' 0'  
        public $sef_suffix = ' 0'  
        public $unicodeslugs = ' 0'  
        public $feed_limit = ' 10'  
        public $log_path = ' /var/www/html/joomla/logs'  
        public $tmp_path = ' /var/www/html/joomla/tmp'  
        public $lifetime = ' 15'  
        public $session_handler = ' database'  
}

To remove the installation directory just hit " Remove Installation" button. If you get error then use below command to delete manually.

[root@linuxhelp1 ~]# rm -rf installation/

To Login in Joomla

Site administrator Login.

Control Panel of linuxhelp1.com website.

To Update Joomla

To update Joomla, go to Maintenance section in left side menu.

If you are having update it will show the update otherwise it will show as No updates available.

After update process completed, you have to clear your browser cache to adjust for any changes in the CSS/JS files.

Tag : Joomla
FAQ
Q
How to restart MySQL service and auto enable at system startup ?
A
To restart MySQL service and auto enable at system startup on CentOS/RHEL 7

systemctl restart mariadb.service
systemctl enable mariadb.service
Q
How to Verify the whether the httpd is running and listening the request on port 80 ?
A
you can Verify the httpd is running and listening the request on port 80 using the following command

netstat -antp | grep httpd
Q
How to setup joomla with LEMP Stack?
A
To setup joomla Using LEMP stack
follow this link, https://www.linuxhelp.com/how-to-install-joomla-3-6-5-on-centos-7-using-lemp/
Q
Where i can find the lastest version of Joomla ?
A
You can find the latest version of joomla from the following URL

https://downloads.joomla.org/
Q
Where i can find the official documentation of Joomla?
A
you can find the official documentation of joomla from the following URl

https://docs.joomla.org/