반응형
Notice
Recent Posts
Recent Comments
Link
IT Japan
PostgreSQL 초기화 본문
반응형
yum으로 인스톨한 경우의 초기화
CentOS7에 yum 버전 9.6을 설치 한 경우 다음을 실행하여 초기화합니다.
/usr/pgsql-9.6/bin/postgresql96-setup initdb |
실행하면 하기와 같이 된다.
/usr/pgsql-9.6/bin/postgresql96-setup initdb Initializing database ... OK |
yum으로 설치 한 경우 다음 설정 파일과 데이터의 디렉토리입니다.
/var/lib/pgsql |
버전 9.6의 경우는 위 디렉토리의 "9.6"라는 디렉토리가됩니다.
/var/lib/pgsql/9.6/ |
initdb 실행 전에 이 디렉토리는 비어있습니다만, initdb 실행 후 설정 파일이 생성됩니다.
# ls -l /var/lib/pgsql/9.6/data/ total 48 -rw------- 1 postgres postgres 4 Mar 19 15:02 PG_VERSION drwx------ 5 postgres postgres 41 Mar 19 15:02 base drwx------ 2 postgres postgres 4096 Mar 19 15:02 global drwx------ 2 postgres postgres 18 Mar 19 15:02 pg_clog drwx------ 2 postgres postgres 6 Mar 19 15:02 pg_commit_ts drwx------ 2 postgres postgres 6 Mar 19 15:02 pg_dynshmem -rw------- 1 postgres postgres 4224 Mar 19 15:02 pg_hba.conf -rw------- 1 postgres postgres 1636 Mar 19 15:02 pg_ident.conf drwx------ 2 postgres postgres 6 Mar 19 15:02 pg_log drwx------ 4 postgres postgres 39 Mar 19 15:02 pg_logical drwx------ 4 postgres postgres 36 Mar 19 15:02 pg_multixact drwx------ 2 postgres postgres 18 Mar 19 15:02 pg_notify drwx------ 2 postgres postgres 6 Mar 19 15:02 pg_replslot drwx------ 2 postgres postgres 6 Mar 19 15:02 pg_serial drwx------ 2 postgres postgres 6 Mar 19 15:02 pg_snapshots drwx------ 2 postgres postgres 6 Mar 19 15:02 pg_stat drwx------ 2 postgres postgres 6 Mar 19 15:02 pg_stat_tmp drwx------ 2 postgres postgres 18 Mar 19 15:02 pg_subtrans drwx------ 2 postgres postgres 6 Mar 19 15:02 pg_tblspc drwx------ 2 postgres postgres 6 Mar 19 15:02 pg_twophase drwx------ 3 postgres postgres 60 Mar 19 15:02 pg_xlog -rw------- 1 postgres postgres 88 Mar 19 15:02 postgresql.auto.conf -rw------- 1 postgres postgres 22244 Mar 19 15:02 postgresql.conf |
반응형
'IT > PostgreSQL' 카테고리의 다른 글
PostgreSQL 메모 (0) | 2019.03.18 |
---|---|
액세스 권한의 부여 (0) | 2019.03.07 |
PostgreSQL의 기본적인 명령어 (0) | 2019.03.07 |
메인티넌스 작업 수순서 (0) | 2016.05.30 |
Master,Slave의 전환 수순 (0) | 2016.05.30 |
Comments