postgresql 15.0源码安装

https://www.postgresql.org/ftp/source/

[root@localhost local]# tar -xf postgresql-15.0.tar.gz

[root@localhost postgresql-15.0]# ./configure --prefix=/usr/local/pgsql_15

[root@localhost postgresql-15.0]# make

[root@localhost postgresql-15.0]# make install

[root@localhost postgresql-15.0]#ln -sf /usr/local/pgsql15 /usr/local/pgsql15

[root@localhost pgsql_15.0]# adduser postgres

[root@localhost pgsql_15.0]# mkdir /usr/local/pgsql_15.0/data

[root@localhost local]# chown -R postgres:postgres /usr/local/pgsql_15.0

[root@localhost pgsql_15.0]# chown -R postgres:postgres /usr/local/pgsql_15.0/*

[root@localhost pgsql_15.0]# su - postgres

[postgres@localhost pgsql_15.0]$ /usr/local/pgsql_15.0/bin/initdb -D /usr/local/pgsql_15.0/data

[postgres@localhost ~]$ /usr/local/pgsql_15.0/bin/pg_ctl -D /usr/local/pgsql_15.0/data -l logfile start

[postgres@localhost ~]$ /usr/local/pgsql_15.0/bin/psql postgres

postgres=# ALTER ROLE postgres WITH PASSWORD ‘postgres’;

[postgres@localhost ~]$ vi ~/.bashrc
export PATH=/usr/local/pgsql14/bin: P A T H e x p o r t L D L I B R A R Y P A T H = / u s r / l o c a l / p g s q l 14 / l i b : PATH export LD_LIBRARY_PATH=/usr/local/pgsql14/lib: PATHexportLDLIBRARYPATH=/usr/local/pgsql14/lib:LD_LIBRARY_PATH
export PGDATA=/usr/local/pgsql14/data

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值