How to Install Drupal CMS on Rocky Linux 8.6

To Install Drupal CMS on Rocky Linux 8.6

Introduction

Drupal is a web content management tool and a customizable platform that helps to build the right tool to serve the content management strategy. It is used by Business and technology leaders to create real-world enterprise solutions that empower web innovation. This Tutorial covers the installation of the Drupal CMS on Rocky Linux 8.6

Step 1: Check the installed version of OS by using the below command

[root@linuxhelp ~]# cat /etc/os-release 
NAME="Rocky Linux"
VERSION="8.6 (Green Obsidian)"
ID="rocky"
ROCKY_SUPPORT_PRODUCT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8"

Step 2: Install the PHP and its modules by using the below command

[root@linuxhelp ~]# dnf install php php-{cli,fpm,json,common,mysql,zip,gd,intl,mbstring,curl,xml,pear,tidy,soap,bcmath,xmlrpc}

Last metadata expiration check: 0:52:26 ago on Thu 23 Jun 2022 05:06:55 PM EDT.
Package php-8.0.20-1.el8.remi.x86_64 is already installed.
Dependencies resolved.
=============================================================================================
 Package               Arch   Version                                     Repository    Size
=============================================================================================
Installing:
 php-bcmath            x86_64 8.0.20-1.el8.remi                           remi-modular  89 k
 php-gd                x86_64 8.0.20-1.el8.remi                           remi-modular 104 k
 php-intl              x86_64 8.0.20-1.el8.remi                           remi-modular 242 k
 php-pear              noarch 1:1.10.13-1.el8.remi                        remi-modular 366 k
 php-pecl-mysql        x86_64 1.0.0-0.24.20201210.6ca4fa4.el8.remi.8.0    remi-modular  43 k

Step 3: Now create a database and user to the Drupal CMS by using the below command

[root@linuxhelp ~]# mysql -u root -p
Enter password:
mysql> create database dupaldb;
Query OK, 1 row affected (0.00 sec)

mysql> create user 'drupaluser'@localhost identified by 'Linuxc#4';
Query OK, 0 rows affected (0.01 sec)

mysql> grant all privileges on drupaldb.* to 'drupaluser'@localhost;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> \q
Bye

Step 4: Download the Drupal CMS package by using the below command

[root@linuxhelp Downloads]# wget https://www.drupal.org/download-latest/zip
--2022-06-23 18:02:20--  https://www.drupal.org/download-latest/zip
Resolving www.drupal.org (www.drupal.org)... 199.232.254.217
Connecting to www.drupal.org (www.drupal.org)|199.232.254.217|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
zip                     100%[============================>]  32.88M  46.8MB/s    in 0.7s

Step 5: Now extract the package by using the below command

[root@linuxhelp Downloads]# unzip zip
Archive:  zip
   creating: drupal-9.4.1/
   creating: drupal-9.4.1/vendor/
   creating: drupal-9.4.1/vendor/composer/
   creating: drupal-9.4.1/vendor/composer/semver/
  inflating: drupal-9.4.1/vendor/composer/semver/CHANGELOG.md  
  inflating: drupal-9.4.1/vendor/composer/semver/LICENSE  

Step 6: Move the Drupal CMS directory to apache root directory by using the below command

[root@linuxhelp Downloads]# mv drupal-9.4.1/ /var/www/drupal

Step 7: Now set the ownership and permissions to the Drupal directory by using the below command

[root@linuxhelp Downloads]# chown -R apache:apache /var/www/drupal/

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

Step 8: Now configure the virtual host for access the Drupal CMS by using the below command

[root@linuxhelp Downloads]# vim /etc/httpd/conf.d/drupal.conf
<VirtualHost *:80>
ServerAdmin www.linuxhelp.coim
DocumentRoot /var/www/drupal
<Directory "/var/www/drupal">
AllowOverride all
Require all granted
</Directory>
</VirtualHost>

Step 9: Put the host entry by using the below command

[root@linuxhelp Downloads]# vim /etc/hosts
127.0.0.1 linuxhelp.com

Step 10: Disable Selinux by using the below command

[root@linuxhelp Downloads]# setenforce 0

Step 11: Restart Apache web server by using the below command

[root@linuxhelp Downloads]# systemctl  restart httpd.service

Go to the browser to access Drupal CMS as shown in the below image

Choose the language as shown in the below image

Select an Installation profile as shown in the below image

Enter Data base Configuration as shown in the below image

Drupal Installation is running

Enter Configure site as shown in the below image

This is the Welcome page of Drupal CMS

By this the installation process of Drupal CMS on Rocky Linux 8.6 has come to an end.

FAQ
Q
What is the command to extract the download package?
A
The command is # unzip (zip file name)
Q
How to configure the host entry?
A
the command is # vi /etc/hosts
Q
How do you create a database for Drupal CMS?
A
The command is # create database drupaldb;
Q
What is the command to enter MySQL?
A
The command is # mysql -u root -p
Q
What is Drupal CMS?
A
Drupal is a web content management tool as well as a customizable platform to help you to build the right tool to serve your content management strategy.