IT Log
[CentOS 7] PostgreSQL Install 본문
728x90
반응형
CentOS 7 PostgreSQL 원격접속 : https://newly0513.tistory.com/164
PostgreSQL Yum Repository
1. Install the repository RPM
yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
2. Install PostgreSQL
# PostgreSQL13
yum install -y postgresql13-server
# PostgreSQL12
yum install -y postgresql12-server
# PostgreSQL11
yum install -y postgresql11-server
# PostgreSQL10
yum install -y postgresql10-server
# PostgreSQL9.6
yum install -y postgresql96-server
Start PostgreSQL
1. Initialize the database and Enable automatic start
# PostgreSQL13
/usr/pgsql-13/bin/postgresql-13-setup initdb
systemctl enable postgresql-13
systemctl start postgresql-13
# PostgreSQL12
/usr/pgsql-12/bin/postgresql-12-setup initdb
systemctl enable postgresql-12
systemctl start postgresql-12
# PostgreSQL11
/usr/pgsql-11/bin/postgresql-11-setup initdb
systemctl enable postgresql-11
systemctl start postgresql-11
# PostgreSQL10
/usr/pgsql-10/bin/postgresql-10-setup initdb
systemctl enable postgresql-10
systemctl start postgresql-10
# PostgreSQL9.6
/usr/pgsql-9.6/bin/postgresql96-setup initdb
systemctl enable postgresql-9.6
systemctl start postgresql-9.6
2. PostgreSQL 접속
sudo -u postgres psql
3. 비밀번호 설정하기
'P@ssw0rd' 대신 본인이 사용하실 비밀번호를 설정하시면 됩니다.
ALTER USER postgres WITH PASSWORD 'P@ssw0rd';
728x90
반응형
'Linux > CentOS 7' 카테고리의 다른 글
[CentOS 7] MySQL 8.0 Install (0) | 2020.09.26 |
---|---|
[CentOS 7] unzip (0) | 2020.09.15 |
[CentOS 7] MySQL 5.7 Install (0) | 2020.09.07 |
vi 편집기 명령어 (0) | 2020.08.28 |
[CentOS 7] 설치 (1) | 2020.05.29 |
Comments