How to Install Drupal-11.1.0 CMS in RHEL-9.5 Linux

Installing Apache in RHEL

# yum update
# dnf install httpd
# systemctl start httpd 
# systemctl enable httpd 
# systemctl status httpd

Installing MySql in RHEL

# dnf install mysql-server
# systemctl start mysqld.service 
# systemctl enable mysqld.service 
# systemctl status mysqld.service

MySql setup

# mysql_secure_installation
# mysql -u root -p

Installing PHP in RHEL

# dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
# dnf module list php
# dnf module reset php
# dnf module enable php8.2
# dnf install php php-opcache php-gd php-curl php-mbstring php-xml php-pear php-fpm php-pdo php-json
php-zip php-common php-cli php-xmlrpc php-xml php-tidy php-soap php-bcmath php-devel
# systemctl status php-fpm.service 
# systemctl start php-fpm.service 
# systemctl enable php-fpm.service
# mysql -u root -p
# create database drupal;
# create user drupal@localhost identified by 'Ak123!@#'; 
# grant all on drupal.* to drupal@localhost;
# flush privileges; 
# exit;

Installing Drupal in RHEL

# wget https://www.drupal.org/download-latest/tar.gz -O drupal.tar.gz
# tar -xvf drupal.tar.gz
# mv drupal-11.1.0/ /var/www/html/drupal 
# systemctl restart httpd
# chown -R apache:apache /var/www/html/ 
# chmod -R 755 /var/www/html
# cp -p /var/www/html/drupal/sites/default/default.settings.php
/var/www/html/drupal/sites/default/my.settings.php

Creating Drupal Virtual Host on Apache

# vim /etc/httpd/conf.d/drupal.conf

<VirtualHost *:80>
ServerAdmin admin@localhost.bitscentric.com 
DocumentRoot /var/www/html/drupal/
ServerName localhost.bitscentric.com
ServerAlias www.localhost.bitscentric.com 
ErrorLog /var/log/httpd/drupal_error.log
CustomLog /var/log/httpd/drupal_access.log combined

<Directory /var/www/html/drupal/> 
Options FollowSymLinks
AllowOverride All
Require all granted 
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d

</Directory>
</VirtualHost>
# vim /etc/hosts
192.168.1.20 localhost.bitscentric.com www.localhost.bitscentric.com
# apachectl -t
# systemctl restart httpd

Complete the Drupal Installation via Web Browser

# http://your_domain_or_IP or
# http://localhost.bitscentric.com/ or # http://192.168.1.20

Choose Profile setting

Database setting

Final installing Drupal

Configure website

Configure admin account

Now, website is ready to access

Leave a Reply

Your email address will not be published. Required fields are marked *