当前位置:网站首页>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、开启远程连接
边栏推荐
猜你喜欢

typescript36-class的构造函数实例方法

Day115.尚医通:后台用户管理:用户锁定解锁、详情、认证列表审批

三本毕业的我被腾讯拒绝了十四次,最终成功入职阿里

typeof in typescript32-ts

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

6-25 Vulnerability Exploitation - irc Backdoor Exploitation

typescript33-typescript高级概述

传统企业数字化转型需要经过几个阶段?

AOF重写

Constructor instance method of typescript36-class
随机推荐
Rust P2P Network Application Combat-1 P2P Network Core Concepts and Ping Program
待读书单列表
数据链路层的数据传输
LeetCode brushing diary: 53, the largest sub-array and
【刷题篇】打家劫舍
求大神解答,这种 sql 应该怎么写?
用位运算为你的程序加速
kubernetes之服务发现
【ORB_SLAM2】void Frame::ComputeImageBounds(const cv::Mat &imLeft)
Shell入门终章
typescript38-class的构造函数实例方法继承(implement)
Some insights from 5 years of automated testing experience: UI automation must overcome these 10 pits
手写博客平台~第二天
第一次写对牛客的编程面试题:输入一个字符串,返回该字符串出现最多的字母
《自然语言处理实战入门》 基于知识图谱的问答机器人
Navicat data shows incomplete resolution
秒懂大模型 | 3步搞定AI写摘要
AOF重写
Hash collisions and consistent hashing
Day116. Shangyitong: Details of appointment registration ※