+5 votes
349 views
How to install Drupal on CentOS 8

in Linux / Unix by (551k points)
reopened | 349 views

1 Answer

+3 votes
Best answer

1. How to install additional PHP packages on CentOS 8
2. How to download Drupal on CentOS 8
3. Configure Drupal settings
4. Final configuration of Drupal CentOS 8

Currently, there are a series of tools that have been developed seeking that the actions of users are carried out in a comprehensive manner with the best security features , compatibility and client / application interaction..

One of the terms that has taken hold in recent years is CMS (Content Management System - Content Management System) which has been developed as a set of software tools with which users will be able to add, publish, edit or delete the content of a website. This is achieved through different mechanisms such as a web browser , a mobile device or a desktop or laptop PC.

The basic operation of a CMS software is that it is written in a scripting language, then these scripts are executed on a computer on which we have previously installed both the database and the web server. Within the different current CMS options we come across Drupal which is one of the best options for this segment and in TechnoWikis we will explain what Drupal is and how to install it on CentOS 8..

What is Drupal
Drupal has been designed as a flexible CMS software which is based on the LAMP stack (Linux - Apache - MySQL - PHP) and has a modular design thanks to which we can add or remove features by installing and uninstalling modules or allowing the use of themes. to edit the appearance of the website.

By downloading and installing Drupal in CentOS 8, we will be acquiring PHP scripts that allow the execution of the basic CMS functionality, integration of various modules and optional themes, as well as elements of JavaScript, CSS and images .

Drupa execution
Drupal can run in environments (at the battery level) like
  • Windows or macOS operating systems instead of Linux
  • The web server can be Nginx or IIS but not Apache
  • At the database level we can use PostgreSQL or SQLite instead of MySQL or a manager that replaces MySQL like MariaDB

features
Some of the main features of Drupal are:
  • It is a general-purpose CMS software allowing its use to be global regardless of the end goal.
  • It has simple utilities for creating the HTML site.
  • Integrates user testing, bug analysis, and security enhancements.
  • It has free and paid options to increase productivity.

Without further words we will see how to install Drupal on CentOS 8..


1. How to install additional PHP packages on CentOS 8

Step 1

The first step to take will be to install a set of additional PHP packages in the system for PHP compatibility with Drupal, for this we execute the following (if we do not already have them):
 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 

image

Step 2

The next step to take will be to create the database for Drupal using MySQL, in case of not having MSQL we can execute the following command:
 yum -y install @mysql 
Now we are going to create the database accessing MySQL with the following command:
 sudo mysql -u root -p 
Once we access MySQL we will execute the following lines:
 CREATE DATABASE drupal_db; GRANT ALL ON drupal_db. * TO 'user_drupal' @ 'localhost' IDENTIFIED BY 'password'; FLUSH PRIVILEGES; EXIT; 

image

Step 3

We restart the database with the following command:
 sudo systemctl restart mariadb 

image


2. How to download Drupal on CentOS 8


Now we are going to download the Drupal tarball file from the official Drupal site.
Step 1

This file stores all the files necessary for the optimal functioning of Drupal in CentOS 8, the current version of Drupal is 8.8.4, we execute the following:
 sudo wget https://ftp.drupal.org/files/projects/drupal-8.8.4.tar.gz 

image

Step 2

Once downloaded we extract the file:
 sudo tar -xvf drupal-8.8.4.tar.gz 

image

Step 3

Now we are going to move the extracted file to the Apache root folder in CentOS 8:
 sudo mv drupal-8.8.4 / var / www / html / drupal 
Now we grant the necessary permissions for access:
 sudo chown -R apache: apache / var / www / html / drupal 

image


3. Configure Drupal settings


We are going to create a configuration file based on the default configuration file (default.settings.php) which already exists, for this we are going to execute the following lines:
 cd / var / www / html / drupal / sites / default sudo cp -p default.settings.php settings.php 

image

In case SELinux is enabled on CentOS 8, we must execute the previous command to apply the SELinux rule to the / var / www / html / drupal / directory:


4. Final configuration of Drupal CentOS 8

Step 1

Once this is enabled, we will access a browser and use the following syntax:
 http: // computer_ip / drupal 
The initial window allows us to define the Drupal installation language: image
Step 2

We click on “Save and continue” and in the following window we define the type of profile to install which will be the standard: image
Step 3

We click "Save and continue" and in the next window we access the general description of the requirements and enable clean URLs. To enable clean URLs, we must access the Apache configuration file at the /etc/httpd/conf/httpd.conf path: image

We can visualize the version of each necessary complement.

Step 4

To enable clean YRLs we will go to the /etc/httpd/conf/httpd.conf file with our desired editor and replace the AllowOverride None line with AllowOverride All:

image

We save the changes with the Ctrl + O keys and exit the editor with the Ctrl + X keys.

Step 5

We go back to the browser and update the page and now we can select the database to use and enter the data that we have configured as:
  • Database name
  • User and password
image
Step 6

We click on "Save and continue" and the installation process will take place: image
Step 7

After this we go to the Drupal translations section: image
Step 8

When this process reaches its end we must complete the following information:
  • Name of the site
  • Email
  • Support username and password
image
Step 9

At the bottom we can define additional parameters: image
Step 10

We click again on "Save and continue" to finish the process: image
Step 11

Finally we will have access to Drupal in CentOS 8: image
Step 12

From there we will have access to the different Drupal editing menus: image
Step 13

From the "Users" tab we can access current users, as well as create new ones: image
Step 14

From "Settings" we access a set of key options to administer the site: image

As we see, Drupal is a functional alternative for all the CMS concepts necessary to create dynamic and functional websites and the best thing is that its characteristics are high and personalized according to the necessary case of each user.


by (3.5m points)
edited

Related questions

+4 votes
1 answer
asked Oct 8, 2020 in Linux / Unix by backtothefuture (551k points) | 340 views
+5 votes
1 answer
asked Sep 2, 2020 in Linux / Unix by backtothefuture (551k points) | 2k views
+3 votes
1 answer
asked Aug 13, 2020 in Linux / Unix by backtothefuture (551k points) | 1.9k views
+4 votes
1 answer
asked Jun 9, 2020 in Linux / Unix by backtothefuture (551k points) | 595 views
+4 votes
1 answer
asked May 14, 2020 in Linux / Unix by backtothefuture (551k points) | 608 views
Sponsored articles cost $40 per post. You can contact us via Feedback
10,632 questions
10,764 answers
510 comments
3 users