ติดตั้ง postgres บน centos7-8

centos 7 จะได้ postgres9

centos 8 จะได้ postgres10

ติดตั้ง

yum install postgresql-server postgresql-contrib
postgresql-setup initdb
systemctl start postgresql
systemctl enable postgresql ตั้งค่า user postgres
sudo passwd postgres
su - postgres
psql -d template1 -c "ALTER USER postgres WITH PASSWORD 'newpassword';"
สิทธิ์ ip ที่ไฟล์ นี้
vi /var/lib/pgsql/data/postgresql.conf
แก้ที่
listen_addresses = '*'

 สิทธิ์ user ที่ไฟล์ นี้ vi /var/lib/pgsql/data/pg_hba.conf 

ใส่ความเห็น

อีเมลของคุณจะไม่แสดงให้คนอื่นเห็น ช่องที่ต้องการถูกทำเครื่องหมาย *