Sunday, September 27, 2009

How to Install Drupal in ubuntu ?

>First we get drupal package :- 
We need to obtain our copy of Drupal so type in
“sudo wget”
this will download the Drupal file into your current directory.

> We need to unpack the files issue the command
“tar –zxvf drupal-6.13.tar.gz”
this will extract the files into a folder in your home directory

>We need to make a directory in the web root folder to keep the Drupal files in. To  do this type in
“sudo mkdir /var/www/drupal”

>We need to move the Drupal content over to the web folder. Type in
“sudo mv drupal-6.13/* drupal-6.13/.htaccess /var/www/drupal”

>We need to set up folders for media associated with the site to do this issue “sudo mkdir /var/www/drupal/sites/default/files”
“sudo chown www-data:www-data /var/www/drupal/sites/default/files

>We need to copy and set the Drupal initial config file. To do this we first set copy the settings file by issuing
“sudo cp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php”

then we need to make sure this file is accessible by issuing the command

“sudo chown www-data:www-data /var/www/drupal/sites/default/settings.php”

>NEXT  we install the following packages:-
apache2 ,php5-mysql, php5-gd ,libapache2-mod-php5 ,mysql-server
Using command on terminal " sudo apt-get install apache2 " similarly other packages

> Then Next we need to make sure there is a database in MySQL that Drupal can use.

Where drupal is the name you picked for the mysql database that Drupal will use. You can call it anything you want.
mysql -u root -p

mysql > create database drupal;
CREATE TEMPORARY TABLES, LOCK TABLES ON drupal.* TO 'drupaluser'@'localhost'
IDENTIFIED BY 'drupalpass';
Quit the mysql prompt:  
myspl> \q 
> Now we need to restart Apache to make sure the settings take effect.
 Type in “sudo /etc/init.d/apache2 restart”

Final Installation Settings

>open browser and type http://localhost/drupal/ or http://localhost/drupal/index.php 

Drupal now needs setting up, most of it is self explanatory but here are the steps:
1) Click on install Drupal in English
2) Type in the database name in this example it was called ‘Drupal’
3) Type in the username for the MySQL account for Drupal in this example it is ‘drupaluser’
4) Type in the password for the username in this example it is ‘drupalpass’
5) Enter in a site name I am calling my one ‘Intranet’
6) Site Email address is for whatever email address you want to associate with the site.
7) Type in an administrator name I will keep this straight forward and call it ‘Administrator’
8.) Choose and confirm the password for this user.
9) Choose the time zone you are located in.
10) Uncheck check for updates automatically. (I want it as it is then update it when I want to)
11) Save and continue
12) Then click on ‘your new site’.

For further information click on link >>>


  1. very good ......


  2. it is reallly helpul..!...can't find that much details on any blog or site.......THANKS.... :-)

  3. How to install drupal in windows?Please reply bak soon

  4. Prefer Linux, its good to use open technology.
    otherwise prefer this