1. Open a terminal and type:
varsha@varsha-laptop:~$ 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. Extract and do the following.
5. Create the necessary directory in /var/www/.
varsha@varsha-laptop:~$ sudo mkdir /var/www/drupal
6. Copy the contents of the extracted directory into /var/www/drupal/.
varsha@varsha-laptop:~$ sudo mv drupal-6.15/* drupal-6.15/.htaccess /var/www/drupal
7. Create a directory files in drupal/sites/.
varsha@varsha-laptop:~$ sudo mkdir /var/www/drupal/sites/default/files
8. Change the owner of the directory.
varsha@varsha-laptop:~$ sudo chown www-data:www-data /var/www/drupal/sites/default/files
9. Create the initial configuration files.
varsha@varsha-laptop:~$ sudo cp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php
10. Change the owner of the file settings.php.
varsha@varsha-laptop:~$ sudo chown www-data:www-data /var/www/drupal/sites/default/settings.php
11. Create a database drupal6 using phpMyAdmin.
varsha@varsha-laptop:~$ mysqladmin -u root -p create drupal6
12. Log in to MySQL if you already have lamp-server installed on your system.
varsha@varsha-laptop:~$ 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.
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.