In this article, we will have explained the necessary steps to install and configure Drupal on CentOS 8. Before continuing with this tutorial, make sure you are logged in as a user with
sudo privileges. All the commands in this tutorial should be run as a non-root user.
Drupal is an Open Source Content Management Software that allows us to build ND create websites without doing any coding. Drupal’s code is written in PHP and comes under GNU GPL (General Public License ).
Install Drupal on CentOS
Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.
sudo dnf update
Step 2. Install LAMP stack on CentOS server.
It is assumed that you have already installed the LAMP stack on CentOS 8. If not, please check out the following tutorial:
Step 3. Install Drupal on CentOS 8.
Download the Drupal source from its official website. We can also use
wget the command to download drupal from the terminal:
wget https://ftp.drupal.org/files/projects/drupal-8.7.9.tar.gz tar xvzf drupal-8.7.9.tar.gz cd drupal-8.7.9 mv ./* /var/www/html
Then set the appropriate permissions:
chown -R apache:apache /var/www/html
Step 4. Creating a Database for Drupal.
Now we have to create a database and a user for the Drupal site to manage:
mysql -u root -p
We can create our database with the command below:
create database drupal; grant all privileges on biem.* to 'username'@'localhost' identified by 'your_password'; flush privileges;
Step 5. Accessing Drupal.
That’s it. It is time to use your favorite web browser and navigate to:
http://your_domain.com OR http://your_IP_address.com
That’s all you need to do to install Drupal on CentOS 8. I hope you find this quick tip helpful. If you have questions or suggestions, feel free to leave a comment below.