In this article, we will have explained the necessary steps to install and configure Drupal on CentOS 7. 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, flexible, highly scalable, and secure Content Management System (CMS) that allows users to easily build and create websites. It can be extended using modules and enables users to transform content management into powerful digital solutions.
Install Drupal on CentOS
Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.
sudo yum install epel-release sudo yum update
Step 2. Install LAMP stack on CentOS.
It is assumed that you have already installed the LAMP stack on CentOS 7. If not, please check out the following tutorial:
Step 3. Download and install Drupal.
Download the Drupal source from its official website in your document root:
cd /var/www wget https://ftp.drupal.org/files/projects/drupal-8.3.7.tar.gz
Extract the file:
tar xvzf drupal-8.3.7.tar.gz cd drupal-8.3.7 mv ./* /var/www/html
Then set the appropriate permissions on the Drupal site directory:
chown -R apache:apache /var/www/html
Step 4. Creating Database 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 biem; grant all privileges on biem.* to 'username'@'localhost' identified by '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 7. I hope you find this quick tip helpful. If you have questions or suggestions, feel free to leave a comment below.