How to Install Elxis CMS on RHEL7.6

How to Install Elxis CMS on RHEL7.6

Introduction:

Elxis is a free Content Management System (CMS) that allows you to create websites of any scale from small personal websites and blogs to complex corporate websites and portals without the need of having programming skills. In this video we are going to see the method to install Elxis cms on RHEL7.6

Installation Process

To check the installed version of OS.

[root@linuxhelp ~]# cat /etc/os-release 
NAME="Red Hat Enterprise Linux Server"
VERSION="7.6 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.6"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.6 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.6:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.6
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.6"

Use the below command to install apache & mariadb server

[root@linuxhelp ~]# yum install httpd mariadb-server -y
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-88.el7 will be installed
…..
…..
 Verifying  : httpd-2.4.6-88.el7.x86_64                                                                            2/5 
 Verifying  : perl-DBD-MySQL-4.023-6.el7.x86_64                                                                    3/5 
 Verifying  : 1:mariadb-5.5.60-1.el7_5.x86_64                                                                      4/5 
 Verifying  : httpd-tools-2.4.6-88.el7.x86_64                                                                      5/5 
Installed:
 httpd.x86_64 0:2.4.6-88.el7                           mariadb-server.x86_64 1:5.5.60-1.el7_5                          
Dependency Installed:
 httpd-tools.x86_64 0:2.4.6-88.el7      mariadb.x86_64 1:5.5.60-1.el7_5      perl-DBD-MySQL.x86_64 0:4.023-6.el7     
Complete!

Next, We have to Enable and start the services

[root@linuxhelp ~]# systemctl enable mariadb httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@linuxhelp ~]# systemctl start httpd mariadb

To check the status of the service

[root@linuxhelp ~]# systemctl status httpd mariadb
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-08-21 15:20:32 IST; 14s ago
     Docs: man:httpd(8)
           man:apachectl(8)
…
…
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-08-21 15:20:36 IST; 11s ago
  Process: 69882 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
  Process: 69797 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
 …
…

Then, Secure mysql using belowsteps

[root@linuxhelp ~]# mysql_secure_installation 
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
     SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none): 
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!

Login into the mysql to create Database and user for elxis cms

 [root@linuxhelp ~]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.60-MariaDB MariaDB Server

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

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> create database elxis character set utf8mb4;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> create user user@localhost identified by '123456';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> use elxis;
Database changed
MariaDB [elxis]> grant all privileges on elxis.* to user@localhost;
Query OK, 0 rows affected (0.00 sec)
MariaDB [elxis]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [elxis]> exit;
Bye

We need to install epel-release and yum-utils packages

[root@linuxhelp ~]# yum install epel-release yum-utils
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Package epel-release-7-12.noarch already installed and latest version
Package yum-utils-1.1.31-50.el7.noarch already installed and latest version
Nothing to do

Then install Webtatic repository and remi repository

