How to install Drupal on CentOS/Fedora
Drupal is another PHP based, open-source content management system that is used for managing, publishing and organizing your website, 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. All you need to do is to create a MySQL user and database for your Drupal installation, download the latest version of Drupal and create 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 currently is 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
All files under Drupal should be owned by apache:
# 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 in order to be writable by Drupal:
# chmod a+w sites/default/settings.php
After everything explained above is finished, you should access the Drupal installer at http://yourdomain.tld/drupal-7.15 and complete the remaining steps.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.