43 lines
987 B
Plaintext
43 lines
987 B
Plaintext
|
yum install -y gcc make readline-devel zlib-devel libicu-devel
|
|||
|
|
|||
|
cd /usr/local
|
|||
|
|
|||
|
tar zxvf postgresql-16.0.tar.gz
|
|||
|
|
|||
|
cd postgresql-16.0
|
|||
|
|
|||
|
./configure --prefix=/usr/local/postgresql
|
|||
|
|
|||
|
make -j8 && make install
|
|||
|
|
|||
|
adduser pgsql
|
|||
|
|
|||
|
mkdir /usr/local/postgresql/data
|
|||
|
|
|||
|
chown pgsql /usr/local/postgresql/data
|
|||
|
|
|||
|
su - pgsql
|
|||
|
|
|||
|
##<23><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
|
|||
|
/usr/local/postgresql/bin/initdb -D /usr/local/postgresql/data
|
|||
|
|
|||
|
##<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
|
|||
|
/usr/local/postgresql/bin/pg_ctl -D /usr/local/postgresql/data -l logfile start
|
|||
|
|
|||
|
/usr/local/postgresql/bin/psql -d postgres
|
|||
|
|
|||
|
CREATE USER postgres WITH PASSWORD 'DsideaL147258369';
|
|||
|
ALTER ROLE postgres SUPERUSER;
|
|||
|
|
|||
|
|
|||
|
vi /usr/local/postgresql/data/postgresql.conf
|
|||
|
listen_addresses = '*'
|
|||
|
max_connections = 1000
|
|||
|
idle_in_transaction_session_timeout = 20000
|
|||
|
|
|||
|
|
|||
|
vi /usr/local/postgresql/data/pg_hba.conf
|
|||
|
host all all 0.0.0.0/0 md5
|
|||
|
|
|||
|
##<23><><EFBFBD><EFBFBD>
|
|||
|
/usr/local/postgresql/bin/pg_ctl -D /usr/local/postgresql/data -l logfile restart
|