当前位置:网站首页>rpm install postgresql12
rpm install postgresql12
2022-07-31 01:38:00 【Can you give a thumbs up after watching it?】
安装环境:CentOS Linux release 7.3.1611 (Core)
安装pg版本:postgresql12
安装步骤:

文件下载地址:postgresql12-docker19-postgis-Linux文档类资源-CSDN下载
1.安装postgresql lib库(No offline resources found,我是用的yum安装方式)
yum install postgresql-libs.x86_64
2.安装四个rpm包(need to be executed in order)
# rpm -ivh postgresql12-libs-12.4-1PGDG.rhel7.x86_64.rpm
# rpm -ivh postgresql12-12.4-1PGDG.rhel7.x86_64.rpm
# rpm -ivh postgresql12-server-12.4-1PGDG.rhel7.x86_64.rpm
# rpm -ivh postgresql12-contrib-12.4-1PGDG.rhel7.x86_64.rpm
3.初始化数据库(将11或者12改成自己的版本)
/usr/pgsql-12/bin/postgresql-12-setup initdb
4.启动数据库
sudo systemctl start postgresql-12
5.查看数据库状态
sudo systemctl status postgresql-12
(sudo systemctl stop postgresql-12 停止命令)
(sudo systemctl restart postgresql-12 重启命令)

6.Allow remote tools linking
cd /var/lib/pgsql/12/data/
vi postgresql.conf
取消注释,更改为:listen_addresses = '*'
Esc :wq 保存退出
7.修改ipv4设置
vi /var/lib/pgsql/12/data/pg_hba.conf
host all all 0.0.0.0/0 md5
(trustis encryption free,md5是加密)
保存退出

8.修改用户密码
切换到用户sudo -u postgres psql
alter user postgres with password '******';
\q 退出pg用户
9.重启服务
sudo systemctl restart postgresql-12
10.Remote access tool testing(我使用的navicat,测试可用)
安装postgis(总共40个)
将40个rpmUpload the file to the folder you specify
rpm -ivh *.rpm --nodeps –force

rpm -qi postgis30_12 查看安装信息

Start service creationgis扩展
# sudo su – postgres
# psql
# CREATE EXTENSION postgis;
# SELECT PostGIS_version();

至此安装完成!
边栏推荐
猜你喜欢

Installation problem corresponding to tensorflow and GPU version

基于Keras_bert模型的Bert使用与字词预测

Ticmp - 更快的让应用从 MySQL 迁移到 TiDB

Parameter introduction and selection points of wireless module

仿牛客网项目总结

MySQL的安装教程(嗷嗷详细,包教包会~)

Rocky/GNU之Zabbix部署(2)

Centos 7.9 install PostgreSQL14.4 steps

MySQL——数据库的查,增,删

Rocky/GNU之Zabbix部署(1)
随机推荐
ShardingSphere's vertical sub-database sub-table actual combat (5)
Mysql: Invalid default value for TIMESTAMP
关于Redis相关内容的基础学习
设置浏览器滚动条样式
MySql installation and configuration super detailed tutorial and simple method of building database and table
打印任务排序 js od华为
MySQL (6)
ROS2系列知识(3):环境配置
数字图像隐写术之卡方分布
Zabbix干啥用?
pycharm重命名后无法运行(报错: can‘t open file......No such file or directory)
Distributed. Idempotency
软件测试报告有哪些内容?
内网渗透——提权
Bert usage and word prediction based on Keras_bert model
Ticmp - 更快的让应用从 MySQL 迁移到 TiDB
uniapp使用第三方字体
VS warning LNK4099:未找到 PDB 的解决方案
软件测试要达到一个什么水平才能找到一份9K的工作?
ECCV 2022 华科&ETH提出首个用于伪装实例分割的一阶段Transformer的框架OSFormer!代码已开源!