[POSTGRE] 바이너리 설치

반응형

1. 수동 설치 파일 가져오기 (옛날버전 10.23* 까지만 지원)


https://www.enterprisedb.com/download-postgresql-binaries
wget 
https://sbp.enterprisedb.com/getfile.jsp?fileid=1258254 --no-check-certificate

 

2. 유저, 그룹 추가

groupadd dba
useradd pgre
passwd pgre

usermod -g dba pgre
chown pgre:dba postgresql-16.1.tar.gz

 

3. 압축해제

tar -zxvf  postgresql-10.23-1-linux-x64-binaries.tar.gz

 

4. bash_profile

export POSTGRES_HOME=/home/pgre/pgsql
export PGLIB=$POSTGRES_HOME/lib
export PGDATA=/home/pgre/data

export PATH=$POSTGRES_HOME/bin:$PATH

alias pgstart='/home/pgre/pgsql/bin/pg_ctl -D /home/pgre/data -l logfile start'
alias pgstop='/home/pgre/pgsql/bin/pg_ctl -D /home/pgre/data -l logfile stop'

 

5. initdb 실행

cd $POSTGRE_HOME/bin
initdb -D /home/pgre/data

The files belonging to this database system will be owned by user "pgre".
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/pgre/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... ROK
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

WARNING: enabling "trust" authentication for local connections
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/pgre/data -l logfile start

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

반응형

'Database > Postgre' 카테고리의 다른 글

[POSTGRE] 패스워드 복잡성 설정  (0) 2024.07.30
[POSTGRE] HBA등 설정파일  (0) 2024.07.12
[POSTGRE] 수동 설치  (0) 2023.12.15