当前位置:网站首页>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、开启远程连接
边栏推荐
- The characteristics and principle of typescript29 - enumeration type
- Entry name ‘org/apache/commons/codec/language/bm/gen_approx_greeklatin.txt’ collided
- typescript32-ts中的typeof
- Day115. Shangyitong: Background user management: user lock and unlock, details, authentication list approval
- 当关注「互联网+」模式的时候,通常仅仅只是在关注「互联网+」模式本身
- 【刷题篇】打家劫舍
- When paying attention to the "Internet +" model, you usually only focus on the "Internet +" model itself
- LeetCode Review Diary: 153. Find the Minimum Value in a Rotated Sort Array
- Understand the big model in seconds | 3 steps to get AI to write a summary
- After graduating from three books, I was rejected by Tencent 14 times, and finally successfully joined Alibaba
猜你喜欢

【ORB_SLAM2】void Frame::ComputeImageBounds(const cv::Mat &imLeft)

Use baidu EasyDL implement factory workers smoking behavior recognition

Constructor instance method inheritance of typescript38-class (implement)

S/4中究竟有多少个模块,你对这些模块了解多少

Byte taught me a hard lesson: When a crisis comes, you don't even have time to prepare...

Win Go开发包安装配置、GoLand配置

"NetEase Internship" Weekly Diary (3)

typescript38-class的构造函数实例方法继承(implement)

密码学的基础:X.690和对应的BER CER DER编码

Data transfer at the data link layer
随机推荐
Fly propeller power space future PIE - Engine Engine build earth science
Day115.尚医通:后台用户管理:用户锁定解锁、详情、认证列表审批
3.Bean的作用域与生命周期
PHP 使用 PHPRedis 与 Predis
『网易实习』周记(三)
一本适合职场新人的好书
Use baidu EasyDL implement factory workers smoking behavior recognition
Redis Subscription and Redis Stream
Yunhe Enmo: Let the value of the commercial database era continue to prosper in the openGauss ecosystem
LeetCode刷题日记: 33、搜索旋转排序数组
AntPathMatcher uses
LeetCode刷题日记:153、寻找旋转排序数组中的最小值
Byte taught me a hard lesson: When a crisis comes, you don't even have time to prepare...
6-25 Vulnerability Exploitation - irc Backdoor Exploitation
JDBC PreparedStatement 的命名参数实现
Effects of Scraping and Aggregation
第一次写对牛客的编程面试题:输入一个字符串,返回该字符串出现最多的字母
力扣 1374. 生成每种字符都是奇数个的字符串
PHP直播源码实现简单弹幕效果的相关代码
哈希冲突和一致性哈希