--- INSTALL.txt.old 2005-04-23 00:07:49.000000000 -0500 +++ INSTALL.txt 2005-06-26 12:10:02.000000000 -0500 @@ -52,17 +52,17 @@ mv drupal-x.x.x/* drupal-x.x.x/.htaccess /var/www/html -2. CREATE THE DRUPAL DATABASE +2. CREATE THE DRUPAL DATABASE (MySQL -- skip to 2p for PostgreSQL) This step is only necessary if you don't already have a database set-up (e.g. by your host). If you control your databases through a web-based control panel, check its documentation for creating databases, as the following instructions are for the command-line only. - These instructions are for MySQL. If you are using another database, - check the database documentation. In the following examples, - 'dba_user' is an example MySQL user which has the CREATE and GRANT - privileges. Use the appropriate user name for your system. + These instructions are for MySQL. If you are using PostgreSQL, please + skip to step 2p, and if using another database, check the database documentation. + In the following examples, 'dba_user' is an example MySQL user + which has the CREATE and GRANT privileges. Use the appropriate user name for your system. First, you must create a new database for your Drupal site (here, 'drupal' is the name of the new database): @@ -97,7 +97,31 @@ and then enter '\q' to exit MySQL. -3. LOAD THE DRUPAL DATABASE SCHEME +2p. CREATE THE DRUPAL DATABASE (PostgreSQL-- skip to 3 if using MySQL) + + This step is only necessary if you don't already have a database + set-up (e.g. by your host). If you control your databases through a + web-based control panel, check its documentation for creating databases, + as the following instructions are for the command-line only. + + These instructions are for PostgreSQL. If you are using MySQL, please + go back to step 2, check the database documentation. In the following examples, + 'dba_user' is an example PgSQL user which has the CREATE and GRANT + privileges. Use the appropriate user name for your system. + + First, you must create a new database for your Drupal site + (here, 'drupal' is the name of the new database) -- dba_user will be + the owner of the new database (unless you change --owner dba_user to something else) + + PostgreSQL will prompt for the 'dba_user' database password and then create + the initial database files: + + createdb --username dba_user --password --owner dba_user drupal + + Now you have created the new database 'drupal' (unless you set otherwise) with + 'dba_user' as the owner (unless you set otherwise). + +3. LOAD THE DRUPAL DATABASE SCHEME (MySQL -- skip to 3p for PostgreSQL) Once you have a database, you must load the required tables into it. @@ -110,6 +134,28 @@ mysql -u nobody -p drupal < database/database.mysql +3p. LOAD THE DRUPAL DATABASE SCHEMA (PostgreSQL -- go back to 3 for MySQL) + + Once you have a database, you must load the required tables into it. + For PostgreSQL we must also load some functions into the "public" schema, + so first we will need to load the plpgsql language into the database: + + createlang plpgsql drupal + + If you use a web-based control panel, you should be able + to upload the file 'database.pgsql' from Drupal's 'database' + directory and run it directly as SQL commands. + + From the command line, use (again, replacing 'nobody' and + 'drupal' with your MySQL username and name of your database, and replacing + 'myDrupalSchema' with the name of the schema you want to use for drupal): + + mysql -u nobody -p drupal < database/database.mysql + + cat database/database.pgsql | sed 's/__drupal_schema__/myDrupalSchema/' | psql -U nobody -W drupal + + Note: psql will create the schema 'myDrupalSchema' for you, you can always rename using 'ALTER SCHEMA' + 4. CONNECTING DRUPAL The default configuration can be found in the @@ -123,7 +169,13 @@ where 'username', 'password', 'localhost' and 'database' are the username, password, host and database name for your set up. - Set $base_url to match the address to your Drupal site: + If you are using PostgreSQL and you didn't install drupal into the public schema: + + $db_prefix = 'myDrupalSchema.'; + + Where myDrupalSchema is the name of the schema you installed drupal into (leave the period). + + Then (for any database), set $base_url to match the address to your Drupal site: $base_url = "http://www.example.com";