pgtuneを参考にして、confのチューニング
1.Select version:
11
----------------------------------------------------------
2.Select platform:
CentOS 7
----------------------------------------------------------
3.Select architecture:
x86_64
----------------------------------------------------------
4. Install the repository RPM:
yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
rpm -ihv pgdg-centos11-11-2.noarch.rpm
----------------------------------------------------------
5.Install the client packages:
yum install postgresql11
6.Optionally install the server packages:
yum install postgresql11-server
----------------------------------------------------------
7.Optionally initialize the database and enable automatic start:
(PGSETUP_INITDB_OPTIONS="-E UTF-8 --locale=ja_JP.UTF-8")
(PGSETUP_INITDB_OPTIONS="-E UTF-8 --locale=c") ←間違い
export PGSETUP_INITDB_OPTIONS="-E UTF-8 --locale=C"
/usr/pgsql-11/bin/postgresql-11-setup initdb
systemctl enable postgresql-11
systemctl start postgresql-11
-------------------------
8. パスワードを設定
Postgresユーザーのパスワード設定(PostgreSQLユーザー)
su - postgres
psql
alter role postgres with password 'Passwd643';
----------------------------------------------------------
----------------------------------------------------------
10. conf の検索 (必須では、ありませんので、必要に応じて、行ってください)
find / -name "pg*.conf" -print
----------------------------------------------------------
11. confを編集し、接続許可
vi /var/lib/pgsql/11/data/pg_hba.conf
vi /var/lib/pgsql/11/data/postgresql.conf
ここでは
gedit /var/lib/pgsql/11/data/pg_hba.conf
----------------------------------------------------------
10. PostgreSQLの再起動とバージョン確認
systemctl restart postgresql-11
psql --version
----------------------------------------------------------
PostgreSQL 11 検証レポートレポート