Toggle navigation
主页
English
K8S
Golang
Guitar
About Me
归档
标签
Welcome to Sanger's Blog!
yum安装postgresql 11
无
2023-11-15 17:22:39
26
0
0
sanger
[TOC] # 概述 环境:centos 7.x(实际是 Alibaba Cloud Linux (Aliyun Linux) 2.1903 LTS (Hunting Beagle)) 单数据节点,非集群方式 # 准备 ``` yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-redhat11-11-2.noarch.rpm -y ``` # 安装 ``` yum install postgresql11 postgresql11-server #初始化 /usr/pgsql-11/bin/postgresql-11-setup initdb ``` # 配置 ## /var/lib/pgsql/11/data/postgresql.conf ``` # 修改 listen_addresses = '*' ``` ## /var/lib/pgsql/11/data/pg_hba.conf ``` # 底部加上 # "local" is for Unix domain socket connections only local all all md5 # IPv4 local connections: host all all 0.0.0.0/0 md5 # IPv6 local connections: host all all ::1/128 ident # Allow replication connections from localhost, by a user with the # replication privilege. local replication all md5 host replication all 0.0.0.0/0 md5 host replication all ::1/128 ident ``` # 启动 ``` systemctl enable postgresql-11 systemctl start postgresql-11 ``` # 给postgresql设置密码 ``` su - postgre psql -c "alter user postgres with password '123456'" ``` # 检查 ``` #看看5432端口是否监听上 netstat -tpnl ``` # 参考 https://www.linuxprobe.com/centos7-postgresql11.html
上一篇:
harbor 2.9.1 安装
下一篇:
elasticsearch 6.x 安装
0
赞
26 人读过
新浪微博
微信
更多分享
腾讯微博
QQ空间
人人网
文档导航