Re: psql comands
Here is the PostgreSQL-Part:
You need Readline.... or compiling pgsql with "without-readline"
Readline
-------------------------------------------------------------------------
Readline (v5.1) (ftp://ftp.gnu.org/gnu/readline/)
# ./configure
# make
# make install
!!OpenSSL is optional or tell the configure your own path. !!
OpenSSL
-------------------------------------------------------------------------
OpenSSL (v0.9.8b) (http://www.openssl.org/source/)
# ./config --prefix=/opt/openssl/0.9.8b
# make
# make test
# make install
# ln -s /opt/openssl/0.9.8b/ /opt/openssl/current
PostgreSQL
-------------------------------------------------------------------------
PostgreSQL (8.1.4) (http://www.postgresql.org/mirrors-www.html)
# ./configure --prefix=/opt/pgsql/8.1.4 --with-perl
--with-openssl=/opt/openssl/current --enable-nls=de
# make
# make install
# ln -s /opt/pgsql/8.1.4/ /opt/pgsql/current
# mkdir /opt/pgsql/current/pgsqldata
# useradd -g database -d /opt/pgsql/current/pgsqldata postgres
# passwd postgres
# chown postgres.database /opt/pgsql/current/pgsqldata -Rv
# /opt/pgsql/current/bin/initdb -D /opt/pgsql/current/pgsqldata
# cp <source directory>/contrib/start-scripts/linux /etc/init.d/postgresql
edit the startup-script
line 32: to 'prefix=/opt/pgsql/current'
line 35: to 'PGDATA=/opt/pgsql/current/pgsqldata' ->Datenbank-Verzeichnis
line 38: to 'PGUSER=postgres' ->PgSQL-Systemuser
# chown 755 /etc/init.d/postgresql
# su - postgres
# /etc/init.d/postgresql start
# /opt/pgsql/current/bin/createdb test -U postgres
# /opt/pgsql/current/bin/psql test -U postgres (exit with \q)
the file from pgsql-user, you have them created before
there is a feature from pgsql (every database-files in the own directoy,
this is better for projekt backups.)
****.bash_profile*******************************
*
*
*PATH=$PATH:$HOME/bin *
*USERNAME="" *
*
*
*PGDATA2=/home/htdocs/<site_name>/database *
*export PATH USERNAME PGDATA2 *
************************************************
# . .bash_profile
as pgsql - user
# initlocation PGDATA2
# createdb -D 'PGDATA2' database_name
Reply to: