Drupal is a free and open-source Content Management System (CMS). It is released under GNU General Public License (GPL) terms, which is one of the most successful projects ever for open source. Almost 2.5 percent of the world’s website uses Drupal since it offers high standard features such as simple authoring of content, stable performance, and excellent security.

What We Will Cover?

In this guide, we will see how to install and configure Drupal 8 on the Fedora 25 OS. We will install Drupal with Apache web server and MariaDB database server. Let us get started with the installation process of Drupal on the Fedora 25 workstation.

Prerequisites:

  1. Fedora 25 OS installed on your system
  2. Internet connectivity to download various files
  3. Administrative (sudo access) account on the system

Installing the Required Packages:

Step 1. To make Drupal installation easier, Fedora offers a collection of pre-packaged applications. Just use the below command to install all these packages:

$ sudo dnf install @“Web Server” drupal8 drupal8-httpd php-opcache php-mysqlnd mariadb-server

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/1-9.jpg" data-lazy- height="588" src="data:image/svg xml,” width=”735″>

In this example, we have assumed that the web and database servers are both running on the same machine.

Step 2. The apache web service and mariadb database service can be enabled to start at boot with the command:

$ sudo systemctl enable httpd.service mariadb.service

Step 3. Start the above services using:

$ sudo systemctl start httpd.service mariadb.service

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/2-9.jpg" data-lazy- height="198" src="data:image/svg xml,” width=”821″>

Configuring the MariaDB Database Server

Step 1. The default setup of MariaDB requires running the mysql_secure_installation script for securing the database.

$ sudo mysql_secure_installation

Now, it will ask some questions regarding setting up MariaDB. We have used the following settings here. You can choose differently as per your needs.

Enter current password for root (enter for none): [PRESS ENTER]


Set root password? [Y/n] y

New Password [Set any strong Password for MariaDB]

Re-Enter new password [Repeat the above password]


Remove anonymous users? [Y/n] y


Disallow root login remotely? [Y/n] y


Remove test database and access to it? [Y/n] y


Reload privilege tables now? [Y/n] y

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/3-9.jpg" data-lazy- height="976" src="data:image/svg xml,” width=”752″>

Step 2. Login to MariaDB and create a database and a unique privileged user for this database.

1. Use the below command to create a database named “testdb”:

2. Create a user named “testuser” with a password “linuxhint313” with the command:

create user ‘testuser’@‘localhost’ identified by ‘linuxhint313’;

3. Grant the required permissions to the ‘testuser’ with the command:

grant all privileges on testdb.* to ‘testuser’@‘localhost’ identified by “linuxhint313”;

4. Reload the grant tables in the MariaDB database:

5. Exit the MariaDB database:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/4-8.jpg" data-lazy- height="812" src="data:image/svg xml,” width=”975″>

Configuring the Apache Web Server

Step 1. For the web server to perform some necessary operations, SELinux parameters need to be set as:

$ sudo setsebool -P httpd_can_network_connect_db=1

$ sudo setsebool -P httpd_can_sendmail on

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/5-8.jpg" data-lazy- height="254" src="data:image/svg xml,” width=”986″>

Step 2. Configure Firewall to allow traffic on port 80 (HTTP):

$ sudo firewall-cmd –add-service=http –permanent

$ sudo firewall-cmd –reload

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/6-9.jpg" data-lazy- height="205" src="data:image/svg xml,” width=”1154″>

Step 3. Next, use the cp command to copy the default.settings.php file to settings.php in the same location:

$ sudo cp /etc/drupal8/sites/default/default.settings.php

/etc/drupal8/sites/default/settings.php

Step 4. Now set the permissions of the settings.php to 666. It will now be readable and writable by everyone.

$ sudo chmod 666 /etc/drupal8/sites/default/settings.php

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/7-6.jpg" data-lazy- height="252" src="data:image/svg xml,” width=”982″>

Note: After the Drupal installation is complete, we need to revert the permission of settings.php to 644.

Step 5. The last step is to restart the webserver:

$ sudo systemctl restart httpd

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/8-4.jpg" data-lazy- height="187" src="data:image/svg xml,” width=”982″>

Configuring the Drupal Installation

We are all set to configure the drupal from the web browser. Open a web browser and browse to your system’s IP address along with the /drupal8 or http://localhost/drupal8.


i) When you visit this page for the first time, it will bring up the configuration wizard for Drupal. Choose the language of your choice, then save and continue.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/9-3.jpg" data-lazy- height="744" src="data:image/svg xml,” width=”1032″>

ii) Next, select an installation profile from the two options. Usually, a Standard profile is commonly used as it has pre-configured features. In contrast, minimal profile is normally used for building a custom site and is only recommended for advanced users.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/10-3.jpg" data-lazy- height="752" src="data:image/svg xml,” width=”1042″>

iii) The next window will verify various requirements for configuring Drupal. If you see any dependencies or missing requirements, you can install it, then press save and continue.

iv) In the database configuration, select the radio button corresponding to MariaDB. Enter the name for your database and the username for this database. In the database password column, enter the database password you used at the time of creating the database.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/11-2.jpg" data-lazy- height="751" src="data:image/svg xml,” width=”1037″>

If everything goes right, then the installation process should now start.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/12-1.jpg" data-lazy- height="688" src="data:image/svg xml,” width=”1292″>

After the installation is finished, we need to revert the permission of the file settings.php to 644 so that the group members and other users of the system will only have read access. To accomplish this, run the below command:

$ sudo chmod 644 /etc/drupal8/sites/default/settings.php

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/13-1.jpg" data-lazy- height="177" src="data:image/svg xml,” width=”779″>

Finish the installation process on the browser side by adding various site information:

Site Name – YOUR SITE NAME

Site email address – YOUR SITE EMAIL ID

Username – USERNAME FOR THE SITE

Password – PASSWORD FOR ACCESSING THIS SITE

User’s Email address – YOUR PERSONAL EMAIL ID

Default country – COUNTRY YOU BELONG TO

Default time zone – TIMEZONE

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/14-1.jpg" data-lazy- height="680" src="data:image/svg xml,” width=”1277″>

On the next screen, you will see the Homepage for your Drupal account as shown below. The email is an error in red because we have used a dummy mail ID to demonstrate this guide.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/15-1.jpg" data-lazy- height="564" src="data:image/svg xml,” width=”938″>

Conclusion:

Congratulations, we have successfully installed Drupal on Fedora 25 workstation from the official software packages. The important thing to understand is we have previously performed this guide on Fedora 30 and 33 OS with no success. There is no right and latest official documentation available for installing Drupal on Fedora. It appears that Fedora’s support is not much active for Drupal in its latest releases. Hopefully, in the future, Fedora may provide support for installing Drupal on its latest updates.

About the author

<img alt="Ali Imran Nagori" data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/IMG_20201123_090644_2-150×150.jpg604ecbd9419e1.jpg" height="112" src="data:image/svg xml,” width=”112″>

Ali Imran Nagori

Ali imran is a technical writer and Linux enthusiast who loves to write about Linux system administration and related technologies. You can connect with him on LinkedIn


.