How to Install Fuel CMS on RHEL7.6

How to Install Fuel CMS on RHEL7.6

Introduction:

Fuel CMS is an open source Content Management System built based on codeigniter framework. This tutorial covers the method to install Fuel 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"

We have to configure mysql.repo for specific version to install

[root@linuxhelp ~]# vim /etc/yum.repos.d/mariadb.repo
[mariadb]
name=MariaDB
baseurl=http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Now, we can install apache and mariadb server using below command

[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.
mariadb                                                                                            | 2.9 kB  00:00:00     
mariadb/primary_db                                                                                 |  54 kB  00:00:01     
Package mariadb-server is obsoleted by MariaDB-server, trying to install MariaDB-server-10.3.24-1.el7.centos.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-server.x86_64 0:10.3.24-1.el7.centos will be installed
….
….
Installed:
 MariaDB-compat.x86_64 0:10.3.24-1.el7.centos  MariaDB-server.x86_64 0:10.3.24-1.el7.centos  httpd.x86_64 0:2.4.6-88.el7 
Dependency Installed:
 MariaDB-client.x86_64 0:10.3.24-1.el7.centos                MariaDB-common.x86_64 0:10.3.24-1.el7.centos               
 boost-program-options.x86_64 0:1.53.0-27.el7                galera.x86_64 0:25.3.29-1.rhel7.el7.centos                 
 httpd-tools.x86_64 0:2.4.6-88.el7                          
Replaced:
 mariadb-libs.x86_64 1:5.5.60-1.el7_5                                                                                    
Complete!

After the installation Enable the serives

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

Now, start the services

[root@linuxhelp ~]# systemctl start httpd mariadb

Use the command to check the running status of the services

[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 Wed 2020-08-26 11:27:05 IST; 15s ago
    Docs: man:httpd(8)
          man:apachectl(8)
….
….

● mariadb.service - MariaDB 10.3.24 database server
  Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
 Drop-In: /etc/systemd/system/mariadb.service.d
          └─migrated-from-my.cnf-settings.conf
…

….

Install the webtatic repo using below command

[root@linuxhelp ~]# yum install https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
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.
webtatic-release.rpm                                                                               |  13 kB  00:00:00     
Examining /var/tmp/yum-root-z8hI3y/webtatic-release.rpm: webtatic-release-7-3.noarch
Marking /var/tmp/yum-root-z8hI3y/webtatic-release.rpm to be installed
Resolving Dependencies
--> Running transaction check
….
…
  Installing : webtatic-release-7-3.noarch                                                                            1/1 
  Verifying  : webtatic-release-7-3.noarch                                                                            1/1 
Installed:
  webtatic-release.noarch 0:7-3                                                                                           
Complete!

Then install remi-repo

[root@linuxhelp ~]# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
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-release-7.rpm                                                                                 |  20 kB  00:00:00     
Examining /var/tmp/yum-root-z8hI3y/remi-release-7.rpm: remi-release-7.8-1.el7.remi.noarch
Marking /var/tmp/yum-root-z8hI3y/remi-release-7.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package remi-release.noarch 0:7.8-1.el7.remi will be installed
…
…
 Installing : remi-release-7.8-1.el7.remi.noarch                                                                     1/1 
 Verifying  : remi-release-7.8-1.el7.remi.noarch                                                                     1/1 
Installed:
 remi-release.noarch 0:7.8-1.el7.remi                                                                                    
Complete!

After the installation enable php-7.2 using following command

[root@linuxhelp ~]# yum-config-manager --enable remi-php72
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
….
….
  basearch
username = 

Now we can Install PHP and its module

[root@linuxhelp ~]# yum install php php-gd php-pdo php-mbstring php-mcrypt php-mysql php-simplexml php-pecl-zip php-imap -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-php72                                                                                         | 3.0 kB  00:00:00     
remi-safe                                                                                          | 3.0 kB  00:00:00     
(1/2): remi-php72/primary_db                                                                       | 239 kB  00:00:01     
(2/2): remi-safe/primary_db                                                                        | 1.8 MB  00:00:03     
…..
….
 gd-last.x86_64 0:2.3.0-2.el7.remi      libargon2.x86_64 0:20161029-3.el7             libc-client.x86_64 0:2007f-16.el7  
 libmcrypt.x86_64 0:2.5.8-13.el7        libraqm.x86_64 0:0.7.0-4.el7                  libwebp7.x86_64 0:1.0.3-1.el7.remi 
 libzip5.x86_64 0:1.7.3-1.el7.remi      oniguruma5php.x86_64 0:6.9.5+rev1-2.el7.remi  php-cli.x86_64 0:7.2.33-1.el7.remi 
 php-common.x86_64 0:7.2.33-1.el7.remi  php-json.x86_64 0:7.2.33-1.el7.remi          
Complete!

Use the following method to secure mysql

[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] 
... 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!

Log into the mysql to create database and user for fuel cms

[root@linuxhelp ~]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 10.3.24-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 fuel character set utf8mb4;
Query OK, 1 row affected (0.001 sec)
MariaDB [(none)]> use fuel;
Database changed
MariaDB [fuel]> grant all on fuel.* to user@localhost identified by 'linuxc';
Query OK, 0 rows affected (0.001 sec)
MariaDB [fuel]> flush privileges;
Query OK, 0 rows affected (0.000 sec)
MariaDB [fuel]> exit
Bye

Download the Latest version of Fuel CMS using the below link

[root@linuxhelp ~]# wget https://github.com/daylightstudio/FUEL-CMS/archive/master.zip
--2020-08-26 11:48:44--  https://github.com/daylightstudio/FUEL-CMS/archive/master.zip
Resolving github.com (github.com)... 13.234.210.38
Connecting to github.com (github.com)|13.234.210.38|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/daylightstudio/FUEL-CMS/zip/master [following]
--2020-08-26 11:48:44--  https://codeload.github.com/daylightstudio/FUEL-CMS/zip/master
Resolving codeload.github.com (codeload.github.com)... 13.127.152.42
Connecting to codeload.github.com (codeload.github.com)|13.127.152.42|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘master.zip’

   [                      <=>                                                        ] 46,34,222   1013KB/s   in 4.5s   

2020-08-26 11:48:49 (1013 KB/s) - ‘master.zip’ saved [4634222]

Unzip the downloaded zip file

[root@linuxhelp ~]# unzip master.zip 
Archive:  master.zip
cfd32bce0191e78c04fbd81875dc3df23e8d1ebf
  creating: FUEL-CMS-master/
 inflating: FUEL-CMS-master/.gitignore  
 inflating: FUEL-CMS-master/.htaccess  
 inflating: FUEL-CMS-master/README.md  
  …
…..

Then move the unzip directory as fuel under apache document directory [root@linuxhelp ~]# mv FUEL-CMS-master/ /var/www/fuel Change directory to fuel

[root@linuxhelp ~]# cd /var/www/fuel/fuel/application/config

Where configure database.php file with following changes

[root@linuxhelp config]# vim database.php 
     'hostname' => 'localhost',
       'username' => 'user',
       'password' => 'linuxc',
       'database' => 'fuel',
       'dbdriver' => 'mysqli',

After this, configure my_fuel file with the changes

[root@linuxhelp config]# vim MY_fuel.php 
$config['admin_enabled'] = TRUE;
$config['fuel_mode'] = 'AUTO';

Once the configuration is completed import fuel-schema table to the fuel database

[root@linuxhelp config]# mysql -u root -p fuel < /var/www/fuel/fuel/install/fuel_schema.sql

We have to Configure the virtualhost for Fuel CMS

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

Then make an entry in host file

[root@linuxhelp config]# vim /etc/hosts
<ip-address-of-your-system>         <domain-name>

Configure the selinux for fuel cms

[root@linuxhelp config]# chcon -R -t httpd_sys_rw_content_t /var/www/fuel

Change Ownership and permission for the directory

[root@linuxhelp config]# chown -R apache. /var/www/fuel
[root@linuxhelp config]# chmod -R 775 /var/www/fuel

Then restart the apache service to update the changes

[root@linuxhelp config]# systemctl restart httpd

To check the installed Fuel CMS , Go to browser and provide domain name in search bar

Click on the link to login Fuel CMS

With this, the method to install Fuel CMS on RHEL7.6 comes to end

FAQ
Q
What does multi-Language feature do in fuel cms?
A
Multi-language feature ables to create the page content in any language you want in fuel cms.
Q
What does multi-Language feature do in fuel cms?
A
Multi-language feature ables to create the page content in any language you want in fuel cms.
Q
What is the latest fuel cms download link?
A
The latest fuel cms download link is https://github.com/daylightstudio/FUEL-CMS/archive/master.zip
Q
What is the latest version of Fuel CMS?
A
The latest version of Fuel CMS is 1.4.10
Q
How to fix you don't have permission on / error while accessing the domain?
A
Check the ownership and permission for the fuel directory
check the virtualhost configuration
check selinux permission