HOW TO INSTALL DRUPAL.

Drupal is an open source Content Management Software (CMS). It is used to  make  websites and applications we use daily. Drupal comprises  great features, like easy content authoring, reliable performance, and excellent security.

Below are the steps to install Drupal :

Before installation the following requirement should be met:

1.LAMP server ( view my previous post )

step 1 : Get  drupal from drupal.org

  • First of all,download drupal 8.2.3 from here.
  • extract the file by using the following command
              sudo tar -xvzf drupal-8.2.3.tar.gz 

 

  • copy the file to the following directory
               sudo cp -r drupal.8.2.3 /var/www/html

 

step2 : Create database for drupal

  •  start MYSQL
 mysql -u username -p

(*change username to your actual username for mysql-server)

  • create database
CREATE DATABASE drupal; 
  • grant privileges
 GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON drupal.* TO 'username'@'localhost' IDENTIFIED BY 'PASSWORD';
  • do the following to reload permissions on new database
FLUSH PRIVILEGES;
  • exit
mysql> exit

step 3 : ONE more step before installation process begins

  • set poper permissions to necessary folders inside drupal and the settings.php file must be present.
sudo mkdir /var/www/html/drupal-8.2.3/sites/default/files
sudo cp /var/www/html/drupal-8.2.3/sites/default/default.settings.php /var/www/html/drupal-8.2.3/sites/default/settings.php
sudo chmod 760 /var/www/html/drupal-8.2.3/sites/default/settings.php
sudo chmod 760  /var/www/html/drupal-8.2.3/sites/default/files

step 4 : Installing drupal

drupal_install_1

  • You may face some errors on the next page, displaying requirements reviews. Make sure you meet all the requirements needed, specially, concerning the clean urls, before proceeding

Here are the steps i did to solve the clean urls requirements:

  • Enable mod_rewrite for Apache. To test if mod_rewrite is available in Apache2:
apache2ctl -M
  • In the output, check to see if the rewrite_module is included in the list of modules.

drupal_install_2

  • If the rewrite module is not in the list,  you can tell Apache to load the module by including:
a2enmod rewrite
  • restart apache
/etc/init.d/apache2 restart
  • check apache status
systemctl status apache2
  • The next step is to locate the appropriate Apache configuration file for your site.The appropriate Apache configuration file could be httpd.conf, a virtual-host-specific file (vhost.conf), a specific site file (e.g. “default”), or apache2.conf.
find /etc/apache2/apache2.conf
  • use a text editor to modify the following content:
vim /etc/apache2/apache2.conf
  • search for  the following :
 <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>
  • change it into :
<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>
  • save and quit the apache2.conf. This should solve the clean URL requirements.
  • Apache needs to be explicitly told to respect the instructions in your sites .htaccess file. This is off by default, though most hosts will have turned it on. That is what the AllowOverride All directive above does – it makes .htaccess start working.

Refresh your browser.

You’re done. Drupal should now be running successfully on your browser.

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s