zoukankan      html  css  js  c++  java
  • 离线安装 postgres 记录

    下载postgresql-11.10.tar.gz和ossp-uuid_1.6.2.orig.tar.gz

    
    $  useradd postgres
    $  chown -R postgres.postgres /home/postgres/
    $  tar -zxvf ossp-uuid_1.6.2.orig.tar.gz 
    $  cd uuid-1.6.2/
    $  ./configure
    $  make
    $  make install
    $  tar -zxvf postgresql-11.10.tar.gz
    $  cd postgresql-11.10/
    $  ./configure --prefix=/home/postgres --enable-thread-safety --with-uuid=ossp --with-libs=/usr/local/lib --with-includes=/usr/local/include
    $  make
    $  make install
    $  cd contrib
    $  make
    $  make install
    $  find / -name libuuid.so.16
    $  ln -s /usr/local/lib/libuuid.so.16 /home/postgres/lib
    $  su - postgres
    
    $  vim .bashrc
    PGHOME=/home/postgres
    export PGHOME
    PGDATA=$PGHOME/data
    export PGDATA
    PATH=$PATH:$HOME/.local/bin:$HOME/bin:$PGHOME/bin
    export LD_LIBRARY_PATH=/home/postgres/lib
    export PATH
    $  source .bashrc
    $  initdb -D $PGDATA  
    $  pg_ctl start -D $PGDATA
    $  vim $PGDATA/pg_hba.conf 
    # IPv4 local connections:
    host    all             all             0.0.0.0/0            trust
    $  vim $PGDATA/postgresql.conf
    listen_addresses = '*'
    port = 5432 
    $  pg_ctl restart -D $PGDATA
    
    $  psql -U postgres
    password
    $  firewall-cmd --zone=public --add-port=5432/tcp --permanent 
    $  firewall-cmd --reload
    $  ps -ef|grep postgresql
    
    
  • 相关阅读:
    JavaScript 的 Promise
    MacOS copy图标shell脚本
    ExtJS 修改load paging时的参数
    JSONP
    8种跨域解决方案
    Ext Store Proxy Ajax
    ExtJS 自定义组件
    MacOS Apache配置
    xshell 上传 下载文件
    shell 内网主机存活探测器
  • 原文地址:https://www.cnblogs.com/SuperDust/p/14384432.html
Copyright © 2011-2022 走看看