Welcome 微信登录

首页 / 数据库 / MySQL / CentOS 6.3环境下yum安装PostgreSQL 9.3

PostgreSQL 是一种非常复杂的对象-关系型数据库管理系统(ORDBMS),也是目前功能最强大,特性最丰富和最复杂的自由软件数据库系统。有些特性甚至连商业数据库都不具备。这个起源于伯克利(BSD)的数据库研究计划目前已经衍生成一项国际开发项目,并且有非常广泛的用户。下面记录CentOS 6.3环境下yum安装Postgres 9.3的简要过程。------------------------------------华丽丽的分割线------------------------------------PostgreSQL缓存详述 http://www.linuxidc.com/Linux/2013-07/87778.htmWindows平台编译 PostgreSQL http://www.linuxidc.com/Linux/2013-05/85114.htmUbuntu下LAPP(Linux+Apache+PostgreSQL+PHP)环境的配置与安装 http://www.linuxidc.com/Linux/2013-04/83564.htmUbuntu上的phppgAdmin安装及配置 http://www.linuxidc.com/Linux/2011-08/40520.htmCentOS平台下安装PostgreSQL9.3 http://www.linuxidc.com/Linux/2014-05/101723.htmPostgreSQL配置Streaming Replication集群 http://www.linuxidc.com/Linux/2014-05/101724.htm------------------------------------华丽丽的分割线------------------------------------1.查看已安装的包# rpm -qa|grep postgres如果已经存在//卸载 # rpm -e postgresql92-server-9.2.4-1PGDG.rhel6.i686# rpm -e postgresql92-contrib-9.2.4-1PGDG.rhel6.i686# rpm -e postgresql92-9.2.4-1PGDG.rhel6.i686# rpm -e postgresql92-libs-9.2.4-1PGDG.rhel6.i6862. yum 安装yum install http://yum.postgresql.org/9.3/RedHat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm
 yum install postgresql93-server postgresql93-contrib//初始化
 service postgresql-9.3 initdb开启
 service postgresql-9.3 start或者/etc/init.d/postgresql-9.3 start查看安装结果
 
rpm -aq| grep postgres可以看到
 
[root@i-87-575-VM vmuser]# rpm -aq| grep postgres
 postgresql93-libs-9.3.4-1PGDG.rhel6.x86_64
 postgresql93-contrib-9.3.4-1PGDG.rhel6.x86_64
 postgresql93-9.3.4-1PGDG.rhel6.x86_64
 postgresql93-server-9.3.4-1PGDG.rhel6.x86_64说明已经安装好了。3.测试
  [root@i-87-575-VM vmuser]# su - postgres
 -bash-4.1$ psql -l
 默认密码为空,我们需要修改为指定的密码,这里设定为’postgres’。
 -bash-4.1$ psql
 
PostgreSQL 数据库默认会创建一个postgres的数据库用户作为数据库的管理员,默认密码为空,我们需要修改为指定的密码,这里设定为’postgres’。
 # ALTER USER postgres WITH PASSWORD "postgres";
 # select * from pg_shadow ;更加详细的信息可以参考 http://www.linuxidc.com/Linux/2014-05/101725.htm更多CentOS相关信息见CentOS 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=14本文永久更新链接地址