由于不支持9.5以下的Postgresql版本,我需要在Centos环境中更新此软件包。
Current version: postgres -V (PostgreSQL) 9.2.24
在我的生态系统中,还有另一个使用postgresql的rpm。对于此rpm,有构建,重新启动脚本以及监视依赖项服务,检查状态等的各种脚本。
这些脚本都使用kwywork postgresql
https://www.postgresql.org/download/linux/redhat/提供了执行更新/安装的确切步骤。但是,对于9.6版本,例如,需要使用postgresql-9.6
关键字来引用postgresql
这意味着将需要遍历所有Postgresql脚本和代码中的引用,并分析是否需要更改。之后再升级到另一个版本当然意味着要重复此过程。
是否有任何“开箱即用”的方法可以让我们保留此更新的脚本不变?
我也在这里复制/粘贴安装postgresql 9.6的步骤。
yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install postgresql96-devel postgresql96-server
/usr/pgsql-9.6/bin/postgresql96-setup initdb
systemctl enable postgresql-9.6
systemctl start postgresql-9.6
这是检查一切都很好
service postgresql-9.6 status