zoukankan      html  css  js  c++  java
  • postgres服务安装,启动和配置

    安装以及启动

    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

    #查看
    pg_ctl status -D /data/postgresql/data
  • 相关阅读:
    中断解析
    中断分类
    中断分类
    在iOS开发中使用FMDB
    大数据权限授权管理框架:Apache Sentry和Ranger
    Flink FileSystem的connector分析
    Flink FileSystem的connector分析
    Flink JobManager的HA原理分析
    Flink JobManager的HA原理分析
    Flink的State概述
  • 原文地址:https://www.cnblogs.com/mmyy-blog/p/11643357.html
Copyright © 2011-2022 走看看