zoukankan      html  css  js  c++  java
  • Postgresql 安装

    version:Postgresql 9.5.2
    OS: CentOS 6.5
    Source Code: Postgresql9.5.2
    建议先 运行   yum list installed mysql*  命令 查看安装了哪些mysql
    卸载 yum remove mysql5.6(比如)
    同样 把 早期的 postgresql 版本卸载掉
    rpm -qa |grep postgre
    yum -y remove postgresql-libs-8.4.18-1.el6_4.x86_64
     
     
    安装 postgresql 需要 mysql5.1版本(yum groupinstall "Additional Development" "Additional Development" 会自动安装并配置)
     
    1、
    yum groupinstall "Additional Development" "Additional Development"
         cd /tmp/
         tar xf postgresql-9.5.2.tar.bz2
         cd postgresql-9.5.2
         ./configure --prefix=/usr/local/postgresql
    /如果确实gcc组件则 安装gcc组件包
    yum install gcc
    /
         make
         make install
         adduser postgres
         mkdir /usr/local/postgresql/data
         chown postgres /usr/local/postgresql/data/
     
    cd /usr/local/postgresql/
    chmod 0700 data
     
    2、
         su - postgres
    3、
         /usr/local/postgresql/bin/initdb -D /usr/local/postgresql/data/
         /usr/local/postgresql/bin/postgres -D /usr/local/postgresql/data/ >logfile 2>&1 &
         /usr/local/postgresql/bin/createdb test
         /usr/local/postgresql/bin/psql test
     
    4、
         iptables -I INPUT -p tcp --dport 5432 -j ACCEPT
         echo 'PATH=$PATH:/usr/local/postgresql/bin' >> /etc/profile
         echo 'PGDATA=/usr/local/postgresql/data' >> /etc/profile
         source /etc/profile
  • 相关阅读:
    POJ2175 Evacuation Plan
    POJ3252 Round Numbers
    POJ2115 C Looooops
    POJ3422 Kaka's Matrix Travels
    POJ1659 Frogs' Neighborhood
    POJ2635 The Embarrassed Cryptographer
    POJ3436 ACM Computer Factory
    FZU1607 Greedy division
    EOJ440 Buying Feed
    POJ2135 Farm Tour
  • 原文地址:https://www.cnblogs.com/zhaowenzhong/p/5667402.html
Copyright © 2011-2022 走看看