2018年11月11日

PostgreSQL11 yum install CentOS7 (2)

pgtuneを参考にして、confのチューニング







url.png



1.Select version: 
11
----------------------------------------------------------
2.Select platform: 
CentOS 7
----------------------------------------------------------
3.Select architecture: 
x86_64
----------------------------------------------------------
4. Install the repository RPM: 


rpm -ihv pgdg-centos11-11-2.noarch.rpm

01.png

----------------------------------------------------------
5.Install the client packages:
yum install postgresql11
02.png

6.Optionally install the server packages:
yum install postgresql11-server
03.png
----------------------------------------------------------
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
04.png
-------------------------
8. パスワードを設定
Postgresユーザーのパスワード設定(PostgreSQLユーザー)
su - postgres
psql
alter role postgres with password 'Passwd643';
CREATE DATABASE test1;
\l
\q
exit
05.png
----------------------------------------------------------




----------------------------------------------------------

10. conf の検索 (必須では、ありませんので、必要に応じて、行ってください)
find / -name "pg*.conf" -print
y07.png
----------------------------------------------------------

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
y09.png
----------------------------------------------------------
11. Firewallの設定
firewall-cmd --add-service=postgresql --zone=public --permanent

ファイアーウォールの再起動
systemctl restart firewalld
06.png
----------------------------------------------------------



PostgreSQL 11 検証レポートレポート

posted by a23 at 14:06| Comment(0) | PostgreSQL
この記事へのコメント
コメントを書く
お名前: [必須入力]

メールアドレス: [必須入力]

ホームページアドレス: [必須入力]

コメント: [必須入力]

認証コード: [必須入力]


※画像の中の文字を半角で入力してください。