11
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

updated at

CentOS7にPostgreSQL9.6をyumで、インストール

コマンドラインで、PostgreSQL9.6をインストール

1.
wget https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm
2.
rpm -ivh pgdg-centos96-9.6-3.noarch.rpm
3.
yum -y install postgresql96-server postgresql96-devel postgresql96-contrib
4. initdbの実行
/usr/pgsql-9.6/bin/postgresql96-setup initdb --no-locale
/usr/pgsql-9.6/bin/postgresql96-setup initdb --locale=C
/usr/pgsql-9.6/bin/postgresql96-setup initdb --encoding=UTF8 --no-locale
/usr/pgsql-9.6/bin/postgresql96-setup initdb --encoding=UTF-8 --locale=ja_JP.UTF-8
オプションをつけると、エラーになる。(記述が間違っている??)

/usr/pgsql-9.6/bin/postgresql96-setup initdb
はOK。
5. パスワードを設定
passwd postgres
6. PostgreSQLの起動
systemctl start postgresql-9.6
systemctl enable postgresql-9.6

systemctl restart postgresql-9.6 

7. confを編集し、接続許可
vi /var/lib/pgsql/9.6/data/pg_hba.conf

pg_hba.confの編集で、下記を試したが、trust以外は、pgadminⅢから、接続できませんでした。
host all all 192.168.24.0/24 trust
以下は、エラー
host all all 192.168.24.0/24 md5
host all all 192.168.24.0/24 password
host all all 192.168.24.0/24 krb5
host all all 192.168.24.0/24 ident
host all all 192.168.24.0/24 cert


詳細な手順と画面は、こちら、http://a23.sblo.jp/article/177152049.html

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
11
Help us understand the problem. What are the problem?