当前位置:网站首页>Centos7 安装postgresql并开启远程访问
Centos7 安装postgresql并开启远程访问
2022-08-02 01:54:00 【niuge No.1】
1、安装教程
下载页面/Download: 世界上功能最强大的开源数据库...
源码安装指导
Linux平台编译安装的快捷参考(Centos平台/Pg12.2为例):
wget https://ftp.postgresql.org/pub/source/v12.2/postgresql-12.2.tar.bz2
tar xjvf postgresql*.bz2 #解压至一个目录
cd potgresql-12.2
./configure --prefix=/opt/pgsql #拟安装至/opt/pgsql
make world
make install-world
adduser postgres #增加新用户,系统提示要给定新用户密码
mkdir /opt/pgsql/data #创建数据库目录
chown -R postgres:postgres /opt/pgsql/data
su - postgres #使用postgres帐号操作
/opt/pgsql/bin/initdb -D /opt/pgsql/data #初始化数据库
/opt/pgsql/bin/pg_ctl -D /opt/pgsql/data -l logfile start #启动数据库
/opt/pgsql/bin/createdb genericdb #假定数据库名为gerericdb)
/opt/pgsql/bin/psql genericdb # (进入数据库内部)2、中间碰到readline报错,解决办法:
安装postgresql 出现readline错误 - 来壶清茶 - 博客园
安装 readline-devel 、zlib-devel包
yum -y install -y readline-devel;
yum install zlib-devel;3、开启远程连接
边栏推荐
- Force buckle, 752-open turntable lock
- 垃圾回收器CMS和G1
- 创新项目实战之智能跟随机器人原理与代码实现
- Data transfer at the data link layer
- Huawei's 5-year female test engineer resigns: what a painful realization...
- 检查IP或端口是否被封
- 『网易实习』周记(三)
- Entry name ‘org/apache/commons/codec/language/bm/gen_approx_greeklatin.txt’ collided
- 信息化和数字化的本质区别是什么?
- typescript38-class的构造函数实例方法继承(implement)
猜你喜欢
随机推荐
typescript29-枚举类型的特点和原理
2023年起,这些地区软考成绩低于45分也能拿证
Kubernetes之本地存储
Constructor instance method of typescript36-class
字节给我狠狠上了一课:危机来的时候你连准备时间都没有...
电子制造仓储条码管理系统解决方案
Golang分布式应用之Redis
Redis 订阅与 Redis Stream
浅谈国产ERP的“横纵竖”三向发展态势
Hiring a WordPress Developer: 4 Practical Ways
typeof in typescript32-ts
typescript32-ts中的typeof
传统企业数字化转型需要经过几个阶段?
Analysis of volatile principle
kubernetes之服务发现
搜罗汇总的效应
5年自动化测试经验的一些感悟:做UI自动化一定要跨过这10个坑
Redis 底层的数据结构
Constructor instance method inheritance of typescript38-class (implement)
Reflex WMS中阶系列7:已经完成拣货尚未Load的HD如果要取消拣货,该如何处理?









