Here is a guide to install Drupal 6 on a LAMP server on Ubuntu 10.04 LTS. Before installing you have to make sure that port 80 is forwarded (you can do this in your modem/router) to the ip adress of the pc that you want to use for your website. How to do that depends on the modem/router you are having, to find out how to forward a port read the manual that came with it.
Before you can install Drupal you need to create a database, open your web browser and copy+paste the following url into your browser:
http://localhost/phpmyadmin
As username fill in: root and the password is the password you used when installing phpMyAdmin.
To create a database fill in a name and click on the Create button
Your database is created, now click on the house icon to go back to phpMyAdmin homepage
As you can see the database has been created. Before downloading Drupal you need to change the ownership and permissions from your var/www folder. Open a Terminal window (Applications -> Accessories -> Terminal) and copy+paste the following line:
sudo chown -R YOURUSERNAME /var/www
Now download the latest version of Drupal 6, the version i am using is 6.19. To download this version copy+paste the following line in your Terminal window:
wget http://drupal.org/files/projects/drupal-6.19.tar.gz
When the download is finished copy+paste the following line:
tar -zxvf drupal-6.19.tar.gz
When finished extracting the files copy+paste the following line in your Terminal window:
mv drupal-6.19/* /var/www/
Now we are finished downloading and moving Drupal 6.19 into your var/www folder. The next step is installing Drupal…
You must create a file named settings.php. You may do so by making a copy of default.settings.php (or create an empty file with this name in the same directory) in your var/www/sites/default folder. Click with your left mouse in the folder window and go to Create Document and select Empty File then save the file as settings.php.
Next, give the web server write privileges to the sites/default/settings.php file. To do this copy+paste the following lines in your Terminal window:
cd /var/www
chmod o+w sites/default/settings.php
So that the files directory can be created automatically, give the web server write privileges to the sites/default directory. In your Terminal window copy+paste the following line:
chmod o+w sites/default
Now that all the files and folders have the right permissions we can install Drupal
In your web browser enter the IP adress of the pc you are installing Drupal on (my IP is 192.168.1.102) followed by /install.php (so my url will be 192.168.1.102/install.php)
Click on Install Drupal in English
Fill in the name of the database you created, database username and the database password (the same password you used to login to phpMyAdmin). Click on the Save and continue button to isntall Drupal.
As you can see there is a nice little red text saying: “All necessary changes to ./sites/default and ./sites/default/settings.php have been made, so you should remove write permissions to them now in order to avoid security risks. If you are unsure how to do so, please consult the on-line handbook.” To fix this copy+paste the following line in your Terminal window:
cd var/www
chmod a-w sites/default/settings.php
chmod a-w sites/default
Refresh your web browser and if all went well the red text is gone and you can configure your Drupal site
Fill in all the questions and when finished scroll down and click on the Save button
Now your done and Drupal is installed and ready to use. Click on the text: your new website to go to… your new website!!