How I installed Drupal by hand

apps

#1

Drupal is a pretty awesome application. The basic installation available on Dreamhost through the one-click install doesn’t allow for much customization (they even mention it on the one-click install panel). To get the ability to customize Drupal, you will need to install it by hand. These are the steps that I did to do the installation. You can use these as a guide for your installation but don’t hold me responsible if anything goes wrong. All names used in these instructions can be modified to meet your needs.

This will install Drupal onto two sites:
www.somesite.com
dev.somesite.com

The setup is a multisite setup for Drupal that uses separate databases but the same codebase (see http://drupal.org/getting-started/6/install/multi-site).

The instructions will install it first on the www domain and then set up a multisite on the dev domain.

The domains the Drupal sites will run on
www.somesite.com
dev.somesite.com

The hostname that the Drupal database will reside on is:
drupal.somesite.com

The Drupal databases are:
somesite_drupal
somesite_dev_drupal

Drupal administration ID: somesite_admin
Drupal administration password: saadmin952
Administration ID e-mail: admin@somesite.com

  1. Create the two site domains
    a. Create the somesite.com domain under the Dreamhost Manage Domains panel.
    b. Create the dev.somesite.com as a subdomain under somesite.com.

  2. Create the database hostname drupal.somesite.com under the Dreamhost Manage MySQL panel. Wait for the DNS entries to catch up. Should take only a few minutes.

  3. On the Manage MySQL panel, under “Create a new MySQL database” create the first database with the following entries:
    Database Name: somesite_drupal
    Use Hostname: drupal.somesite.com
    First User: Create a new user now…
    New Username: somesite_admin
    New Password: saadmin952
    New Password Again: saadmin952

  4. Create the second database called somesite_dev_drupal using the same settings for hostname and user as the previous step.

NOTE: If the last two steps didn’t work correctly, make sure you have given the DNS enough time to recognize the new hosts.

  1. Before copying the files to the server, prepare the www installation files on your local hard drive.
    a. In the Drupal folder under the sites/default directory, copy the default.settings.php file to settings.php.
    b. On the line that begins with “$db_url =” enter the mysql connection string. The line will look like:
    $db_url = ‘mysql://somesite_admin:saadmin952@drupal.somesite.com/somesite_drupal’;
    c. On the line that begins with “$base_url =” enter the site URL. The line will look like:
    $base_url = ‘http://www.somesite.com’;

  2. Prepare the dev installation files.
    a. In the Drupal folder under the sites directory, create a folder called dev.somesite.com.
    b. Copy the settings.php from the default folder to the dev.somesite.com folder.
    c. On the line that begins with “$db_url =” enter the mysql connection string. The line will look like:
    $db_url = ‘mysql://somesite_admin:saadmin952@drupal.somesite.com/somesite_dev_drupal’;
    d. On the line that begins with “$base_url =” enter the site URL. The line will look like:
    $base_url = ‘http://dev.somesite.com’;

  3. FTP the Drupal files to the server into the somesite.com directory.

  4. Telnet to the server.

  5. Remove the dev.somesite.com directory that was created when the subdomain was created in the Dreamhost control panel.

  6. Create a symbolic link by issuing the command: ln -s somesite.com dev.somesite.com
    (If you need to remove the link, issue the command: unlink dev.somesite.com)

  7. Change to the somesite.com directory.

  8. Issue the command: chmod 777 sites

  9. Change to the sites directory (somesite.com/sites).

  10. Issue the commands: chmod 777 default and chmod 777 dev.somesite.com

NOTE: The dev.somesite.com directory should have been created when the files were copied to the server. If it wasn’t you will need to create it and ensure the settings.php file is in the directory.

  1. Go into the somesite.com/sites/default directory and issue the command: chmod 777 settings.php

  2. Go into the somesite.com/sites/dev.somesite.com and issue the command: chmod 777 settings.php

  3. Do not close your telnet session yet, you will need it a couple steps later.

  4. Open a browser window, go to http://www.somesite.com/install.php and follow the installation instructions on http://drupal.org/getting-started/6/install/run-script. For the database name, use somesite_drupal.

  5. In the telnet session, change to the somesite.com directory.

  6. Issue the command: chmod 777 sites (Note, during the install a couple steps ago, the process changes the permissions on the directory. I believe this folder needs to have the permissions opened up for the install.)

  7. In your browser window, go to http://dev.somesite.com/install.php and follow the installation instructions again.

If you have any problems with the installation, make sure that you have given the DNS enough time to recognize the new hostnames. If for any reason you need to redo the installation, you can easily drop all the tables in the databases and if necessary, remove the site files.

If you have given the DNS enough time to propagate the new host names, there may be a problem on the hosting side. Recently when I did a Drupal install it happened to be at a time when Dreamhost was experiencing database issues. The installation failed miserably and the only fix was to wait for the problems to clear up and then attempt a reinstall.

Good luck and let me know if this works for you. :slight_smile:


#2

At first glance, this differs from what’s in the wiki. Did the wiki entry not work for you?
http://wiki.dreamhost.com/Drupal

-Scott


#3

Hi Scott,
When I installed Drupal 6 I did look at the Wiki and determined that the information did not meet my needs. The Wiki covers versions 4, 5 & 6 of Drupal.

The Drupal 6.2 “Easy Mode” One-Click Installation installs Drupal using one-click which worked rather well. But as it points out, there are some restrictions about the current one-click install in that it has limited freedom with themes and modules.

The Drupal 6 Installation instructions were way too brief for an effective install.

The Drupal 4.7.3 or 5.0 Installation with Dreamhost instructions had some useful information albeit it was not geared to version 6 and there were steps that could have been done more succinctly for clarity. Some of the steps in this section do not apply to version 6.

The instructions I wrote in this post where based on what I found on the Dreamhost Wiki, the Drupal.org web site and then repeating the steps by installing Drupal a few times on my site to ensure I had everything done.