Installing Postgres9.2 in Centos6.3

1:logining into root
su root


2:Download Postgresql Yum repo to Centos

[root@localhost ~]# wget http://yum.pgrpms.org/9.2/redhat/rhel-6.3-x86_64/pgdg-centos92-9.2-6.noarch.rpm


3. Install Repo into our Server

[root@localhost ~]# rpm -ivh pgdg-centos92-9.2-6.noarch.rpm
  
4:Exclude postgresql in CentOS-Base.repo


vi /etc/yum.repos.d/CentOS-Base.repo



5: Install Postgresql by yum

[root@localhost yum.repos.d]# yum install postgresql92 postgresql92-devel postgresql92-server postgresql92-libs postgresql92-contrib -y


6. Start Postgresql and
check postgresql process

[root@localhost yum.repos.d]# service postgresql-9.2 initdb
[root@localhost yum.repos.d]# /etc/init.d/postgresql-9.2 start 
[root@localhost yum.repos.d]# netstat -nutlap | grep post


7.Open
/var/lib/pgsql/9.2/data/postgresql.conf file, and add/uncomment/modify following: 
listen_addresses = '*' 
port = 5432


8:Edit
/etc/sysconfig/iptables file
[root@localhost yum.repos.d]# vi /etc/sysconfig/iptables
Add following line before -A
INPUT -j REJECT… -A INPUT -m state --state NEW -m tcp -p tcp
--dport 5432 -j ACCEPT
 
9:Set PostgreSQL
Permissions 


Modify PostgreSQL
/var/lib/pgsql/9.2/data/pg_hba.conf (host-based authentication)
file: host all phonelwc 192.168.1.1/32 md5


 10:restart postgres server

[root@localhost

yum.repos.d]#service postgresql-9.2restar


11:Linking:




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值