How to install Drupal on CentOS/Fedora

drupalDrupal is another PHP-based, open-source content management system. It is used for managing, publishing, and organizing your website. This is true regardless of whether it is your personal blog or your corporate website. Drupal can be easily installed on your CentOS or Fedora VPS in less than 5 minutes. To create a MySQL user and database for your Drupal installation, download the latest version of Drupal. Then make a configuration file. That’s it.

To create a MySQL user and database, execute the following commands :

# echo "CREATE DATABASE DRUPALDB;" | mysql -u root -p
# echo "CREATE USER 'DRUPALUSER'@'localhost' IDENTIFIED BY 'PASSWORD';" | mysql -u root -p
# echo "GRANT ALL PRIVILEGES ON DRUPALDB.* TO 'DRUPALUSER'@'localhost';" | mysql -u root -p
# echo "FLUSH PRIVILEGES;" | mysql -u root -p

And enter your MySQL ‘root’ password when required. Do not forget to change ‘DRUPALDB’, ‘DRUPALUSER’ and ‘PASSWORD’ to your actual database name, database user and MySQL root password.

Download the latest stable version of Drupal, which is currently 7.15:

# wget http://ftp.drupal.org/files/projects/drupal-7.15.zip

Unpack the downloaded .zip file:

# unzip drupal-7.15.zip

Once the downloaded file is unpacked, move it to your Apache document root directory:

# mv drupal-7.15 /var/www/html

Additional PHP packages required by Drupal should be installed:

# yum install php-mbstring php-gd php-xml

Apache should own all files under Drupal:

# chown apache:apache -R /var/www/html/drupal-7.15

Change your current working directory to the Drupal directory:

# cd /var/www/html/drupal-7.15

Now, you should create a configuration file for the Drupal installation by making a copy of the existing default configuration file:

# cp sites/default/default.settings.php sites/default/settings.php

Change the permissions of the settings file to be writable by Drupal:

# chmod a+w sites/default/settings.php</pre>

After everything explained above is complete, access the Drupal installer at http://yourdomain.tld/drupal-7.15 and complete the remaining steps. For more updates, you may also refer to this guide on how to install Drupal 7 on CentOS 7

/a>.</p&gt;

PS. If you liked this post please share it with your friends or leave a reply below. Thanks.

Leave a Comment