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
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;
Step 3
We restart the database with the following command:
sudo systemctl restart mariadb
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
Step 2
Once downloaded we extract the file:
sudo tar -xvf drupal-8.8.4.tar.gz
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
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
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:
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:
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:
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:
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:
Step 6
We click on "Save and continue" and the installation process will take place:
Step 7
After this we go to the Drupal translations section:
Step 8
When this process reaches its end we must complete the following information:
- Support username and password
Step 9
At the bottom we can define additional parameters:
Step 10
We click again on "Save and continue" to finish the process:
Step 11
Finally we will have access to Drupal in CentOS 8:
Step 12
From there we will have access to the different Drupal editing menus:
Step 13
From the "Users" tab we can access current users, as well as create new ones:
Step 14
From "Settings" we access a set of key options to administer the site:
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.