系统环境

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

具体安装

  1. 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

  2. Install the client packages:

    yum install postgresql10

  3. Optionally install the server packages:

    yum install postgresql10-server

  4. Optionally initialize the database and enable automatic start:

    /usr/pgsql-10/bin/postgresql-10-setup initdb
    systemctl enable postgresql-10
    systemctl start postgresql-10

远程连接

  1. Modify user password

    su - postgres

    切换用户,执行后提示符会变为 '-bash-4.2$'

    psql -U postgres

    登录数据库,执行后提示符变为 'postgres=#'

    ALTER USER postgres WITH PASSWORD 'postgres';

    设置postgres用户密码为postgres

    \q

    退出数据库

  2. Open remote access

    vim /var/lib/pgsql/10/data/postgresql.conf

    修改#listen_addresses = 'localhost'

    为 listen_addresses='*'

    当然,此处'*'也可以改为任何你想开放的服务器IP

  3. 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

  4. Reboot service

    systemctl restart postgresql-10

  5. Test connection

参考网子

https://www.postgresql.org/download/

RedHat 7 安装PostgreSQL 10.5的更多相关文章

  1. 在CentOS 7 / RHEL 7安装PostgreSQL 10

    CentOS 到了7.x版本, PostgreSQL也来到了10.x版本. 前些天MySQL都直接跨到了8.0版本. 本文是一篇在CentOS 7.4上安装安装PostgreSQL 10.3 的教程. ...

  2. Ubuntu下编译安装postgreSQL 10.5

    Ubuntu下编译安装postgreSQL 10.5 ubuntu 16.04 LTS系统postgreSQL 10.5 安装包准备 1.从PostgreSQL官网下载PostgreSQL的安装包 安 ...

  3. install postgresql 10 on redhat linux 7 Redhat 安装 postgresql 10

    ---恢复内容开始--- 1. install linux 2. 切换mirror a. 备份原来的repo  文件, [root@localhost ~]# mv /etc/yum.repos.d/ ...

  4. Redhat 7.2 编译安装PostgreSQL 10

    1.环境说明 CentOS7.2 postgresql10.4 2.下载 postgresql的官方地址 https://www.postgresql.org/ftp/source/ 在下载列表中根据 ...

  5. Linux 安装 PostgreSQL

    Linux 安装 PostgreSQL CentOS 7 安装 PostgreSQL 10 步骤 官网安装步骤,选择服务器和数据库版本,会给出相应的安装命令 # 安装 yum install -y h ...

  6. CentOS 7 安装、配置、使用 PostgreSQL 10 安装及基础配置

    官网安装方法:https://www.postgresql.org/download/linux/redhat/ 卸载的话使用 yum remove 相应的安装 Install the reposit ...

  7. Ubuntu 18.04 下 PostgreSQL 10 的安装与基础配置

    下载安装 在命令行执行如下语句: apt-get install postgresql-10 该指令会帮助你下载如下PostgreSQL组件: name |explain | ------------ ...

  8. Windows 10平台安装PostgreSQL 14.2详细教程

    Windows 10平台安装postgreSQL 14.2.1,安装步骤很简单,基本上是点击下一步(next). 使用SQL Shell(psql)进行交互:使用pgAdmin工具进行管理. tips ...

  9. centos6.4下面安装postgresql以及客户端远程连接

    一.安装 centos6.4服务器IP:192.168.220.131 window7客户端IP:192.168.199.218 在centos官网http://www.postgresql.org/ ...

随机推荐

  1. 小游戏专场:腾讯云Game-Tech技术沙龙上海站顺利落下帷幕

    欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由腾讯游戏云发表于云+社区专栏 9月14日腾讯云GAME-TECH技术沙龙小游戏专场在上海顺利举办,此次技术沙龙由腾讯云的资深专家,以及 ...

  2. 远程通信机制RPC与RMI的关系

     1.RPC RPC(Remote Procedure Call Protocol)远程过程调用协议,它是一种通过网络从远程计算机程序上请求服务,而不需要了解底层网络技术的协议.RPC不依赖于具体的网 ...

  3. 使用ichartjs进行布局图表页面

    先说官网  http://www.ichartjs.com/ 进入里面会有一个可视化布局系统,布局起来自己想要的样式快捷方便,和bootstrap可视化布局系统是一个道理的.

  4. wcf win7+iis7 异常消息为: 可能证书“CN=PmsWcfServer”没有能够进行密钥交换的私钥

    原因是证书没有用户权限,解决方法: 1.开始-运行-mmc 2.添加[证书]管理单元 3.选择[证书(本地计算机)]-[个人]-[证书],右击PmsWcfServer证书-[所有任务]-[管理密钥] ...

  5. Shell脚本编写3---Shell 传递参数

    我们可以在执行 Shell 脚本时,向脚本传递参数,脚本内获取参数的格式为:$n.n 代表一个数字,1 为执行脚本的第一个参数,2 为执行脚本的第二个参数,以此类推…… 执行脚本,查看输出结果: 另外 ...

  6. Ionic开发之如何修改Cordova插件

    由于大多数的Cordova plugin都是国外的,一些提示信息通常都是英文, 这就需要我们自己修改成中文信息. 除此之外,还有可能插件的样式,皮肤等和整体项目的风格不一致,这个时候也是要修改的. 可 ...

  7. iOS交互h5— JavaScriptCore ---UIWebview

    JavaScriptCore这个框架,从而让web页面和本地原生应用交互起来非常方便,而且使用此框架可以做到Android那边和iOS相对统一, web前端 在三端交互中,web前端开发人员来定义,让 ...

  8. 撩课-Web大前端每天5道面试题-Day26

    1.vuejs与angularjs以及react的区别? .与AngularJS的区别 相同点: 都支持指令:内置指令和自定义指令. 都支持过滤器:内置过滤器和自定义过滤器. 都支持双向数据绑定. 都 ...

  9. python 历险记(五)— python 中的模块

    目录 前言 基础 模块化程序设计 模块化有哪些好处? 什么是 python 中的模块? 引入模块有几种方式? 模块的查找顺序 模块中包含执行语句的情况 用 dir() 函数来窥探模块 python 的 ...

  10. yum 安装php7.1

    yum install http://rpms.remirepo.net/enterprise/remi-release-6.rpm yum -y install php71-php.x86_64 p ...