37 lines
819 B
Plaintext
37 lines
819 B
Plaintext
|
|
dnf install -y gcc.x86_64 make.x86_64 readline.x86_64 readline-devel.x86_64 zlib-devel.x86_64 zlib.x86_64 openssl-devel.x86_64
|
||
|
|
|
||
|
|
./configure \
|
||
|
|
--prefix=/app/postgres/15.3 \
|
||
|
|
--datarootdir=/data \
|
||
|
|
--with-ssl=openssl
|
||
|
|
|
||
|
|
make
|
||
|
|
make install
|
||
|
|
|
||
|
|
useradd postgres-G postgres -g postgres
|
||
|
|
useradd postgres -G postgres -g postgres
|
||
|
|
|
||
|
|
chown -R postgres:postgres /app/postgres /data /backup
|
||
|
|
|
||
|
|
pg_ctl -D /data/postgresql/dbf -l logfile start
|
||
|
|
|
||
|
|
|
||
|
|
# add to .bash_profile
|
||
|
|
|
||
|
|
export PS1="\u@\h:\w> "
|
||
|
|
alias listen='lsof -i -P | grep -i "listen"'
|
||
|
|
|
||
|
|
export POSTGRES_HOME=/app/postgres/15.3
|
||
|
|
export PGDATA=/data/postgresql/dbf
|
||
|
|
|
||
|
|
export LD_LIBRARY_PATH=$POSTGRES_HOME/lib:$LD_LIBRARY_PATH
|
||
|
|
export PATH=$POSTGRES_HOME/bin:$PATH
|
||
|
|
|
||
|
|
|
||
|
|
# init database and startup
|
||
|
|
initdb
|
||
|
|
pg_ctl -D /data/postgresql/dbf -l /home/postgres/postgres.log start
|
||
|
|
|
||
|
|
|
||
|
|
|