I googled many times to get the correct procedure to install multiple sites under Drupal and after so many attempts I successfully got a exact procedure to do this..
Follow the steps as it is mentioned here..
1. Open the ‘sites‘ folder under your drupal’s main installation folder..
2. Create a new folder and give a site name to it, like site2.localhost
3. Under site2.localhost folder create another folder called files.
4. Now from “./sites/defaults/” folder copy the “default.settings.php” file to the site2.localhost folder and rename it to “settings.php” .
5. Now open your Terminal and type the following commands…
sudo mysqladmin -u root -p create drusite2
Give your sudo password.. your new database with name “drusite2” will be created under phpmydmin.
6. Now you have to create a symbolic link.. Open terminal and change your directory to ./sites under main drupal folder. Type the following in Your terminal.
Here my main drupal directory is under the workspace folder home directory..Please change the the directory names because the path should be correct as it is in your System.. Now type the following Command to create symbolic link.
ln -s ~/site2.localhost.6
Create an entry in the hosts file
To make it possible to run a number of local Drupal sites simultaneously, each site must have its own hostname. To add a new hostname, open a terminal window and run the following command to open the hosts file in a text editor:
sudo gedit /etc/hosts
Since we’re setting up drupal6.18, we’ll add the hostname drupal6.18 to the hosts file and have it point at the local web server on the IP address 127.0.0.1.
Save the file and exit the text editor when you have added the hostname.
7. Next you have to create virtual site for your new site . Type the following command in your terminal…
sudo gedit site2.localhost
A gedit texeditor will open with the site2.localhost filename. Enter the following virtual host definition and save the file:
The ServerName must match the hostname you added to the hosts file, and the DocumentRoot must match the name of the folder where Drupal is installed. Replace with the username you use to log in to the local machine (on this machine it got replaced by akinza).
When you have saved the file, you can run the following commands in a terminal window to enable the new virtual host and reload the Apache configuration:
sudo a2ensite site2.localhost
sudo /etc/init.d/apache2 reload
8. Now open your browser and type the site name(
http://site2.localhost) folow the installation procedure…
And Enjoy and install multiple site using only one drupal installer.