PostgreSQL 설치
2. DB 구성
2.1. 관리자 비밀번호 설정
[postgres@www:/home/postgres]$ psql -dpostgres
Enter new password: [암호 입력]
Enter it agin: [암호 재입력]
|
2.2. postgresql.conf 파일 변경
[postgres@www:/home/postgres]$ vi /home/postgres/pgsql/data/postgresql.conf
#listen_addresses = 'localhost' → listen_addresses = '*' 로 변경 |
2.3. pg_hba.conf 파일 변경
[postgres@www:/home/postgres]$ vi /home/postgres/pgsql/data/pg_hba.conf
host all all 0.0.0.0/0 md5
host all all 0.0.0.0/0 password 추가
|
2.4. DB 재시작
[postgres@www:/home/postgres]$ pg_ctl -D /home/postgres/pgsql/data -l logfile restart
|
2.5. DB 설치 확인
- Postgres 접속 방법 : psql -d[DBNAME] -U[USER]
- 옵션없이 psql 접속 시 postgres 계정으로 postgres db에 접속(default)
[postgres@www:/home/postgres] $ psql
Password for user postgres:
psql (12.3)
Type "help" for help.
postgres=# select * from pg_database;
oid | datname | datdba | encoding | datcollate | datctype | datistemplate | datallowconn |
datconnlimit | datlastsysoid | datfrozenxid | datminmxid | dattablespace | datacl -------+-----------+--------+----------+-------------+-------------+---------------+--------------+-------
-------+---------------+--------------+------------+---------------+-------------------------------------
13591 | postgres | 10 | 6 | en_US.UTF-8 | en_US.UTF-8 | f | t | -1 |
13590 | 479 | 1 | 1663 |
1 | template1 | 10 | 6 | en_US.UTF-8 | en_US.UTF-8 | t | t | -1 |
13590 | 479 | 1 | 1663 | {=c/postgres,postgres=CTc/postgres}
13590 | template0 | 10 | 6 | en_US.UTF-8 | en_US.UTF-8 | t | f | -1 |
13590 | 479 | 1 | 1663 | {=c/postgres,postgres=CTc/postgres}
(3 rows)
|
'인터페이스, 연동' 카테고리의 다른 글
[Tibero] DBLINK 우회방안_Oracle to Tibero (2) (0) | 2023.08.16 |
---|---|
[Tibero] DBLINK 우회방안_Oracle to Tibero (1) (0) | 2023.08.16 |
[Tibero] DBLINK 설정_Tibero to PostgreSQL (3) (0) | 2023.07.31 |
[Tibero] DBLINK 설정_Tibero to PostgreSQL (2) (0) | 2023.07.31 |
[Tibero] DBLINK 설정_Tibero to PostgreSQL (1) (0) | 2023.07.31 |