Personal tools

Epi:Configuración del servidor postgresql-9.4

From hpcwiki

Jump to: navigation, search
Shutdown postgres (if it's running)
Code:
service postgresql-9.4 stop

Edit the start-up script
Code:
vim /etc/init.d/postgresql-9.4
Change the PGDATA and PGLOG variable to wherever you want (changes in red)...
Code:
# Set defaults for configuration variables
PGENGINE=/usr/pgsql-9.4/bin
#PGDATA=/var/lib/pgsql/9.4/data
PGDATA=/media/hpclab-data/pgsql/9.4/data
PGLOG=/var/lib/pgsql/9.4/pgstartup.log

Now start postgres
Code:
service postgresql-9.4 start

#starting the postgresql server with data in a different location
#su - postgres -c '/usr/pgsql-9.4/bin/postgres -D /media/hpclab-data/pgsql/9.4/data'