当前位置:   article > 正文

RockyLinux8 & RockyLinux9安装postgresql16-devel开发包

RockyLinux8 & RockyLinux9安装postgresql16-devel开发包

1、PG的插件扩展有些需要自行编译,需要安装PG开发包

2、RockyLinux8安装

  1. #创建用户先
  2. useradd postgres
  3. sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
  4. sudo dnf -qy module disable postgresql
  5. sudo dnf install -y postgresql16-server
  6. #安装开发包依赖
  7. sudo dnf install epel-release -y
  8. sudo dnf --enablerepo=powertools install perl-IPC-Run -y
  9. dnf install -y cmake make gcc zlib gcc-c++ perl readline readline-devel zlib zlib-devel perl python36 tcl openssl ncurses-devel openldap pam perl-IPC-Run libicu-devel
  10. #安装扩展
  11. sudo dnf install -y postgresql16-contrib
  12. #安装开发包
  13. sudo dnf install -y postgresql16-devel
  14. sudo /usr/pgsql-16/bin/postgresql-16-setup initdb
  15. sudo systemctl enable postgresql-16
  16. sudo systemctl start postgresql-16

3、RockyLinux9安装

  1. #创建用户先
  2. useradd postgres
  3. sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
  4. sudo dnf -qy module disable postgresql
  5. sudo dnf install -y postgresql16-server
  6. #安装开发包依赖
  7. sudo dnf install epel-release -y
  8. #Powertools is known as crb under RL9. dnf config-manager --enable crb
  9. sudo dnf config-manager --set-enabled crb
  10. dnf install -y cmake make gcc zlib gcc-c++ perl readline readline-devel zlib zlib-devel perl python36 tcl openssl ncurses-devel openldap pam perl-IPC-Run libicu-devel
  11. #安装扩展
  12. sudo dnf install -y postgresql16-contrib
  13. #安装开发包
  14. sudo dnf install -y postgresql16-devel
  15. sudo /usr/pgsql-16/bin/postgresql-16-setup initdb
  16. sudo systemctl enable postgresql-16
  17. sudo systemctl start postgresql-16

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/336557
推荐阅读
相关标签
  

闽ICP备14008679号