[root@linuxhelp ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Retrieving https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
warning: /var/tmp/rpm-tmp.VgU4ml: Header V4 RSA/SHA1 Signature, key ID 62e74ca5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
  1:webtatic-release-7-3             ################################# [100%]

[root@linuxhelp ~]# rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
Retrieving http://rpms.remirepo.net/enterprise/remi-release-7.rpm
warning: /var/tmp/rpm-tmp.wyOrTk: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
  1:remi-release-7.8-1.el7.remi      ################################# [100%]

Use the following command to enable php71 in remi repository

[root@linuxhelp ~]# yum-config-manager --enable remi-php71
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
=================================================== repo: remi-php71 ===================================================
[remi-php71]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7Server
baseurl = 
cache = 0
cachedir = /var/cache/yum/x86_64/7Server/remi-php71
check_config_file_age = True
compare_providers_priority = 80
cost = 1000
deltarpm_metadata_percentage = 100
deltarpm_percentage = 
enabled = 1
enablegroups = True
exclude = 
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/7Server/remi-php71/gpgcadir
gpgcakey = 
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/7Server/remi-php71/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
hdrdir = /var/cache/yum/x86_64/7Server/remi-php71/headers
http_caching = all
includepkgs = 
ip_resolve = 
keepalive = True
keepcache = False
mddownloadpolicy = sqlite
mdpolicy = group:small
mediaid = 
metadata_expire = 21600
metadata_expire_filter = read-only:present
metalink = 
minrate = 0
….
….

Install php and its module

[root@linuxhelp ~]# yum install php php-gd php-pdo php-imap php-mysql php-pecl-zip php-ldap php-curl php-simplexml php-fpm php-mbstring php-mcrypt php-memcache php-memcached  -y
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
remi-php71                                                                                       | 3.0 kB  00:00:00     
remi-safe                                                                                        | 3.0 kB  00:00:00     
webtatic                                                                                         | 3.6 kB  00:00:00     
(1/4): webtatic/x86_64/group_gz                                                                  |  448 B  00:00:01     
(2/4): remi-php71/primary_db                                                                     | 247 kB  00:00:01     
(3/4): webtatic/x86_64/primary_db                                                                | 253 kB  00:00:02     
(4/4): remi-safe/primary_db                                                                      | 1.8 MB  00:00:03     
….
….
| 212 kB  00:00:00     
(25/26): php-cli-7.1.33-9.el7.remi.x86_64.rpm                                                    | 4.6 MB  00:00:24     
php-imap-7.1.33-9.el7.remi.x86 FAILED                                          
http://remi.xpg.com.br/enterprise/7/php71/x86_64/php-imap-7.1.33-9.el7.remi.x86_64.rpm: [Errno 14] HTTP Error 502 - Bad Gateway
Trying other mirror.
(26/26): php-imap-7.1.33-9.el7.remi.x86_64.rpm                                                   |  86 kB  00:00:00     
…
…

Move the Downloaded elxis zip file to elxis folder

[root@linuxhelp www]# mv elxis_5.1_cronus_rev2344.zip elxis

Change directory to elxis

[root@linuxhelp www]# cd elxis/

Listing the current directory

 [root@linuxhelp elxis]# ls -la
total 11252
drwxr-xr-x. 2 root root     4096 Aug 21 15:31 .
drwxr-xr-x. 5 root root     4096 Aug 21 15:31 ..
-rw-r--r--. 1 root root 11513853 Aug 21 15:30 elxis_5.1_cronus_rev2344.zip

Unzip the zipped file

[root@linuxhelp elxis]# unzip elxis_5.1_cronus_rev2344.zip 
Archive:  elxis_5.1_cronus_rev2344.zip
  creating: components/
  creating: components/com_content/
 inflating: components/com_content/content.article.xml  
 inflating: components/com_content/content.category.xml  
 inflating: components/com_content/content.menu.xml  
 inflating: components/com_content/content.php  
 inflating: components/com_content/content.xml  
  creating: components/com_content/controllers/
….
….

Change permission for the directory

[root@linuxhelp elxis]# chmod -R 755 /var/www/elxis

Change ownership for the directory

[root@linuxhelp elxis]# chown -R apache. /var/www/elxis

Configure the virtualhost for the Elxis CMS

[root@linuxhelp www]# vim /etc/httpd/conf.d/elxis.conf
<virtualhost *:80>
servername www.linuxhelp1.com
Documentroot /var/www/elxis
<Directory /var/www/elxis/>
allowoverride all
allow from all
</Directory>
</virtualhost>

Make host entry by following command

[root@linuxhelp www]# Vim /etc/hosts
<ip-address-of-your-system>   <servername>

After the configuration We need to restart the apache service

[root@linuxhelp www]# systemctl restart httpd

Open Browser and type your domain name

Accept the terms and condition, then provide database details

Then, configure the admin account

Create php configuration file under /var/www/elxis with the content

After the configuration, you can access your elxis in new tab with admin credential to login

We have successfully logged in to the Elxis CMS

With this, the method to install Elxis cms on RHEL7.6 comes to end

FAQ
Q
5) Is Elxis CMS compatible with PHP5?
A
Yes, Elxis CMS compatible with PHP version 5.
Q
4) What is the link to download Elxis CMS?
A
The link to download Elxis CMS is https://www.elxis.org/download.html
Q
3) What is the Latest version of Elxis CMS?
A
The Latest version of Elxis CMS is Elxis 5.1 Cronus rev2344
Q
2) What is the repository needed to install a specific PHP version?
A
The repository needed to install a specific PHP version is remi-release (http://rpms.remirepo.net/enterprise/remi-release-7.rpm)
Q
1) What is Elxis CMS?
A
Elxis is a free Content Management System (CMS) that allows you to create websites, blogs, portals, forums, and more without prior programming skills.