Following the installation guide, I found these errors: As user postgres, following the install guide, I issued this command: initdb -D /var/lib/postgresql/data which failed: initdb: could not create directory "/var/lib/postgresql": Permission denied I had to 'chmod 777 /var/lib' to allow the installation to progress. Then This failed: 'psql template1 postgres < /usr/portage/net-analyzer/jffnms/files/postgresql_db_tables' so I had to use: 'psql template1 postgres < /usr/portage/net-analyzer/jffnms/files/postgresql_db_table'
The permissions problem is not a documentation bug. File a new bug about the typo, please.
*** Bug 128298 has been marked as a duplicate of this bug. ***
Well, if you create the database manually, the folder /var/lib/postgresql/data has to be created manually as whell and the owner must be the database-user ("postgres:postgres").
I see the final comment by Tiziano. Maybe this needs to be reflected in the installation guide, or reference a document on postgresql related to a gentoo specific environment? Maybe somebody with postgresql experience just needs to define an installation semantic, that will use some simple/default postgress installation? Or maybe somebody whos is database literate needs to narrow the option down to mysql so the packages acutally does install with an "emerge jffnms"? Unfortunately, I'm not very knowledgable on databases issues, especially on gentoo...
(In reply to comment #4) > I see the final comment by Tiziano. Maybe this needs to be reflected > in the installation guide, or reference a document on postgresql > related to a gentoo specific environment? Well, no. The standard way to setup the database on Gentoo is using pkg_config, which actually sets the permissions correctly. If you do it manually, you have to rtfm of postgresql about how to do it. But it seems that the Jffnms guide doesn't reflect that. Therefore reassigning to the docs-team. > > Maybe somebody with postgresql experience just needs to define > an installation semantic, that will use some simple/default postgress > installation? Well, that's what we're working on. > > Or maybe somebody whos is database literate needs to narrow the option > down to mysql so the packages acutally does install with an > > "emerge jffnms"? > > Unfortunately, I'm not very knowledgable on databases issues, > especially on gentoo... >
(In reply to comment #5) So? What do you want the GDP to do about this? Can we please see a patch for the doc, or a text list of commands to add and where exactly to add them? It's hard to read your mind. Thanks. :)
Ok, just replace this part: /**************************/ Now, you must prepare PostgreSQL directories. This is done through the initdb command. By default, PostgreSQL data directories are generally stored in /var/lib/postgresql/data. Important: The following command must be run with your PostgreSQL user. By default this user is generally called "postgres". Code Listing 2.8: Preparing PostgreSQL Directories # su - postgres $ initdb -D /var/lib/postgresql/data The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale C. creating directory /var/lib/postgresql/data ... ok creating directory /var/lib/postgresql/data/global ... ok creating directory /var/lib/postgresql/data/pg_xlog ... ok creating directory /var/lib/postgresql/data/pg_xlog/archive_status ... ok creating directory /var/lib/postgresql/data/pg_clog ... ok creating directory /var/lib/postgresql/data/pg_subtrans ... ok creating directory /var/lib/postgresql/data/base ... ok creating directory /var/lib/postgresql/data/base/1 ... ok creating directory /var/lib/postgresql/data/pg_tblspc ... ok selecting default max_connections ... 100 selecting default shared_buffers ... 1000 creating configuration files ... ok creating template1 database in /var/lib/postgresql/data/base/1 ... ok initializing pg_shadow ... ok enabling unlimited row size for system tables ... ok initializing pg_depend ... ok creating system views ... ok loading pg_description ... ok creating conversions ... ok setting privileges on built-in objects ... ok creating information schema ... ok vacuuming database template1 ... ok copying template1 to template0 ... ok WARNING: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the -A option the next time you run initdb. Success. You can now start the database server using: postmaster -D /var/lib/postgresql/data or pg_ctl -D /var/lib/postgresql/data -l logfile start If initdb was successfully executed, you can go back to your root user and start PostgreSQL. /**************************/ with something like this: /**************************/ If not already done, initialize your PostgreSQL database cluster with: sudo emerge dev-db/postgresql --config
Thanks for the info, dev-zero; done as requested. Fixed in CVS. :)