Drupal-lovers

Who love to Drupal

Multi-site on Linux

Posted by drupallovers on February 28, 2012

Software installed:

  • Drupal 6
  • Apache 1.3
  • Red Hat 6.1 (Although other distributions will work)
  • PHP5
  • PostgreSQL 7.4

The process:

(You may get more specific explanation in your Linux distribution documentation.https://help.ubuntu.com/community/Drupal
http://wiki.mandriva.com/en/Local_multi-site_installation_of_Drupal
etc.)

  1. Install the Drupal core download from Drupal.org.
  2. Install default Drupal site. I created mine with a “dummyUSER” user and “dummyDB” database with Drupal code in apache/htdocs/drupal
  3. Once you have this working then create a new dir “example1.com” directly under “sites” dir.
    mkdir sites/example1.com
    cp -R sites/default/*  sites/example1.com/
  4. Create a new database “example1DB” and new user “example1USER” in database.
  5. Edit the sites/example1.com/settings.php and change the following:
    • $db_url = 'pgsql://dummyUSER:dummyPSSWDl@localhost/dummyDB';
      to $db_url = 'pgsql://example1USER:example1PSSWDl@localhost/example1DB';
    • (this step is optional, normally Drupal will recognise the base url automatically):
      # $base_url = 'http://www.example.com';
      to $base_url = 'http://www.example1.com'; (Remove the ‘#’ [comment])
  6. cp apache/htdocs/drupal/install.php to apache/htdocs/drupal/sites/example1.com/
  7. Point your browser to www.example1.com. Drupal will show you lot of errors.
  8. Once it shows you errors you are all good. Just point your browser towww.example1.com/install.php and it will present you the installation screen. Install from there on.
  9. Repeat the above process for www.example2.com

Note
If it says the site is offline then your database information in settings.php is not correct. If it says site not found then your base url in settings.php is not correct.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: