Wednesday, March 30, 2011

Installing Drupal In Ubuntu 10.04

Drupal is a an Open Source Content Management System. Installation of Drupal on Ubuntu 10.04 is relatively easy. Just follow the simple steps below:
1. Open a terminal and type:
sudo apt-get install drupal6
2. You’ll be prompted to select the database. With your arrow keys select mysql and press enter.
3. Enter your MySQL password when you are asked to. This creates a database schema called drupal6 in your MySQL RDBMS.
This is also supposed to auto-create the necessary files in the /var/www/ directory.
But it didn’t in my case, so I had to go for manual creation of files. Continue with the following steps only if you do not have a drupal directory in /var/www/.

4. Download the drupal6 source from http://ftp.drupal.org/files/projects/drupal-6.15.tar.gz. For Extract , do the following:
Open this downloaded Zip folder. Select all the files and folders in it. Right click on the  selection and choose Extract. A dialog box will be displayed. Create a new folder on the desktop and copy alll the files and folders in that folder.
5. Create the necessary directory in /var/www/ by th efollowing command in terminal:
sudo mkdir /var/www/drupal
6. Copy the contents of the extracted directory into /var/www/drupal/ by typing the following command in terminal:
sudo mv drupal-6.15/* drupal-6.15/.htaccess /var/www/drupal
In my case, this command was not working. For doing this, I changed the permission of root folder by the command:
gksudo nautilus
It displayed Root -File Browser Dialog box. Then I choose File System>var>www>Drupal
Then I copy All the extracted Files and folders contained in the folder placed on the desktop To folder Drupal(/var/www/drupal)
7. Create a directory files in drupal/sites/ by the following:

sudo mkdir /var/www/drupal/sites/default/files
 
8. Change the owner of the directory.

sudo chown www-data:www-data /var/www/drupal/sites/default
/files
 
9. Create the initial configuration files.

sudo cp /var/www/drupal/sites/default/default.settings.php
 /var/www/drupal/
sites/default/settings.php
 
11. Create a database drupal6 using phpMyAdmin.

mysqladmin -u root -p create drupal6
 
12. Log in to MySQL if you already have lamp-server installed on your system.

mysql -u root -p
 
13. Grant permissions to the root user (or the username you log into MySQL with) on all tables in drupal6 schema.

mysql>  GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, 
INDEX, ALTER,  CREATE TEMPORARY TABLES, LOCK TABLES ON 
drupal6.* TO'username'@localhost IDENTIFIED BY 'password';
 
Here, ‘username’ is either root or any other username you use to log into MySQL and ‘password’ is the password of the username.
14. Open your browser and type http://localhost/drupal/. You’ll get the following page if you haven’t created a database for Drupal.

Database Configuration
Enter the details and click on Save and continue.
15. Next you’ll get a screen as follows.

Enter your email address under Site information. Under Administrator account, enter a username, email address and password. I used my phpMyAdmin username and password and my email address. Click Save and continue.
16. Then you get a page saying “Drupal installation complete”. Go to your new site.

Drupal Installed
Installation complete! Enjoy It…..

2 comments:

  1. i am stucck on 6th ponit...it says that"mv: cannot stat `drupal-6.15/.htaccess': No such file or directory"...now what to do??
    -regards
    gaurav

    ReplyDelete
  2. I came to your blog just when I was surfing on this topic. I am happy that I found your blog and information I wanted.

    Tech Mentro

    ReplyDelete