{"id":3970,"date":"2012-09-25T23:51:00","date_gmt":"2012-09-25T15:51:00","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=3970"},"modified":"2023-04-28T09:48:59","modified_gmt":"2023-04-28T09:48:59","slug":"how-to-install-postgresql-9-2-on-centos-6-3","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-postgresql-9-2-on-centos-6-3\/","title":{"rendered":"How to Install PostgreSQL 9.2 on CentOS 6.3"},"content":{"rendered":"<p><img decoding=\"async\" class=\"size-thumbnail wp-image-1216 alignleft lazyload\" title=\"postgresql\" data-src=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2011\/06\/postgresql-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" data-srcset=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2011\/06\/postgresql-150x150.jpg 150w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2011\/06\/postgresql-100x100.jpg 100w\" data-sizes=\"(max-width: 150px) 100vw, 150px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 150px; --smush-placeholder-aspect-ratio: 150\/150;\" \/>This quick post shows the basic steps to install PostgreSQL Database Server (PostgreSQL 9.2) on CentOS 6.3. This steps has been tested using CentOS 6.3. However, It may works on other version CentOS or Redhat as well. PostgreSQL is a Sophisticated open-source Object-Relational DBMS supporting almost all SQL constructs, including subselects, transactions, and user-defined types. PostgreSQL is a powerful, open source object-relational database system that available for many platforms including Linux, FreeBSD, Solaris, Microsoft Windows and Mac OS X.<\/p>\n<p>PostgreSQL Global Development Group (PGDG) builds RPMs for various Linux distributions. At the time of this writing, there are available RPMs and SRPMs for the following platforms :<\/p>\n<ul>\n<li><a name=\"pg92\"><\/a><strong>PostgreSQL 9.2<\/strong><\/li>\n<\/ul>\n<p><a name=\"pg91fedora\"><\/a><\/p>\n<ul>\n<ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/fedora\/fedora-17-x86_64\/pgdg-fedora92-9.2-5.noarch.rpm\">Fedora 17 &#8211; x86_64<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/fedora\/fedora-16-i386\/pgdg-fedora92-9.2-5.noarch.rpm\">Fedora 16 &#8211; i686<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/fedora\/fedora-16-x86_64\/pgdg-fedora92-9.2-5.noarch.rpm\">Fedora 16 &#8211; x86_64<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/fedora\/fedora-15-i386\/pgdg-fedora92-9.2-5.noarch.rpm\">Fedora 15 &#8211; i686<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/fedora\/fedora-15-x86_64\/pgdg-fedora92-9.2-5.noarch.rpm\">Fedora 15 &#8211; x86_64<\/a><\/li>\n<\/ul>\n<\/ul>\n<\/ul>\n<p><a name=\"pg92redhat\"><\/a><\/p>\n<ul>\n<ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/redhat\/rhel-6-i386\/pgdg-redhat92-9.2-6.noarch.rpm\">Red Hat Enterprise Linux 6 &#8211; i386<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/redhat\/rhel-6-x86_64\/pgdg-redhat92-9.2-6.noarch.rpm\">Red Hat Enterprise Linux 6 &#8211; x86_64<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/redhat\/rhel-6-i386\/pgdg-sl92-9.2-7.noarch.rpm\">Scientific Linux 6 &#8211; i386<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/redhat\/rhel-6-x86_64\/pgdg-sl92-9.2-7.noarch.rpm\">Scientific Linux 6 &#8211; x86_64<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/redhat\/rhel-6-i386\/pgdg-centos92-9.2-5.noarch.rpm\">CentOS 6 &#8211; i386<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/redhat\/rhel-6-x86_64\/pgdg-centos92-9.2-5.noarch.rpm\">CentOS 6 &#8211; x86_64<\/a><\/li>\n<\/ul>\n<\/ul>\n<\/ul>\n<p><a name=\"pg92redhat\"><\/a><\/p>\n<ul>\n<ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/redhat\/rhel-5-i386\/pgdg-redhat92-9.2-6.noarch.rpm\">Red Hat Enterprise Linux 5 &#8211; i386<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/redhat\/rhel-5-x86_64\/pgdg-redhat92-9.2-6.noarch.rpm\">Red Hat Enterprise Linux 5 &#8211; x86_64<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/redhat\/rhel-5-i386\/pgdg-sl92-9.2-7.noarch.rpm\">Scientific Linux 5 &#8211; i386<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/redhat\/rhel-5-x86_64\/pgdg-sl92-9.2-7.noarch.rpm\">Scientific Linux 5 &#8211; x86_64<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/redhat\/rhel-5-i386\/pgdg-centos92-9.2-5.noarch.rpm\">CentOS 5 &#8211; i386<\/a><\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/yum.pgrpms.org\/9.2\/redhat\/rhel-5-x86_64\/pgdg-centos92-9.2-5.noarch.rpm\">CentOS 5 &#8211; x86_64<\/a><\/li>\n<\/ul>\n<\/ul>\n<\/ul>\n<p>Follow these steps to install PostgreSQL 9.2 on CentOS 6.3 :<\/p>\n<p>1. Download the latest production release for your distro here: http:\/\/yum.pgrpms.org\/repopackages.php<\/p>\n<pre>[root@centos63 ~]# wget http:\/\/yum.pgrpms.org\/9.2\/redhat\/rhel-6-i386\/pgdg-centos92-9.2-5.noarch.rpm\n--2012-09-25 21:50:05--  http:\/\/yum.pgrpms.org\/9.2\/redhat\/rhel-6-i386\/pgdg-centos92-9.2-5.noarch.rpm\nResolving yum.pgrpms.org... 98.129.198.114\nConnecting to yum.pgrpms.org|98.129.198.114|:80... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 5220 (5.1K) [application\/x-redhat-package-manager]\nSaving to: \u00e2pgdg-centos92-9.2-5.noarch.rpm\u00e2\n\n100%[==========================================================&gt;] 5,220       4.76K\/s   in 1.1s\n\n2012-09-25 21:50:06 (4.76 KB\/s) - \u00e2pgdg-centos92-9.2-5.noarch.rpm\u00e2<\/pre>\n<p>2. Install the repo :<\/p>\n<pre>[root@centos63 ~]# rpm -ivh pgdg-centos92-9.2-5.noarch.rpm\nPreparing...                ########################################### [100%]\n   1:pgdg-centos92          ########################################### [100%]<\/pre>\n<p>3. Edit the CentOS-Base.repo to exclude postgreql.<\/p>\n<pre>[root@centos63 ~]# vi \/etc\/yum.repos.d\/CentOS-Base.repo<\/pre>\n<p>Add &#8216;exclude=postgresql*&#8217; to the [base] and [updates] sections:<\/p>\n<pre>[base]\nname=CentOS-$releasever - Base\nmirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&amp;arch=$basearch&amp;repo=os\n#baseurl=http:\/\/mirror.centos.org\/centos\/$releasever\/os\/$basearch\/\ngpgcheck=1\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-CentOS-6\nexclude=postgresql*\n\n#released updates\n[updates]\nname=CentOS-$releasever - Updates\nmirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&amp;arch=$basearch&amp;repo=updates\n#baseurl=http:\/\/mirror.centos.org\/centos\/$releasever\/updates\/$basearch\/\ngpgcheck=1\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-CentOS-6\nexclude=postgresql*<\/pre>\n<p>4. Use &#8216;yum list&#8217; to check the packages that are now available.<\/p>\n<pre>[root@centos63 ~]# yum list postgres*\nLoaded plugins: fastestmirror, presto, priorities\nLoading mirror speeds from cached hostfile\n * base: centos.ipserverone.com\n * extras: centos.ipserverone.com\n * updates: centos.ipserverone.com\nAvailable Packages\npostgresql.i686                              8.4.11-1.el6_2                     CentOS6.3-Repository\npostgresql-contrib.i686                      8.4.11-1.el6_2                     CentOS6.3-Repository\npostgresql-devel.i686                        8.4.11-1.el6_2                     CentOS6.3-Repository\npostgresql-docs.i686                         8.4.11-1.el6_2                     CentOS6.3-Repository\npostgresql-jdbc.i686                         8.4.701-3.el6                      CentOS6.3-Repository\npostgresql-jdbc.noarch                       8.4.701-8.el6                      CentOS6.3-Repository\npostgresql-libs.i686                         8.4.11-1.el6_2                     CentOS6.3-Repository\npostgresql-odbc.i686                         08.04.0200-1.el6                   CentOS6.3-Repository\npostgresql-plperl.i686                       8.4.11-1.el6_2                     CentOS6.3-Repository\npostgresql-plpython.i686                     8.4.11-1.el6_2                     CentOS6.3-Repository\npostgresql-pltcl.i686                        8.4.11-1.el6_2                     CentOS6.3-Repository\npostgresql-server.i686                       8.4.11-1.el6_2                     CentOS6.3-Repository\npostgresql-test.i686                         8.4.11-1.el6_2                     CentOS6.3-Repository\npostgresql92.i686                            9.2.1-1PGDG.rhel6                  pgdg92\npostgresql92-contrib.i686                    9.2.1-1PGDG.rhel6                  pgdg92\npostgresql92-debuginfo.i686                  9.2.1-1PGDG.rhel6                  pgdg92\npostgresql92-devel.i686                      9.2.1-1PGDG.rhel6                  pgdg92\npostgresql92-docs.i686                       9.2.1-1PGDG.rhel6                  pgdg92\npostgresql92-libs.i686                       9.2.1-1PGDG.rhel6                  pgdg92\npostgresql92-odbc.i686                       09.01.0200-1PGDG.rhel6             pgdg92\npostgresql92-odbc-debuginfo.i686             09.01.0200-1PGDG.rhel6             pgdg92\npostgresql92-plperl.i686                     9.2.1-1PGDG.rhel6                  pgdg92\npostgresql92-plpython.i686                   9.2.1-1PGDG.rhel6                  pgdg92\npostgresql92-pltcl.i686                      9.2.1-1PGDG.rhel6                  pgdg92\npostgresql92-server.i686                     9.2.1-1PGDG.rhel6                  pgdg92\npostgresql92-tcl.i686                        2.0.0-1.rhel6                      pgdg92\npostgresql92-tcl-debuginfo.i686              2.0.0-1.rhel6                      pgdg92\npostgresql92-test.i686                       9.2.1-1PGDG.rhel6                  pgdg92<\/pre>\n<p>5. Start install PostgreSQL 9 using yum:<\/p>\n<pre>[root@centos63 ~]# yum install postgresql92 postgresql92-devel postgresql92-server postgresql92-libs postgresql92-contrib -y<\/pre>\n<p>6. Verify, Initialize and Start PostgreSQL service :<\/p>\n<pre>[root@centos63 ~]# service postgresql-9.2 status\n is stopped\n[root@centos63 ~]# service postgresql-9.2 initdb\nInitializing database:                                     [  OK  ]\n[root@centos63 ~]# service postgresql-9.2 start\nStarting postgresql-9.2 service:                           [  OK  ]<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This quick post shows the basic steps to install PostgreSQL Database Server (PostgreSQL 9.2) on CentOS 6.3. This steps has been tested using CentOS 6.3. However, It may works on&#8230;<\/p>\n","protected":false},"author":6,"featured_media":1216,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2055,1029],"tags":[1254,1322,1536,1665],"class_list":["post-3970","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-postgresql","tag-centos-6-3","tag-database","tag-linux","tag-postgresql"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/3970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=3970"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/3970\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/1216"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=3970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=3970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=3970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}