2. Install Postgresql 10.0

reference

http://yallalabs.com/linux/how-to-install-and-use-postgresql-10-on-ubuntu-16-04/

  1. download and install
# echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' >> /etc/apt/sources.list.d/pgdg.list
# wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
# sudo apt-get update
# sudo apt-get install postgresql-10
  1. login and check
# sudo su - postgres
# psql 
# \conninfo

config path is at
/etc/postgresql/10/main/postgres.conf

data path is at
/var/lib/postgresql/10/main

log path is at
/var/log/postgresql

restore data
pg_restore -d <databasename> -U postgres -W <backup file name>
example : pg_restore -d erp-U postgres -W /tmp/postgres_erp.backup

create .pgpass

  1. switch user to postgres
    su postgres

2 . nano ~/.pgpass (will keep at var/lib/postgresql/.pgpass).

# hostname:port:database:username:password

*:*:erpdev:postgres:password

chmod 600 ~/.pgpass.

results matching ""

    No results matching ""