GNU Herds - Free Software Association - Cookbook: recipe #154, How to install the PostgreSQL data...
You are not allowed to post comments on this tracker with your current authentication level.
recipe #154: How to install the PostgreSQL data base?
Submitter: | Davi Leal <davi> | ||
Submitted: | Thu 26 Apr 2007 09:17:27 PM UTC | ||
Category: | None | Importance: | 3 - Normal |
Status: | Approved | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
Follow 23 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2008-06-14 | davi | Recipe | From scratch: 1.... | ![]() |
+10 chars |
2008-06-14 | davi | Recipe | From scratch: 1.... | ![]() |
+69 chars |
2008-06-14 | davi | Recipe | From scratch: 1.... | ![]() |
+1 chars |
2008-06-14 | davi | Recipe | From scratch: 1.... | ![]() |
+2 chars |
2008-06-14 | davi | Summary/Question | How to install the PostgreSQL data base | ![]() |
How to install the PostgreSQL data base? |
2008-06-14 | davi | Summary/Question | Howto install the PostgreSQL data base | ![]() |
How to install the PostgreSQL data base |
2008-06-14 | davi | Summary/Question | The PostgreSQL data base | ![]() |
Howto install the PostgreSQL data base |
2007-12-08 | davi | Recipe | From scratch: 1.... | ![]() |
+37 chars |
2007-12-08 | davi | Recipe | From scratch: 1.... | ![]() |
+0 chars |
2007-12-08 | davi | Recipe | From scratch: 1.... | ![]() |
+12 chars |
2007-12-08 | davi | Recipe | From scratch: 1.... | ![]() |
+323 chars |
2007-11-25 | davi | Recipe | From scratch: 1.... | ![]() |
-1 chars |
2007-10-07 | davi | Recipe | From scratch: 1.... | ![]() |
+4 chars |
2007-10-07 | davi | Recipe | From scratch: 1.... | ![]() |
+26 chars |
2007-10-07 | davi | Recipe | From scratch: 1.... | ![]() |
+120 chars |
2007-10-07 | davi | Recipe | From scratch: 1.... | ![]() |
+208 chars |
2007-10-07 | davi | Recipe | From scratch: 1.... | ![]() |
+18 chars |
2007-10-07 | davi | Recipe | From scratch: 1.... | ![]() |
+243 chars |
2007-04-26 | davi | Recipe | From scratch: 1.... | ![]() |
+8 chars |
2007-04-26 | davi | Recipe | From scratch: 1.... | ![]() |
+4 chars |
2007-04-26 | davi | Recipe | From scratch: 1.... | ![]() |
+1 chars |
2007-04-26 | davi | Recipe | From scratch: 1.... | ![]() |
+408 chars |
2007-04-26 | davi | Recipe | From scratch: 0... | ![]() |
+15 chars |
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
CREATE USER "www-data" CREATEUSER;
3. Grant all privileges:
GRANT ALL ON DATABASE gnuherds TO "www-data";
4. Quit psql:
\q
5. Create the initial state of the database. For this, you'll need to edit the grant lines in
Layer-0__Site_entry_point/doc/GNUHerds__SQL_Implementation.sql
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 nongnu.org" 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.