Set up Drupal on CentOS 8

Drupal is a free and open-source CMS written in PHP that ships with the GNU / GPL license. Identical to well-liked CMS platforms akin to WordPress and Joomla, with Drupal, you may get began with creating your individual weblog or web site from the bottom up with little or zero information of internet programming or markup languages.

On this tutorial, you’ll learn to set up Drupal on CentOS Eight Linux.


Earlier than we get began, guarantee that you’ve put in the LAMP stack in your CentOS 8. LAMP is a well-liked stack used for internet hosting hosting and consists of Apache internet server, MariaDB / MySQL database and PHP.

Additionally, guarantee that you’ve an SSH connection to your CentOS Eight server and and steady web connection.

Step 1: Set up Extra PHP Modules in CentOS 8

Drupal requires further PHP modules to operate with out a hitch. So set up them by executing the command beneath.

$ sudo dnf set up 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 put in all of the required PHP modules, it is advisable to create a database to accommodate Drupal’s set up information. So log in to your MariaDB database as proven.

$ sudo mysql -u root -p

As soon as logged in, run the instructions as proven to create a database for Drupal and grant all privileges on the Drupal person.

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

Exit and restart the database server.

$ sudo systemctl restart mariadb

Step 3: Obtain Drupal in CentOS 8

With Drupal’s database in place, the subsequent step can be downloading Drupal’s tarball file from Drupal’s official website. This comprises all the required information required for Drupal to operate as anticipated. On the time of scripting this, the most recent model is Drupal 8.8.4.

$ sudo wget

After the obtain full, extract the tarball file as proven.

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

Subsequent, transfer the extracted folder to the Apache doc root listing as proven.

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

With the drupal uncompressed file within the doc root listing, modify the file permissions to permit apache to entry the listing.

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

Step 4: Configure Drupal Settings

Subsequent, we’re going to create a settings file from the default settings file (default.settings.php) which already exists within the following location.

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

In case SELinux is enabled in your system, run the command beneath to impact the SELinux rule on the /var/www/html/drupal/ listing.

Step 5: Finalizing Drupal Set up

We’re finished with all of the configurations. The one remaining bit is to arrange Drupal on the browser. To try this, sort the next handle in your URL bar and hit ENTER.


The ‘Welcome’ display can be as proven. So first, choose your most well-liked language and click on the ‘Save and Proceed’ button.

Choose Drupal Installation Language

Select Drupal Set up Language

On the subsequent display, choose the ‘Commonplace Profile’ because the profile for use and click on the ‘Save and Proceed’ button to proceed to the subsequent web page.

Select Drupal Installation Profile

Choose Drupal Set up Profile

Subsequent, check out the overview of the necessities and allow clear URLs. To allow clear URLs, head out to the Apache configuration file situated within the /and so forth/httpd/conf/httpd.conf file.

Set the AllowOverride attribute from None to All.

Drupal Requirements Review

Drupal Necessities Overview

Subsequent, refresh the web page to proceed to the ‘Database Configuration’ web page as proven. Fill out the required fields such because the database sort, database title, database password, and username.

Drupal Database Configuration

Drupal Database Configuration

Once more, click on on the ‘Save and Proceed’ button to go to the subsequent step. Drupal will start putting in all of the options and can take about 5 minutes.

Drupal Installation on CentOS 8

Drupal Set up on CentOS 8

Within the subsequent part, Fill out the next particulars:

Drupal Site Configuration

Drupal Website Configuration

Lastly, you’ll be introduced with the house web page as proven. Now you can proceed to create your website and add content material to it. You should use an unlimited array of Drupal themes and plugins to reinforce your website’s look.

Drupal Homepage

Drupal Homepage

And this brings us to the top of this text. We’ve taken you thru a step-by-step information of how one can set up Drupal on CentOS 8.


Germany Devoted Server

Leave a Reply