Configuring the
PostgreSQL database
to install postgres on a sientific linux (rhel6) machine as root do:
yum install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4
1.noarch.rpm yum install postgresql94-server postgresql94-contribservice postgresql-9.4 initdb // if this does not work, try : /usr/pgsql-9.4/bin/postgresql94-setup initdb
chkconfig postgresql-9.4 on yum install postgresql94*then change to user postgres:
su postgres create the data base (replace /data/postgres/data to point to area where you want to install the data)
/usr/pgsql-9.4/bin/initdb -D /pathtoyourdatadirectorymodify the following in data/postgresql.conf
# - Connection Settings -listen_addresses = '*' # what IP address(es) to listen on; # comma-separated list of addresses; # defaults to 'localhost', '*' = all # (change requires restart) =# For Postgresql versions later than 9lo_compat_privileges = onmodify the line in data/pg_hba.conf to allow for remote connections:
# IPv4 remote connections:host all g4valwriter 172.16.0.0/16 md5then start the database:
/usr/pgsql-9.4/bin/pg_ctl -D /pathtoyourdatadirectory -l logfile startor
/usr/pgsql-9.4/bin/postgres -D /pathtoyourdatadirectorycreate the database users and database
/usr/pgsql-9.4/bin/createuser g4valreader --no-createdb --no-createrole --pwprompt/usr/pgsql-9.4/bin/createuser g4valwriter --createdb --no-createrole --pwpromptcreatedb -O g4valwriter g4validationnow restore the database from the provided dump
/usr/pgsql-9.4/bin/psql -d g4validation -U g4valwriter < pgdump--
HansWenzel - 2016-06-07
Topic revision: r3 - 2016-06-08
- unknown