Postgresql10离线安装方法

mac2022-06-30  71

在联网的机器上安装postgresql yum 源,官网链接 [root@localhost yum.repos.d]# yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-6-x86_64/pgdg-redhat-repo-latest.noarch.rpm

或者

[root@localhost]# wget https://download.postgresql.org/pub/repos/yum/reporpms/EL-6-x86_64/pgdg-redhat-repo-42.0-4.noarch.rpm [root@localhost]# rpm -ivh pgdg-redhat-repo-42.0-4.noarch.rpm 替换$releasever为系统版本号 [root@localhost yum.repos.d]# sed -i 's/$releasever/6/g' /etc/yum.repos.d/pgdg-redhat-all.repo 安装依赖 [root@localhost]# yum install --downloadonly --downloaddir=psql10 libicu postgresql10-libs 安装软件包 [root@localhost]# yum install --downloadonly --downloaddir=psql10 postgresql10 postgresql10-server 初始化数据库并启用自动启动: service postgresql-10 initdb chkconfig postgresql-10 on service postgresql-10 start 离线安装下载完成的rpm包 [root@bogon psql10]# ll 总用量 12208 -rw-r--r-- 1 root root 5157464 7月 23 2019 libicu-4.2.1-14.el6.x86_64.rpm -rw-r--r-- 1 root root 1702904 7月 23 2019 postgresql10-10.9-1PGDG.rhel6.x86_64.rpm -rw-r--r-- 1 root root 333504 7月 23 2019 postgresql10-libs-10.9-1PGDG.rhel6.x86_64.rpm -rw-r--r-- 1 root root 5299092 7月 23 2019 postgresql10-server-10.9-1PGDG.rhel6.x86_64.rpm 使用数据库 su - postgres psql

转载于:https://www.cnblogs.com/zy37275/p/11305904.html

相关资源:离线无网ubuntu16.04环境下安装postgresql9.6.8
最新回复(0)