Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install Drupal on CentOS 8 - DesignLinux

May 29 2020
designlinux 0 Comments

Drupal is a free and open-source CMS written in PHP that ships with the GNU / GPL license. Just like popular CMS platforms such as WordPress and Joomla, with Drupal, you can get started with creating your own blog or website from the ground up with little or zero knowledge of web programming or markup languages.

In this tutorial, you will learn how to install Drupal on CentOS 8 Linux.

Prerequisites

Before we get started, ensure that you have installed the LAMP stack on your CentOS 8. LAMP is a popular stack used for hosting web hosting and consists of Apache web server, MariaDB / MySQL database and PHP.

Also, ensure that you have an SSH connection to your CentOS 8 server and a good and stable internet connection.

Step 1: Install Additional PHP Modules in CentOS 8

Drupal requires additional PHP modules to function without a hitch. So install them by executing the command below.

$ sudo dnf install php-curl php-mbstring php-gd php-xml php-pear php-fpm php-mysql php-pdo php-opcache php-json php-zip

Step 2: Create a Drupal Database

Having installed all the required PHP modules, you need to create a database to accommodate Drupal’s installation files. So log in to your MariaDB database as shown.

$ sudo mysql -u root -p

Once logged in, run the commands as shown to create a database for Drupal and grant all privileges on the Drupal user.

MariaDB [(none)]> CREATE DATABASE drupal_db;
MariaDB [(none)]> GRANT ALL ON drupal_db.* TO ‘drupal_user’@’localhost’ IDENTIFIED BY ‘[email protected]’;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Exit and restart the database server.

$ sudo systemctl restart mariadb

Step 3: Download Drupal in CentOS 8

With Drupal’s database in place, the next step will be downloading Drupal’s tarball file from Drupal’s official site. This contains all the necessary files required for Drupal to function as expected. At the time of writing this, the latest version is Drupal 8.8.4.

$ sudo wget https://ftp.drupal.org/files/projects/drupal-8.8.4.tar.gz

After the download complete, extract the tarball file as shown.

$ sudo tar -xvf drupal-8.8.4.tar.gz

Next, move the extracted folder to the Apache document root directory as shown.

$ sudo mv drupal-8.8.2 /var/www/html/drupal

With the drupal uncompressed file in the document root directory, modify the file permissions to allow apache to access the directory.

$ sudo chown -R apache:apache /var/www/html/drupal

Step 4: Configure Drupal Settings

Next, we are going to create a settings file from the default settings file (default.settings.php) which already exists in the following location.

$ cd /var/www/html/drupal/sites/default
$ sudo cp -p default.settings.php settings.php

In case SELinux is enabled on your system, run the command below to effect the SELinux rule on the /var/www/html/drupal/ directory.

Step 5: Finalizing Drupal Installation

We’re done with all the configurations. The only remaining bit is to set up Drupal on the browser. To do that, type the following address in your URL bar and hit ENTER.

http://server-IP/drupal

The ‘Welcome’ screen will be as shown. So first, select your preferred language and click the ‘Save and Continue’ button.

Choose Drupal Installation Language

Choose Drupal Installation Language

On the next screen, select the ‘Standard Profile’ as the profile to be used and click the ‘Save and Continue’ button to proceed to the next page.

Select Drupal Installation Profile

Select Drupal Installation Profile

Next, take a look at the overview of the requirements and enable clean URLs. To enable clean URLs, head out to the Apache configuration file located in the /etc/httpd/conf/httpd.conf file.

Set the AllowOverride attribute from None to All.

Drupal Requirements Review

Drupal Requirements Review

Next, refresh the page to continue to the ‘Database Configuration’ page as shown. Fill out the required fields such as the database type, database name, database password, and username.

Drupal Database Configuration

Drupal Database Configuration

Again, click on the ‘Save and Continue’ button to go to the next step. Drupal will commence installing all the features and will take about 5 minutes.

Drupal Installation on CentOS 8

Drupal Installation on CentOS 8

In the next section, Fill out the following details:

Drupal Site Configuration

Drupal Site Configuration

Finally, you will be presented with the home page as shown. You can now proceed to create your site and add content to it. You can use a vast array of Drupal themes and plugins to enhance your site’s appearance.

Drupal Homepage

Drupal Homepage

And this brings us to the end of this article. We have taken you through a step-by-step guide of how you can install Drupal on CentOS 8.

Sharing is Caring…
Share on FacebookShare on TwitterShare on LinkedinShare on Reddit

Related

Tags: CentOS Tips

3 Ways to Create a Network Bridge in RHEL/CentOS 8

Prev Post

How to Install Joomla on Debian 10

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 1
  • 1,231
  • 616,920

DesignLinux.com © All rights reserved

Go to mobile version