티스토리 뷰
CentOS 7에서 진행
1. https://yum.postgresql.org/repopackages.php 에서 링크주소 복사
2. CentOS 7에 repo 설치
[root@test-0 ~]# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Loaded plugins: fastestmirror |
3. yum으로 PostgreSQL 설치
[root@test-0 ~]# yum install postgresql11-server postgresql11-contrib Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.kaist.ac.kr * epel: ftp.riken.jp * extras: ftp.kaist.ac.kr * updates: ftp.kaist.ac.kr Resolving Dependencies --> Running transaction check |
4. profile 설정 후 터미널 재 연결
- 전체 유저가 이용하도록 /etc/profile 에 추가하고 적용을 위해 터미널을 재 접속한다.
- https://www.postgresql.org/docs/11/install-post.html
# PostgreSQL LD_LIBRARY_PATH=/usr/pgsql-11/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH PATH=/usr/pgsql-11/bin:$PATH export PATH |
5. setup
[root@test-0 ~]# postgresql-11-setup initdb Initializing database ... OK |
6. service
[root@test-0 ~]# systemctl start postgresql-11 [root@test-0 ~]# systemctl enable postgresql-11 Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql-11.service to /usr/lib/systemd/system/postgresql-11.service. |
7. yum으로 설치 시 생성 된 postgres 계정에 대한 패스워드 설정
[root@test-0 ~]# passwd postgres postgres 사용자의 비밀 번호 변경 중 새 암호: 잘못된 암호: 암호에 어떤 형식으로 사용자 이름이 포함되어 있습니다 새 암호 재입력: passwd: 모든 인증 토큰이 성공적으로 업데이트 되었습니다. |
8. postgres 계정으로 로그인
[root@test-0 ~]# su - postgres |
9. postgresql의 postgres 패스워드 설정
-bash-4.2$ psql psql (11.5) 도움말을 보려면 "help"를 입력하십시오. postgres=# alter user postgres password 'postpass'; ALTER ROLE |
10. 환경 설정
-bash-4.2$ vi 11/data/postgresql.conf listen_addresses='*' <- 추가
-bash-4.2$ vi 11/data/pg_hba.conf host all all 0.0.0.0/0 md5 <- 추가 |
11. 재시작
[root@test-0 ~]# systemctl restart postgresql-11 |
- Total
- Today
- Yesterday
- Ignoring CMAKE_OSX_SYSROOT value
- 물리디스크
- lvm 늘리기
- 센트6
- fielddata
- install
- firewall-cmd service
- aix ld
- CLion
- ld 옵션
- virtualbox
- vgcreate
- lvremove
- CentOS
- linux
- postgresql11
- pfctl
- pf.anchors
- centos7
- mirrorlist
- physicaldisk
- aix compile
- CMAKE_OSX_SYSROOT
- yum
- update
- noipath
- _stats
- Repository
- _status
- 파티션 추가
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |