这个坑是没想道的
我在官网下载了pg9.6和pg13
需要到用uuid 按照百度的教程
yum install postgres-contrib
但是这是错误的
你需要什么版本 就要装什么版本的postgresql96-contrib
不然就会有下面的错误
找不到文件错误
把它加到安装脚本里下次就记住了
#!/bin/bash
echo ‘1、添加RPM’
yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
echo ‘2、安装PostgreSQL’
yum install -y postgresql13-server
echo ‘3、初始化数据库’
/usr/pgsql-13/bin/postgresql-13-setup initdb
echo ‘4、开启服务’
systemctl start postgresql-13
echo ‘5、开机启动’
systemctl enable postgresql-13
echo ‘6、安装第三方支持’
yum install -y postgresql13-contrib