[其他]
Centos6.4 用yum安装postgresql9.0
[root@localhost ~]# wget http://yum.postgresql.org/9.0/redhat/rhel-6-x86_64/pgdg-centos90-9.0-5.noarch.rpm
[root@localhost ~]# rpm -ivh pgdg-centos90-9.0-5.noarch.rpm
[root@localhost ~]# less /etc/yum.repos.d/pgdg-90-centos.repo //确认repo
PostgreSQL依赖包删除
[root@localhost ~]# vi /etc/yum.repos.d/CentOS-Base.repo
[base]
exclude=postgresql*
[updates]
exclude=postgresql*
安装PostgreSQL
[root@localhost ~]# yum -y install postgresql postgresql-server postgresql-libs
启动Postgresql
[root@localhost ~]# service postgresql-9.0 initdb //初始化postgresql
[root@localhost ~]# service postgresql-9.0 start
[root@localhost ~]# chkconfig postgresql-9.0 on