1. 에러
initdb 실행 시, 공유 라이브러리를 읽는데 실패했다는 에러 로그 떨어짐
$ ./initdb -D $PGDATA
./initdb: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory
2. 트러블슈팅
// libpq.so.5 라이브러리 찾고 심볼릭링크 추가 (기존 것 삭제 후 심볼릭 링크 재적용)
[root@ontune ~]# find / -type f libpq.so.5
/database/postgresql/lib/libpq.so.5
[root@ontune ~]#
[root@ontune ~]# cd /database/postgresql/lib/
[root@ontune lib]# ls -arlt | grep libpq.so.5
-rwxr-xr-x. 1 postgres postgres 363864 Oct 1 14:03 libpq.so.5.16
lrwxrwxrwx. 1 postgres postgres 13 Oct 1 14:03 libpq.so.5 -> libpq.so.5.16
lrwxrwxrwx. 1 postgres postgres 13 Oct 1 14:03 libpq.so -> libpq.so.5.16
[root@ontune lib]#
[root@ontune lib]# ln -s libpq.so.5.16 libpq.so.5
ln: failed to create symbolic link 'libpq.so.5': File exists
[root@ontune lib]# rm libpq.so.5
rm: remove symbolic link 'libpq.so.5'? yes
[root@ontune lib]#
[root@ontune lib]# ln -s libpq.so.5.16 libpq.so.5 //심볼릭 링크 지우고 재설정
// initDB 정상 수행
$ ./initdb -D $PGDATA
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /database/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Asia/Seoul
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
pg_ctl -D /database/postgresql/data -l logfile start
'DataBase > postgreSQL' 카테고리의 다른 글
[PostgreSQL] idle in transaction 설정 (0) | 2024.10.25 |
---|---|
[PostgreSQL, CentOS7] 소스코드 컴파일하여 postgresql 16 설치 (소스 설치) (1) | 2024.09.04 |
[PostgreSQL] Autovacuum이 호출되는 조건과 파라미터 (0) | 2024.08.20 |
[PostgreSQL] vacuum을 하는 이유 // vacuum, vacuum full 테스트 (0) | 2024.08.20 |
[postgreSQL] Oracle Linux 7.9 + postgreSQL 12 설치 (0) | 2024.06.04 |