当前位置:网站首页>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、开启远程连接
边栏推荐
- typescript30-any类型
- typescript38-class的构造函数实例方法继承(implement)
- 浅谈国产ERP的“横纵竖”三向发展态势
- The Paddle Open Source Community Quarterly Report is here, everything you want to know is here
- 传统企业数字化转型需要经过几个阶段?
- Ask God to answer, how should this kind of sql be written?
- 一本适合职场新人的好书
- 数据链路层的数据传输
- LeetCode刷题日记: 33、搜索旋转排序数组
- Moonbeam与Project Galaxy集成,为社区带来全新的用户体验
猜你喜欢
Multi-Party Threshold Private Set Intersection with Sublinear Communication-2021:解读
哈希表
typescript38-class的构造函数实例方法继承(implement)
Constructor instance method inheritance of typescript38-class (implement)
电子制造仓储条码管理系统解决方案
Multi-Party Threshold Private Set Intersection with Sublinear Communication-2021: Interpretation
力扣 1374. 生成每种字符都是奇数个的字符串
Yunhe Enmo: Let the value of the commercial database era continue to prosper in the openGauss ecosystem
一本适合职场新人的好书
6-24漏洞利用-vnc密码破解
随机推荐
手写博客平台~第二天
手写一个博客平台~第一天
60种特征工程操作:使用自定义聚合函数【收藏】
哈希表
Record the pits where an error occurs when an array is converted to a collection, and try to use an array of packaging types for conversion
libcurl访问url保存为文件的简单示例
Redis 持久化 - RDB 与 AOF
编码经验之谈
Day115. Shangyitong: Background user management: user lock and unlock, details, authentication list approval
The ultra-large-scale industrial practical semantic segmentation dataset PSSL and pre-training model are open source!
MySQL——增删查改操作
搜罗汇总的效应
Local storage in Kubernetes
bool Frame::PosInGrid(const cv::KeyPoint &kp, int &posX, int &posY)
For effective automated testing, these software testing tools must be collected!!!
力扣 1161. 最大层内元素和
『网易实习』周记(三)
有效进行自动化测试,这几个软件测试工具一定要收藏好!!!
typescript36-class的构造函数实例方法
Data transfer at the data link layer