Shaun Wingrin
asked on
How 2 separate 2 instances of PostgreSQLon same linux CentOS server?
Is there a way to run two instances of PostgreSQL (on different ports) so that we can stop and start each of them and not effect the other?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Tx so far. I downloaded:
http://wwwmaster.postgresql.org/download/mirrors-ftp?file=%2Fsource%2Fv8.3.3%2Fpostgresql-8.3.3.tar.gz
This is what I used:
./configure --prefix=/home/shaunw/post gre --with-CXX --enable-odbc --with-maxbackends=10000 --with-pgport=5434 --with-odbcinst=/home/shau nw/postgre /odbc --enable-syslog --with-java
, however see my results.
______________
RESULTS: (The rest seemed ok).
__
configure: WARNING: option ignored: --enable-odbc
configure: WARNING: option ignored: --enable-syslog
configure: WARNING: option ignored: --with-CXX
configure: WARNING: option ignored: --with-java
configure: WARNING: option ignored: --with-maxbackends
configure: WARNING: option ignored: --with-odbcinst
__________________________ __________ ________
And then when running: make , got a lot of the following type of error...
__________________________ __________ ________
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statem ent -Wendif-labels -fno-strict-aliasing -fwrapv -fpic -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I../../../src/port -c -o fe-auth.o fe-auth.c
any ideas please?
http://wwwmaster.postgresql.org/download/mirrors-ftp?file=%2Fsource%2Fv8.3.3%2Fpostgresql-8.3.3.tar.gz
This is what I used:
./configure --prefix=/home/shaunw/post
, however see my results.
______________
RESULTS: (The rest seemed ok).
__
configure: WARNING: option ignored: --enable-odbc
configure: WARNING: option ignored: --enable-syslog
configure: WARNING: option ignored: --with-CXX
configure: WARNING: option ignored: --with-java
configure: WARNING: option ignored: --with-maxbackends
configure: WARNING: option ignored: --with-odbcinst
__________________________
And then when running: make , got a lot of the following type of error...
__________________________
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statem
any ideas please?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I ran make install and it ran through what seems to be fine. However I cannot find the data directory or the postgre.conf file. this is the install listing.
[shaunw@messaging postgre]# ls
bin doc include lib man share
How do I specify the data directory?
Where are the conf files?
I understand that --prefix=/home/shaunw/post gre is all that was needed to ensure that the installation sits at above directory?
[shaunw@messaging postgre]# ls
bin doc include lib man share
How do I specify the data directory?
Where are the conf files?
I understand that --prefix=/home/shaunw/post
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Tx. This is progress. Now get this error when try to create the databse:
[shaunw@messaging bin]$ pg_ctl -D /home/shaunw/postgre/a1db start
server starting
[shaunw@messaging bin]$ LOG: database system was shut down at 2008-09-22 14:04:37 SAST
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
[shaunw@messaging bin]$ createdb -D /home/shaunw/postgre/a1db testdb
ERROR: tablespace "/home/shaunw/postgre/a1db " does not exist
STATEMENT: CREATE DATABASE testdb TABLESPACE "/home/shaunw/postgre/a1db ";
createdb: database creation failed: ERROR: tablespace "/home/shaunw/postgre/a1db " does not exist
[shaunw@messaging bin]$
[shaunw@messaging bin]$ pg_ctl -D /home/shaunw/postgre/a1db start
server starting
[shaunw@messaging bin]$ LOG: database system was shut down at 2008-09-22 14:04:37 SAST
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
[shaunw@messaging bin]$ createdb -D /home/shaunw/postgre/a1db testdb
ERROR: tablespace "/home/shaunw/postgre/a1db
STATEMENT: CREATE DATABASE testdb TABLESPACE "/home/shaunw/postgre/a1db
createdb: database creation failed: ERROR: tablespace "/home/shaunw/postgre/a1db
[shaunw@messaging bin]$
ASKER
Do you keep the name of the executable the same? Kinldy elaborate on how one goes about installing. I'm not expert at Linux or postgresql.
As for the startup script - is it more than a case of changing the directory of the PostgreSQL?