yum配置网站 https://download.postgresql.org/pub/repos/yum
代码语言:javascript复制yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7.9-x86_64/
yum install postgresql10
yum install postgresql10-server
yum install -y postgresql10-contrib
配置环境变量 默认安装是/usr/pgsql-10/bin,所以需要配置path 路径
代码语言:javascript复制/etc/profile
export PATH=$PATH:/usr/pgsql-10/bin
常用测试命令
代码语言:javascript复制pgbench -M prepared -r -c8 -j8 -T 60 -P1 -hxxx -p1433 -Userver db1
pgbench -i -s 400 -hxxx -p3433 -Userver db1