系统环境

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. c# winform项目用到的部分知识点总结

    项目用到的知识点总结,欢迎大家吐槽: /// <summary> /// 转换非yyyy-MM-dd的字符串为DateTime类型 /// </summary> public ...

  2. 设计模式学习--面向对象的5条设计原则之依赖倒置原则--DIP

    一.DIP简介(DIP--Dependency Inversion Principle): 1.高层模块不应该依赖于低层模块,二者都应该依赖于抽象.2.抽象不应该依赖于细节,细节应该依赖于抽象.   ...

  3. 009.在C#.NET中使用Froms验证

    原文:https://support.microsoft.com/en-us/kb/301240 (Aty表示本人) 这篇文章演示如何通过数据库,实现Froms验证 必需 Mircosoft Visu ...

  4. IBatis项目中com.ibatis.common.xml.NodeletException的解决方案

    一 现象: 今天在写IBatis项目是总是提示我有如下异常: com.ibatis.common.xml.NodeletException java.util.NoSuchElementExcepti ...

  5. MVC 使用Quartz.Net组件实现定时计划任务

    最近,项目中需要执行一个计划任务,组长就让我了解一下Quartz.net 这个组件,挺简单的一个组件,实现起来特别的方便,灵活,值得推荐给大家一起学习一下这个小工具.以前我有的时候是使用定时器Time ...

  6. 设计模式学习——抽象工厂模式(Abstract Factory Pattern)

    现有一批装备(产品),分为不同的部位(上装.下装)与不同的等级(lv1.lv2).又有不同lv的工厂,只生产对应lv的全套装备. 代码实现上...本次写得比较偷懒,函数实现都写在头文件了.... 有些 ...

  7. 给model模型传数组参数

    $res = $this->Company->companyDischarge($this->user_id,array(0=>'c.limit_sum>0',1=> ...

  8. [转]关于浏览器css选择器性能优化

    作为一个前端开发, 我觉得很有必要了解浏览器对css选择器的解析,因为这个关系到页面的渲染,高效的方式.避开开销大的方式这些无疑为网站加载缩短了时间. 最近在新的项目中陷入了一个误区,也是出于对jqu ...

  9. Git——远程操作详解

    转载自:http://www.ruanyifeng.com/blog/2014/06/git_remote.html 作者: 阮一峰 日期: 2014年6月12日 Git是目前最流行的版本管理系统,学 ...

  10. css清除浮动之天龙8步

    1.父级div定义height. 2.结尾处加空div标签clear:both. 3.父级div定义伪类:after和zoom. 4.父级div定义overflow:hidden. 5.父级div定义 ...