반응형
1. 수동 설치 파일 가져오기
wget https://ftp.postgresql.org/pub/source/v16.1/postgresql-16.1.tar.gz --no-check-certificate |
http://ftp.postgresql.org/pub/source/
https://www.enterprisedb.com/download-postgresql-binaries
2. 필요패키지 설치
yum -y install gcc gcc-c++ make autoconf readline readline-devel zlib zlib-devel openssl openssl-devel gettext gettext-devel python python-devel wget # icu 에러 발생 시 yum -y install libicu-devel # python 최소 버전 3.0 yum -y install python3 yum -y install python3-devel |
3. 압축해제
tar -zxvf postgresql-16.1.tar.gz |
4. Configure 및 설치
./configure --prefix=/home/pgre16/postgre16 --with-python --with-openssl --sysconfdir=/home/pgre16/postgre16/conf make && make check make install |
5. initdb
./initdb -D /home/pgre16/data The files belonging to this database system will be owned by user "pgre16". This user must also own the server process. The database cluster will be initialized with locale "ko_KR.UTF-8". The default database encoding has accordingly been set to "UTF8". initdb: could not find suitable text search configuration for locale "ko_KR.UTF-8" The default text search configuration will be set to "simple". Data page checksums are disabled. fixing permissions on existing directory /home/pgre16/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 ... ROK 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 /home/pgre16/data -l logfile start |
6. bash_profile
export POSTGRES_HOME=/home/pgre16/postgre16 export PGLIB=$POSTGRES_HOME/lib export PGDATA=/home/pgre16/data export PATH=$POSTGRES_HOME/bin:$PATH alias pgstart='/home/pgre16/postgre16/bin/pg_ctl -D /home/pgre16/data -l logfile start' alias pgstop='/home/pgre16/postgre16/bin/pg_ctl -D /home/pgre16/data -l logfile stop' |
반응형
'Database > Postgre' 카테고리의 다른 글
[POSTGRE] pg_bigm (0) | 2024.11.01 |
---|---|
[POSTGRE] pg_store_plans (1) | 2024.10.18 |
[POSTGRE] 패스워드 복잡성 설정 (0) | 2024.07.30 |
[POSTGRE] HBA등 설정파일 (0) | 2024.07.12 |
[POSTGRE] 바이너리 설치 (0) | 2023.12.14 |