Skip to content

Instantly share code, notes, and snippets.

@Burning-Chai
Created May 28, 2016 07:33
Show Gist options
  • Save Burning-Chai/79c32d4e94b5289390fe867e1f54e7f1 to your computer and use it in GitHub Desktop.
Save Burning-Chai/79c32d4e94b5289390fe867e1f54e7f1 to your computer and use it in GitHub Desktop.
Postgres Setting
$ sudo cp /var/lib/pgsql/9.6/data/pg_hba.conf /var/lib/pgsql/9.6/data/pg_hba.conf.original
$ sudo vi /var/lib/pgsql/9.6/data/pg_hba.conf
$ sudo diff /var/lib/pgsql/9.6/data/pg_hba.conf /var/lib/pgsql/9.6/data/pg_hba.conf.original
82,83c82
< #host    all             all             127.0.0.1/32            ident
< host    all             all             0.0.0.0/0               trust
---
> host    all             all             127.0.0.1/32            ident

$ sudo cp /var/lib/pgsql/9.6/data/postgresql.conf /var/lib/pgsql/9.6/data/postgresql.conf.original
$ sudo vi /var/lib/pgsql/9.6/data/postgresql.conf
$ sudo diff /var/lib/pgsql/9.6/data/postgresql.conf /var/lib/pgsql/9.6/data/postgresql.conf.original
59c59
< listen_addresses = '*'        # what IP address(es) to listen on;
---
> #listen_addresses = 'localhost'       # what IP address(es) to listen on;

$ sudo systemctl restart postgresql-9.6
@toyosge
Copy link

toyosge commented May 28, 2016

pg_hba.confの内容はggrks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment