How to install Drupal on CentOS web panel
How to install Drupal on CentOS web panel
Drupal is an open source content Management System similar to wordpress used for creating Websites without any PHP coding. It is programmed in PHP and provides GUI for the users to create websites. This tutorial covers the installation of Drupal on CentOS web panel.
Installation procedure
To start with the installation procedure, go to CentOS web panel and create new user account and domain for drupal.
Enter the required details to create a new account and click create option.
The summary for the new user is shown below.
Enter the required details for adding a new domain and click create option.
Now create a new database for drupal and a new user by granting a new privileges by executing a set of following commands.
[root@cwp ~]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with or g. Your MariaDB connection id is 265 Server version: 10.1.25-MariaDB MariaDB Server Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type ' help ' or ' h' for help. Type ' c' to clear the current input statement. MariaDB [(none)]> create database drupal Query OK, 1 row affected (0.05 sec) MariaDB [(none)]> CREATE USER ' drupaluser' @' localhost' IDENTIFIED BY ' 123' Query OK, 0 rows affected (0.06 sec) MariaDB [(none)]> GRANT ALL ON drupal.* TO ' drupaluser' @' localhost' Query OK, 0 rows affected (0.02 sec) MariaDB [(none)]> flush privileges Query OK, 0 rows affected (0.04 sec) MariaDB [(none)]> exit Bye
Now download the drupal package latest version (8.3.7) by using below command or from it’ s official website using the wget command.
[root@cwp ~]# wget https://ftp.drupal.org/files/projects/drupal-8.3.7.tar.gz
--2017-08-24 06:33:48-- https://ftp.drupal.org/files/projects/drupal-8.3.7.tar.gz
Resolving ftp.drupal.org (ftp.drupal.org)... 151.101.9.175
Connecting to ftp.drupal.org (ftp.drupal.org)|151.101.9.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12739663 (12M) [application/octet-stream]
Saving to: ‘ drupal-8.3.7.tar.gz’
100%[===================================================================================================================================================> ] 1,27,39,663 154KB/s in 77s
2017-08-24 06:35:06 (161 KB/s) - ‘ drupal-8.3.7.tar.gz’ saved [12739663/12739663]
Next extract the package directly into your domain’ s default document root.
[root@cwp ~]# tar -xzf drupal-8.3.7.tar.gz -C /home/drupal/public_html/ [root@cwp ~]# cd /home/drupal/public_html/ [root@cwp public_html]# ls -l total 12 drwxr-xr-x 8 root root 4096 Aug 16 22:49 drupal-8.3.7 -rw-r--r-- 1 drupal drupal 5069 Jan 25 2017 index.html [root@cwp public_html]# mv drupal-8.3.7 drupal
Change the ownership and file permission for drupal directory.
[root@cwp ~]# chown -R drupal:drupal /home/drupal/
[root@cwp ~]# chmod -R 755 /home/drupal/
Next create an apache configuration file named drupal.conf for drupal and enter the following contents in the file. Save and exit the file.
[root@cwp ~]# vim /usr/local/apache/conf.d/drupal.conf
< VirtualHost *:80>
Servername drupal.example.com
DocumentRoot /home/drupal/public_html
< /VirtualHost>
< Directory /home/drupal/public_html>
DirectoryIndex index.php
Options FollowSymLinks
AllowOverride All
Require all granted
suPHP_UserGroup drupal drupal
< /Directory>
Restart the Apache service by running the following command.
[root@cwp ~]# systemctl restart httpd
Now open the browser and call your domain for drupal by running the following link drupal.example.com. Select the language and click save and continue option.
The installation procedure for Drupal starts. Click the save and continue option.
This page contains the list of PHP version, extensions, file system and settings file. Click the continue anyway.
Enter the following details for database configuration and click save and continue option.
The installation procedure of Drupal is progressing on the progress bar.
The site has been configured by entering the details of the site.
The username and password for site maintenance account.
Save and continue the settings in the installation wizard.
The installation is complete. The welcome page for Drupal is shown as follows.
The installation procedure of Drupal is successfully completed.
Comments ( 1 )