Next Tutorial
Drupal 7 Tutorial Part 16: Drupal 7 Reports & Logs Explained
How to install Drupal 6 on linux Operating System
Hi Everyone,
I am giving the step by step instructions to install Drupal 6 on linux machine. I am giving this steps for Ubuntu 9.10. For any other linux forks you need some small changes.
Apache Installation:
Step 1: Install apache 2 by entering this command in linux terminal.
~$> sudo apt-get install apache2
Step 2: Now apache is installed and running in your system. You can verify this by typing this url on your bowser.
http://localhost/ . It will show the message It works!
Optionally you can check the apache status by entering the below command in terminal.
~$> sudo /etc/init.d/apache2 status
On successful it will show * Apache is running
Step 3: You can any time stop or start or restart apache using the below commands. For drupal to run you need to ensure apache is started and running.
Command to start : ~$> sudo /etc/init.d/apache2 start
Command to stop : ~$> sudo /etc/init.d/apache2 stop
Command to restart : ~$> sudo /etc/init.d/apache2 restart
MySQL Installation:
Step 1: Install MySQL by entering this command in linux terminal.
~$> sudo apt-get install mysql-server-5.1
Step 2: Now MySQL is installed and running in your system.
Optionally you can check the mysql status by entering the below command in terminal.
~$> sudo /etc/init.d/mysql status
On successful it will show
Server version 5.1.37-1ubuntu5.1
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/mysqld/mysqld.sock
Uptime: 3 min 30 sec
Step 3: You can any time stop or start or restart MySQL using the below commands. For drupal to run you need to ensure MySQL is started and running.
Command to start : ~$> sudo /etc/init.d/mysql start
Command to stop : ~$> sudo /etc/init.d/mysql stop
Command to restart : ~$> sudo /etc/init.d/mysql restart
PHP Installation:
Step 1 : Execute these commands in linux terminal.
~$> sudo apt-get install php5
~$> sudo apt-get install libapache2-mod-php
~$> sudo aptitude install php5-mysql
Step 2 : Restart apache and mysql
~$>sudo /etc/init.d/apache2 restart
~$>sudo /etc/init.d/mysql restart
Step 3 : Create a file info.php in /var/www folder with the below code.
<?php
echo phpinfo();
?>
On successful installation of php you will see configuration of php in http://locahost/info.php
PHPMYADMIN INSTALLATION:
Step 1 : Run this command in terminal
~$>sudo aptitude install phpmyadmin
Step 2 : Select Apache as default webserver from the dialog popup.
Step 3 : Restart Apache
~$>sudo /etc/init.d/apache2 restart
Step 4 : Navigate to http://localhost/phpmyadmin You can able to see the phpmyadmin wizard.
Drupal 6 Installation:
Step 1: Download latest drupal 6 from drupal.org
Step 2: Place the downloaded folder in /var/www and exract the contents fro downloaded tar file.
Step 3: Create a database name called druapl6 in mysql using phpmyadmin wizard.
Step 4: Navigate to http://localhost/drupal-6.15/ and follow the instructions.
Step 5: Navigate to /var/www/drupal-6.15/sites/default and copy default.settings.php at the same location and rename it to settings.php and refresh the page to continue installation.
Step 6: Change the permissions of sites/default according to instructions and continue installation. Provide mysql details to install drupal 6.
Step 7: To enable clean urls, enable rewrite_module of apache using command
~$> a2enmod rewrite
~$> sudo gedit /etc/apache2/sites-available/default
Replace AllowOverride None to AllowOverride All
Restart Apache
Enable the clean urls in drupal after installation by navigating to http://localhost/drupal-6.15/admin/settings/clean-urls
Now drupal is installed and successfully running !!
If you have any issues just leave a comment.
Cheers,
Anil Sagar

3 comments
Thanks for the post
Thanks for the post I found it very interesting and exceptionally helpful as I run a Presentation Training Company.
re:
Nice post. What kind of blog platform is this? I don't think its wordpress. Where did you get your template? Is it prebuilt?
Jesse - PDF Search
re:
Such articles do help to liberalize and I want to thank you for that! But to understand the details, one should read a lot of literature, which is not enough in the internet. To make the search easier, you may find more linux manuals at pdfph.com and make use of their pdf ebook search engine.