jjryu 2020. 7. 18. 15:11

- 배포판 버전 확인
$ grep . /etc/*-release

- 디스크 용량 확인 하기
$ du -h

- Centos 7에 PostgreSQL 11 버전 설치
c.f. # yum install -y postgresql

# rpm -Uvh https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

# yum install -y postgresql11-server postgresql11-contrib

# /usr/pgsql-11/bin/postgresql-11-setup initdb

# systemctl start postgresql-11

# systemctl enable postgresql-11 

- Centos 7에 PostgreSQL 11버전 외부에서 접속
# su - postgres -c 'psql'
postgres=# ALTER USER postgres PASSWORD <new_password>;

/var/lib/pgsql/11/data/postgresql.conf
	listen_addresses = '*'

/var/lib/pgsql/11/data/pg_hba.conf
	# TYPE    DATABASE        USER        ADDRESS        METHOD

	# "local" is for Unix domain socket connections only
	local     all             all                        md5
	#local    all             all                        peer

	# IPv4 local connections:
	host      all             all         127.0.0.1/32   ident
	host      all             all         0.0.0.0/0      md5

# systemctl restart postgresql-11

# firewall-cmd --permanent --add-port=5432/tcp
# firewall-cmd --reload

 

참조 사이트:

https://zetawiki.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_%EC%A2%85%EB%A5%98_%ED%99%95%EC%9D%B8,_%EB%A6%AC%EB%88%85%EC%8A%A4_%EB%B2%84%EC%A0%84_%ED%99%95%EC%9D%B8