postgresql10.23安装

发布时间 2023-07-07 09:42:00作者: 坚强的小蚂蚁

psql -h 10.253.100.11 -U postgres -p 32496

10.23安装
http://blog.itpub.net/29785807/viewspace-2932433/
https://www.modb.pro/db/564635

查看状态
systemctl start postgresql-10
systemctl status postgresql-10

新建/opt/pgsql文件夹,所属改为postgres:postgres
su - postgres -c "/usr/pgsql-10/bin/initdb -D /opt/pgsql/data"

启动
su - postgres -c "/usr/pgsql-10/bin/pg_ctl -D /opt/pgsql/data -l logfile start"

停止
su - postgres -c "/usr/pgsql-10/bin/pg_ctl -D /test/pgsql/data/ stop"


安装后指定原先低版本数据文件夹,不能查看原数据,postgresql的bin文件夹中内容有变化,原先systemctl中的service文件不能使用