postgres服务安装,启动和配置
2024-09-06 09:43:40
安装以及启动
yum install readline-devel
tar xf postgresql-11.1.tar.gz
cd postgresql-11.1
./configure --prefix=/data/postgresql
make && make install
# useradd postgres
# groupadd postgres
mkdir /data/postgresql/data
chown postgres.postgres /data/postgresql/data
su - postgres #数据库初始化
/data/postgresql/bin/initdb -D /data/postgresql/data
#配置允许ip访问
vim /data/postgresql/data/pg_hba.conf
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 192.168.137.3/24 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all trust
host replication all 127.0.0.1/32 trust
host replication all ::1/128 trust
host all all * md5
#修改监听地址和连接端口
vim /data/postgresql/data/postgresql.conf
listen_addresses = '*'
port = 5432
#启动(以postgres用户启动)
/data/postgresql/bin/pg_ctl -D /data/postgresql/data -l /data/postgresql/data/logfile start #重新加载配置
/data/postgresql/bin/pg_ctl -D /data/postgresql/data reload
最新文章
- 跟vczh看实例学编译原理——三:Tinymoe与无歧义语法分析
- Xenko基础API笔记2-手势
- javascript 重写已有的方法
- MySQLdb模块操作
- jps
- POJ 1416 Shredding Company
- 转:Android软件开发之PreferenceActivity中的组件
- (转).net开发者对android开发一周的学习体会
- 前端面试题整理(css)
- MySQL的create table as 与 like区别(转)
- storm搭建(1)zookeeper搭建
- 说声PHP的setter&;getter(魔术)方法,你们辛苦了
- OSGi简介
- 专注于C#.Net WPF软件开发-软件反编译-软件破解-逆向-靖芯科技-包括安卓APK反编译
- Dynamics 365使用Execute Multiple Request删除系统作业实体记录
- 从0开始的Python学习010return语句&;DocStrings
- Pygal之世界地图绘制from pygal.i18n import COUNTRIES 报错的解决办法
- PHP实现微信开发中提现功能(企业付款到用户零钱)
- Java高级特性 第15节 解析XML文档(3) - JDOM和DOM4J技术
- 手游开发之lua的class函数详解