RedHat 7 安装PostgreSQL 10.5
系统环境
Redhat:
Version: 7.4.1708
Architecture: x86_64
Address:
10.127.1.11
User:
root
Uassword:
redhat
Postgresql:
version: 10
platform: Redhat Enterprise Linux 7
architecture: x86_64
Address:
10.127.1.11
User:
postgres
Uassword:
redhat
具体安装
- Install the repository RPM:
yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat10-10-2.noarch.rpm
- Install the client packages:
yum install postgresql10
- Optionally install the server packages:
yum install postgresql10-server
- Optionally initialize the database and enable automatic start:
/usr/pgsql-10/bin/postgresql-10-setup initdb
systemctl enable postgresql-10
systemctl start postgresql-10
远程连接
- Modify user password
su - postgres
切换用户,执行后提示符会变为 '-bash-4.2$'
psql -U postgres
登录数据库,执行后提示符变为 'postgres=#'
ALTER USER postgres WITH PASSWORD 'postgres';
设置postgres用户密码为postgres
\q
退出数据库
- Open remote access
vim /var/lib/pgsql/10/data/postgresql.conf
修改#listen_addresses = 'localhost'
为 listen_addresses='*'
当然,此处'*'也可以改为任何你想开放的服务器IP
- Trusted remote connection
vim /var/lib/pgsql/10/data/pg_hba.conf
修改如下内容,信任指定服务器连接
# IPv4 local connections:
host all all 127.0.0.1/32 ident
host all all 0.0.0.0/0 (需要连接的服务器IP) md5
- Reboot service
systemctl restart postgresql-10
- Test connection

参考网子
https://www.postgresql.org/download/
RedHat 7 安装PostgreSQL 10.5的更多相关文章
- 在CentOS 7 / RHEL 7安装PostgreSQL 10
CentOS 到了7.x版本, PostgreSQL也来到了10.x版本. 前些天MySQL都直接跨到了8.0版本. 本文是一篇在CentOS 7.4上安装安装PostgreSQL 10.3 的教程. ...
- Ubuntu下编译安装postgreSQL 10.5
Ubuntu下编译安装postgreSQL 10.5 ubuntu 16.04 LTS系统postgreSQL 10.5 安装包准备 1.从PostgreSQL官网下载PostgreSQL的安装包 安 ...
- install postgresql 10 on redhat linux 7 Redhat 安装 postgresql 10
---恢复内容开始--- 1. install linux 2. 切换mirror a. 备份原来的repo 文件, [root@localhost ~]# mv /etc/yum.repos.d/ ...
- Redhat 7.2 编译安装PostgreSQL 10
1.环境说明 CentOS7.2 postgresql10.4 2.下载 postgresql的官方地址 https://www.postgresql.org/ftp/source/ 在下载列表中根据 ...
- Linux 安装 PostgreSQL
Linux 安装 PostgreSQL CentOS 7 安装 PostgreSQL 10 步骤 官网安装步骤,选择服务器和数据库版本,会给出相应的安装命令 # 安装 yum install -y h ...
- CentOS 7 安装、配置、使用 PostgreSQL 10 安装及基础配置
官网安装方法:https://www.postgresql.org/download/linux/redhat/ 卸载的话使用 yum remove 相应的安装 Install the reposit ...
- Ubuntu 18.04 下 PostgreSQL 10 的安装与基础配置
下载安装 在命令行执行如下语句: apt-get install postgresql-10 该指令会帮助你下载如下PostgreSQL组件: name |explain | ------------ ...
- Windows 10平台安装PostgreSQL 14.2详细教程
Windows 10平台安装postgreSQL 14.2.1,安装步骤很简单,基本上是点击下一步(next). 使用SQL Shell(psql)进行交互:使用pgAdmin工具进行管理. tips ...
- centos6.4下面安装postgresql以及客户端远程连接
一.安装 centos6.4服务器IP:192.168.220.131 window7客户端IP:192.168.199.218 在centos官网http://www.postgresql.org/ ...
随机推荐
- UUID生成随机数工具类
package com.qiyuan.util; import java.util.UUID; public class RanNum { /** * 生成随机数<br> * GUID: ...
- Java接口调用工具类
package com.qiyuan.util; import java.io.BufferedReader; import java.io.IOException; import java.io.I ...
- SpringMVC 使用 RESTful 架构实现 CRUD 操作
软件152 余建强 源码下载:http://download.csdn.net/detail/qq_35318576/9826210 1 使用框架 SpringMVC.Maven.Ajax.JSTL. ...
- 正则表达式匹配可以更快更简单 (but is slow in Java, Perl, PHP, Python, Ruby, ...)
source: https://swtch.com/~rsc/regexp/regexp1.html translated by trav, travmymail@gmail.com 引言 下图是两种 ...
- Django控制器
配置路由 通过对urls.py的配置将用户请求映射到处理函数. Django的URL字符串匹配实际上基于正则表达式,这允许单条URL可以匹配一类请求.参见Django Book中的示例: from d ...
- 【VUE】vue项目开发中,setTimeout等定时器的管理。
如果在一个组件中使用了定时器,当通过路由切换页面的时候 1.如果有同一个组件,定时器会叠加. 解决方案: computed:{ timer: { set (val) { this.$store.sta ...
- VB/C#获取资源Rources
VB.Net: My.Resources.ResourceManager.GetObject("data") C# Properties.Resources.文件名
- Spring Boot统一异常处理方案示例
一.异常处理的原则 1.调用方法的时候返回布尔值来代替返回null,这样可以 NullPointerException.由于空指针是java异常里最恶心的异常. 2. catch块里别不写代码.空ca ...
- c#+arcAE对图层进行各种渲染操作
转载:http://blog.sina.com.cn/s/blog_6023833e0100t5t0.html using System;using System.Collections.Generi ...
- Django基础五之django模型层(二)多表操作
一 创建模型 表和表之间的关系 一对一.多对一.多对多 ,用book表和publish表自己来想想关系,想想里面的操作,加外键约束和不加外键约束的区别,一对一的外键约束是在一对多的约束上加上唯一约束. ...