[FGS] postgresql server install

Bart van den Eijnden BEN at Syncera-ITSolutions.NL
Tue Sep 20 05:26:47 EDT 2005


Hi list,

We finally got round to solving this.

First of all, there was a problem in:
/opt/fgs/etc/init.d/pgsql

We changed:

su $PGUSER -c "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH ; $FGS_HOME/b
in/pg_ctl start -D $PGDATA -o "$PGOPTIONS" -l $PGLOG"

into:
su $PGUSER -c "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH ; $FGS_HOME/b
in/pg_ctl start -D $PGDATA -o '$PGOPTIONS' -l $PGLOG"

Note the nested quotes.

Also, we had to run chmod 755 on initdb in order for user postgres to run it. Then we manually ran initdb after running su postgres.

[root at gis pgsql]# /opt/fgs/bin/initdb -U postgres -D /opt/fgs/apps/pgsql/data -L /opt/fgs/apps/pgsql/share

After this, the PostgreSQL server could be started using ./fgs start pgsql under user root.

Hopefully this helps in getting the FGS Postgresql installer to run more out of the box.

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl

>>> "Bart van den Eijnden" <BEN at syncera-itsolutions.nl> 7-9-2005 9:19:11 >>>
If I try to run initdb as user postgres (su postgres) I get the following:

sh-2.05b$ /opt/fgs/bin/initdb -U postgres -D /opt/fgs/apps/pgsql/data -L /opt/fgs/apps/pgsql/share
invalid binary "/opt/fgs/bin/initdb"
invalid binary "/opt/fgs/bin/initdb"
invalid binary "/opt/fgs/bin/initdb"
The program "postgres" is needed by initdb but was not found in the
same directory as "initdb".
Check your installation.

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl 
>>> "Bart van den Eijnden" <BEN at syncera-itsolutions.nl> 09/07/05 8:50 AM >>>
Hi list,

I am trying to install the fgs package for postgresql 8.0.3, but am running into an issue (initdb will not succeed), probably because I am running as root. Can anybody advise me what's the proper way to do this (create a user postgres and install the package using that user??).

[root at gis bin]# ./fgs install postgresql-server:8.0.3 ~root/install/modules/
+ Installing postgresql-server:
  + Getting and extracting module 'postgresql-server'... ok
+ Copying all files into FGS environment... ok
+ Running postgresql-server's installation script :
*      *** PostgreSQL installation ***
+ Correct files in share/ directory
* Selecting TCP port... Example: 5433, 5433, etc...
? What TCP port do you want to use [5432] : 5432
+ Creating PostgreSQL's database directory in '/opt/fgs/apps/pgsql/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 en_US.UTF-8.
The default database encoding has accordingly been set to UNICODE.

fixing permissions on existing directory /opt/fgs/apps/pgsql/data ... ok
creating directory /opt/fgs/apps/pgsql/data/global ... ok
creating directory /opt/fgs/apps/pgsql/data/pg_xlog ... ok
creating directory /opt/fgs/apps/pgsql/data/pg_xlog/archive_status ... ok
creating directory /opt/fgs/apps/pgsql/data/pg_clog ... ok
creating directory /opt/fgs/apps/pgsql/data/pg_subtrans ... ok
creating directory /opt/fgs/apps/pgsql/data/base ... ok
creating directory /opt/fgs/apps/pgsql/data/base/1 ... ok
creating directory /opt/fgs/apps/pgsql/data/pg_tblspc ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 50
creating configuration files ... ok
creating template1 database in /opt/fgs/apps/pgsql/data/base/1 ... "root" execution of the PostgreSQL server is not permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromise.  See the documentation for
more information on how to properly start the server.
child process exited with exit code 1
initdb: removing contents of data directory "/opt/fgs/apps/pgsql/data"
* To start PostgreSQL, use : fgs start pgsql
* PostgreSQL's database directory created.
+ Port selected : '5432'. Configuration wrote in /opt/fgs/etc/fgs/pkgs/postgresql-server/pgsql.conf
* You can start PostgrSQL with : fgs start pgsql
*      *** End of PostgreSQL installation ***
* Module 'postgresql-server' installed with success.

Thanks in advance.

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl 

_______________________________________________
Foss-gis-suite mailing list
Foss-gis-suite at lists.maptools.org 
http://lists.maptools.org/mailman/listinfo/foss-gis-suite 


_______________________________________________
Foss-gis-suite mailing list
Foss-gis-suite at lists.maptools.org 
http://lists.maptools.org/mailman/listinfo/foss-gis-suite



More information about the Foss-gis-suite mailing list