Magento 1.7 Multiple Sites Install on Ubuntu Linux

How To Install Multiple Stores in Magento 1.7
These are my notes. I do not profess to be a professional Magento developer.

This guide is for a pure SSH install using Rsync. Now given that you are proficient with SSH and command line Linux, the install of Magento is not difficult if you also can:

Create a MySQL database, user and grant privileges
Create a VirtualHost in Apache2

Download Magento from the Magento site
Unzip the package
Use Rsync to copy the unziped directory to your server

Many online guides use in their examples /magento/ or /public_html/ as root folders, I use the Apache root and a domain folder like this /var/www/ – I do not use this domain for any store so you can name this whatever you like.

Create a folder for each site. re. /var/www/
Copy the index.php and .htaccess files in to both and

SO: we have 3 sites. the Default, Bigstore and Littlestore

You need to edit the code in each site:
in add this code to index.php

To both and
change index.php lines

Create Admin and database connection in Magento Setup

Creating the websites in the Magento admin, along with a store and store view

Configuring the URL structure of the new site

Add categories and products
Associate products with the new website