安装以及启动

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

最新文章

  1. 跟vczh看实例学编译原理——三:Tinymoe与无歧义语法分析
  2. Xenko基础API笔记2-手势
  3. javascript 重写已有的方法
  4. MySQLdb模块操作
  5. jps
  6. POJ 1416 Shredding Company
  7. 转:Android软件开发之PreferenceActivity中的组件
  8. (转).net开发者对android开发一周的学习体会
  9. 前端面试题整理(css)
  10. MySQL的create table as 与 like区别(转)
  11. storm搭建(1)zookeeper搭建
  12. 说声PHP的setter&getter(魔术)方法,你们辛苦了
  13. OSGi简介
  14. 专注于C#.Net WPF软件开发-软件反编译-软件破解-逆向-靖芯科技-包括安卓APK反编译
  15. Dynamics 365使用Execute Multiple Request删除系统作业实体记录
  16. 从0开始的Python学习010return语句&DocStrings
  17. Pygal之世界地图绘制from pygal.i18n import COUNTRIES 报错的解决办法
  18. PHP实现微信开发中提现功能(企业付款到用户零钱)
  19. Java高级特性 第15节 解析XML文档(3) - JDOM和DOM4J技术
  20. 手游开发之lua的class函数详解

热门文章

  1. python 文件单行循环读取的坑(一个程序中,文件默认只能按行循环读取一次,即使写到另一个循环里,它也只读取一次)
  2. Window下设置Octave
  3. vim编辑器的使用技巧——忽略字母大小写
  4. IDEA使用中的快捷键
  5. php chr()函数 语法
  6. php sqrt()函数 语法
  7. 【Elasticsearch】清空指定index/type下的数据
  8. 2018-2019 2 20165203 《网络对抗技术》Exp9 Web安全基础
  9. Docker容器数据卷volumes-from
  10. 109、TensorFlow计算张量的值