manGNU Herds - Free Software Association - Cookbook: recipe #154, How to install the PostgreSQL data...


recipe #154: How to install the PostgreSQL data base?

From scratch:

1. Create the database:

su -
su - postgres
createdb gnuherds

2. Create a superuser (Use the same 'User' name from your httpd.conf, usually "www-data"):

psql gnuherds

3. Grant all privileges:

GRANT ALL ON DATABASE gnuherds TO "www-data";

4. Quit psql:

5. Create the initial state of the database. For this, you'll need to edit the grant lines in
to fit with your Apache user. Warning: Note the DROPs at the head. All data will be deleted. Run the resulting script:

psql gnuherds < GNUHerds__SQL_Implementation.sql > stdout 2> stderr

If you are installing your development environment, adding some skills, and maybe other data (users with resumes and job offers?), to the data base will make your development tasks easier:

psql gnuherds < dev/skills.sql > stdout 2> stderr

If you are installing the production environment, you should load the data base with the last backup copy.

6. Carry out this step only if you are installing a development environment. Do not do it at the production environment:

The data base have to be loaded with some Skills to avoid webapp crashes. The Layer-0__Site_entry_point/doc/dev/skills.sql file is used to load it in development environments.

* add some skills to the data base:

psql gnuherds_dev < dev/skills.sql > stdout 2> stderr

* register some user in the data base. You have to have the 'sendmail' interface working in your system. Ask at the "gnuherds-app-dev AT" email list if you need help.

7. Check that stderr and stdout do not show errors. See the PostgreSQL 8.2 documentation, specially the section about foreign keys.

Last update: Sat 14 Jun 2008 09:06:49 PM UTC






Audience and Context

   Anonymous Users, Logged-in Users, All Project Members, Project Members who are technicians, Project Members who are managers

(As there is at least one of the Audience/Feature/Action context information not set, this recipe will not show up in related recipes links)

Back to the top

Powered by Savane 3.1-cleanup1