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:
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
The hostname that the Drupal database will reside on is:
The Drupal databases are:
Drupal administration ID: somesite_admin
Drupal administration password: saadmin952
Administration ID e-mail: email@example.com
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.
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.
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
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.
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:firstname.lastname@example.org/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’;
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:email@example.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’;
FTP the Drupal files to the server into the somesite.com directory.
Telnet to the server.
Remove the dev.somesite.com directory that was created when the subdomain was created in the Dreamhost control panel.
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)
Change to the somesite.com directory.
Issue the command: chmod 777 sites
Change to the sites directory (somesite.com/sites).
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.
Go into the somesite.com/sites/default directory and issue the command: chmod 777 settings.php
Go into the somesite.com/sites/dev.somesite.com and issue the command: chmod 777 settings.php
Do not close your telnet session yet, you will need it a couple steps later.
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.
In the telnet session, change to the somesite.com directory.
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.)
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.