- Patch #25792 by Cvbge and Morbus: improved the installation instructions for PostgreSQL.
parent
5cf74ccb72
commit
924dda1fa4
|
@ -0,0 +1,73 @@
|
||||||
|
// $Id$
|
||||||
|
|
||||||
|
CONTENTS OF THIS FILE
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
* Introduction
|
||||||
|
* Installation and configuration:
|
||||||
|
- Database and user creation
|
||||||
|
- Drupal schema loading
|
||||||
|
|
||||||
|
INTRODUCTION
|
||||||
|
------------
|
||||||
|
|
||||||
|
This file describes how to create a MySQL database for Drupal.
|
||||||
|
|
||||||
|
If you control your databases through a web-based control panel,
|
||||||
|
check its documentation, as the following instructions are for the
|
||||||
|
command line only.
|
||||||
|
|
||||||
|
INSTALLATION AND CONFIGURATION
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
1. CREATE THE DRUPAL DATABASE
|
||||||
|
|
||||||
|
This step is only necessary if you don't already have a database
|
||||||
|
set-up (e.g. by your host). 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, 'databasename' is the name of the new database):
|
||||||
|
|
||||||
|
mysqladmin -u dba_user -p create databasename
|
||||||
|
|
||||||
|
MySQL will prompt for the 'dba_user' database password and then create
|
||||||
|
the initial database files. Next you must login and set the access
|
||||||
|
database rights:
|
||||||
|
|
||||||
|
mysql -u dba_user -p
|
||||||
|
|
||||||
|
Again, you will be asked for the 'dba_user' database password.
|
||||||
|
At the MySQL prompt, enter following command:
|
||||||
|
|
||||||
|
GRANT ALL PRIVILEGES ON databasename.*
|
||||||
|
TO username@localhost IDENTIFIED BY 'password';
|
||||||
|
|
||||||
|
where
|
||||||
|
|
||||||
|
'databasename' is the name of your database
|
||||||
|
'username@localhost' is the username of your MySQL account
|
||||||
|
'password' is the password required for that username
|
||||||
|
|
||||||
|
If successful, MySQL will reply with:
|
||||||
|
|
||||||
|
Query OK, 0 rows affected
|
||||||
|
|
||||||
|
To activate the new permissions, enter the following command:
|
||||||
|
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
|
||||||
|
2. LOAD THE DRUPAL DATABASE SCHEMA
|
||||||
|
|
||||||
|
Once you have a database, you must load the required tables into it.
|
||||||
|
|
||||||
|
If you use a web-based control panel, you should be able to upload
|
||||||
|
the file 'database.mysql' from Drupal's 'database' directory and
|
||||||
|
run it directly as SQL commands.
|
||||||
|
|
||||||
|
From the command line, use (again, replacing 'username' and
|
||||||
|
'databasename' with your MySQL username and database name):
|
||||||
|
|
||||||
|
mysql -u username -p databasename < database/database.mysql
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
// $Id$
|
||||||
|
|
||||||
|
CONTENTS OF THIS FILE
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
* Introduction
|
||||||
|
* Installation and configuration:
|
||||||
|
- Database and user creation
|
||||||
|
- PL/pgSQL procedural language installation
|
||||||
|
- Drupal schema loading
|
||||||
|
|
||||||
|
INTRODUCTION
|
||||||
|
------------
|
||||||
|
|
||||||
|
This file describes how to create a PostgreSQL database for Drupal.
|
||||||
|
|
||||||
|
If you control your databases through a web-based control panel,
|
||||||
|
check its documentation, as the following instructions are for the
|
||||||
|
command line only.
|
||||||
|
|
||||||
|
INSTALLATION AND CONFIGURATION
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
1. CREATE DATABASE USER
|
||||||
|
|
||||||
|
This step is only necessary if you don't already have a user setup
|
||||||
|
(e.g. by your host) or you want to create new user for use with Drupal
|
||||||
|
only. The following command creates a new user named "username" and
|
||||||
|
asks for a password for that user:
|
||||||
|
|
||||||
|
createuser --pwprompt --encrypted --no-adduser --no-createdb username
|
||||||
|
|
||||||
|
If everything works correctly, you'll see a "CREATE USER" notice.
|
||||||
|
|
||||||
|
2. CREATE THE DRUPAL DATABASE
|
||||||
|
|
||||||
|
This step is only necessary if you don't already have a database
|
||||||
|
setup (e.g. by your host) or you want to create new database for
|
||||||
|
use with Drupal only. The following command creates a new database
|
||||||
|
named "databasename", which is owned by previously created "username":
|
||||||
|
|
||||||
|
createdb --encoding=SQL_ASCII --owner=username databasename
|
||||||
|
|
||||||
|
If everything works correctly, you'll see a "CREATE DATABASE" notice.
|
||||||
|
|
||||||
|
3. INSTALL THE PL/pgSQL LANGUAGE
|
||||||
|
|
||||||
|
You must also install the PL/pgSQL language if it does not exist:
|
||||||
|
|
||||||
|
createlang plpgsql databasename
|
||||||
|
|
||||||
|
If everything works correctly, you won't see any messages. It is
|
||||||
|
possible that the PL/pgSQL language was already installed; if so,
|
||||||
|
running the above command would give you the following error:
|
||||||
|
|
||||||
|
createlang: language "plpgsql" is already
|
||||||
|
installed in database "databasename"
|
||||||
|
|
||||||
|
4. LOAD THE DRUPAL DATABASE SCHEMA
|
||||||
|
|
||||||
|
Once the database has been created, load the required tables into it:
|
||||||
|
|
||||||
|
psql -q -f database/database.pgsql databasename username
|
||||||
|
|
||||||
|
If everything works correctly, you won't see any messages.
|
||||||
|
|
83
INSTALL.txt
83
INSTALL.txt
|
@ -24,7 +24,7 @@ are possible but tested to a lesser extent.
|
||||||
OPTIONAL REQUIREMENTS
|
OPTIONAL REQUIREMENTS
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
- To use XML-based services such as the Blogger API, Jabber, RSS
|
- To use XML-based services such as the Blogger API, Jabber, and RSS
|
||||||
syndication, you will need PHP's XML extension. This extension is
|
syndication, you will need PHP's XML extension. This extension is
|
||||||
enabled by default in standard PHP4 installations.
|
enabled by default in standard PHP4 installations.
|
||||||
|
|
||||||
|
@ -51,77 +51,28 @@ INSTALLATION
|
||||||
|
|
||||||
mv drupal-x.x.x/* drupal-x.x.x/.htaccess /var/www/html
|
mv drupal-x.x.x/* drupal-x.x.x/.htaccess /var/www/html
|
||||||
|
|
||||||
2. CREATE THE DRUPAL DATABASE
|
2. CREATE AND PREPARE THE DRUPAL DATABASE
|
||||||
|
|
||||||
This step is only necessary if you don't already have a database
|
Before you proceed to the next step you should know:
|
||||||
set-up (e.g. by your host). If you control your databases through a
|
- "username" - the username for connecting to the database
|
||||||
web-based control panel, check its documentation for creating databases,
|
- "password" - the password for that username
|
||||||
as the following instructions are for the command-line only.
|
- "databasename" - the name of the database
|
||||||
|
|
||||||
These instructions are for MySQL. If you are using another database,
|
Depending on the database of your choice, please read either
|
||||||
check the database documentation. In the following examples,
|
INSTALL.mysql.txt (for MySQL) or INSTALL.pgsql.txt (for PostgreSQL).
|
||||||
'dba_user' is an example MySQL user which has the CREATE and GRANT
|
|
||||||
privileges. Use the appropriate user name for your system.
|
3. CONNECTING DRUPAL
|
||||||
|
|
||||||
First, you must create a new database for your Drupal site
|
|
||||||
(here, 'drupal' is the name of the new database):
|
|
||||||
|
|
||||||
mysqladmin -u dba_user -p create drupal
|
|
||||||
|
|
||||||
MySQL will prompt for the 'dba_user' database password and then create
|
|
||||||
the initial database files. Next you must login and set the access
|
|
||||||
database rights:
|
|
||||||
|
|
||||||
mysql -u dba_user -p
|
|
||||||
|
|
||||||
Again, you will be asked for the 'dba_user' database password.
|
|
||||||
At the MySQL prompt, enter following command:
|
|
||||||
|
|
||||||
GRANT ALL PRIVILEGES ON drupal.*
|
|
||||||
TO nobody@localhost IDENTIFIED BY 'password';
|
|
||||||
|
|
||||||
where
|
|
||||||
|
|
||||||
'drupal' is the name of your database
|
|
||||||
'nobody@localhost' is the username of your webserver MySQL account
|
|
||||||
'password' is the password required to log in as the MySQL user
|
|
||||||
|
|
||||||
If successful, MySQL will reply with:
|
|
||||||
|
|
||||||
Query OK, 0 rows affected
|
|
||||||
|
|
||||||
To activate the new permissions you must enter the command:
|
|
||||||
|
|
||||||
flush privileges;
|
|
||||||
|
|
||||||
and then enter '\q' to exit MySQL.
|
|
||||||
|
|
||||||
3. LOAD THE DRUPAL DATABASE SCHEME
|
|
||||||
|
|
||||||
Once you have a database, you must load the required tables into it.
|
|
||||||
|
|
||||||
If you use a web-based control panel, you should be able
|
|
||||||
to upload the file 'database.mysql' 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):
|
|
||||||
|
|
||||||
mysql -u nobody -p drupal < database/database.mysql
|
|
||||||
|
|
||||||
4. CONNECTING DRUPAL
|
|
||||||
|
|
||||||
The default configuration can be found in the
|
The default configuration can be found in the
|
||||||
'sites/default/settings.php' file within your Drupal installation.
|
'sites/default/settings.php' file within your Drupal installation.
|
||||||
Before you can run Drupal, you must set the database URL and the
|
Before you can run Drupal, you must set the database URL and the
|
||||||
base URL to the web site. Open the configuration file and edit the
|
base URL to the web site. Open the configuration file and edit the
|
||||||
$db_url line to match the database defined in the previous steps:
|
$db_url line to match the database defined in the previous step:
|
||||||
|
|
||||||
$db_url = "mysql://username:password@localhost/database";
|
$db_url = "mysql://username:password@localhost/databasename";
|
||||||
|
|
||||||
where 'username', 'password', 'localhost' and 'database' are the
|
|
||||||
username, password, host and database name for your set up.
|
|
||||||
|
|
||||||
|
If you use PostgreSQL, change "mysql" to "pgsql" in the above line.
|
||||||
|
|
||||||
Set $base_url to match the address to your Drupal site:
|
Set $base_url to match the address to your Drupal site:
|
||||||
|
|
||||||
$base_url = "http://www.example.com";
|
$base_url = "http://www.example.com";
|
||||||
|
@ -173,7 +124,7 @@ INSTALLATION
|
||||||
in the standard 'modules' and 'themes' directories. To use
|
in the standard 'modules' and 'themes' directories. To use
|
||||||
site-specific modules or themes, simply create a 'modules' or
|
site-specific modules or themes, simply create a 'modules' or
|
||||||
'themes' directory within the site configuration directory. For
|
'themes' directory within the site configuration directory. For
|
||||||
example, if sub.example.dom has a custom theme and a custom module
|
example, if sub.example.com has a custom theme and a custom module
|
||||||
that should not be accessible to other sites, the setup would look
|
that should not be accessible to other sites, the setup would look
|
||||||
like this:
|
like this:
|
||||||
|
|
||||||
|
@ -185,7 +136,7 @@ INSTALLATION
|
||||||
NOTE: for more information about multiple virtual hosts or the
|
NOTE: for more information about multiple virtual hosts or the
|
||||||
configuration settings, consult the Drupal handbook at drupal.org.
|
configuration settings, consult the Drupal handbook at drupal.org.
|
||||||
|
|
||||||
5. CONFIGURE DRUPAL
|
4. CONFIGURE DRUPAL
|
||||||
|
|
||||||
You should consider creating a "files" subdirectory in your Drupal
|
You should consider creating a "files" subdirectory in your Drupal
|
||||||
installation directory. This subdirectory stores files such as
|
installation directory. This subdirectory stores files such as
|
||||||
|
@ -199,7 +150,7 @@ INSTALLATION
|
||||||
Create an account and login. The first account will automatically
|
Create an account and login. The first account will automatically
|
||||||
become the main administrator account with total control.
|
become the main administrator account with total control.
|
||||||
|
|
||||||
6. CRON TASKS
|
5. CRON TASKS
|
||||||
|
|
||||||
Many Drupal modules (such as the search functionality) have periodic
|
Many Drupal modules (such as the search functionality) have periodic
|
||||||
tasks that must be triggered by a cron job. To activate these tasks,
|
tasks that must be triggered by a cron job. To activate these tasks,
|
||||||
|
|
Loading…
Reference in New Issue