{"id":2334,"date":"2012-03-17T16:45:24","date_gmt":"2012-03-17T08:45:24","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=2334"},"modified":"2023-04-28T09:49:39","modified_gmt":"2023-04-28T09:49:39","slug":"how-to-install-postgresql-database-server-on-linux-centos-6-2-server","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-postgresql-database-server-on-linux-centos-6-2-server\/","title":{"rendered":"How to Install PostgreSQL Database Server on Linux CentOS 6.2 Server"},"content":{"rendered":"<p>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. Follow these steps to install PostgreSQL database server on linux CentOS 6.2.<\/p>\n<p>1. Run the following command to install PostgreSQL Server and it&#8217;s related package :<\/p>\n<pre>\n[root@centos62 ~]# yum install postgresql-server postgresql -y\nLoaded plugins: fastestmirror\nLoading mirror speeds from cached hostfile\n * base: mirrors.hostemo.com\n * epel: ftp.riken.jp\n * extras: mirrors.hostemo.com\n * updates: mirrors.hostemo.com\nSetting up Install Process\nResolving Dependencies\n--> Running transaction check\n---> Package postgresql.i686 0:8.4.9-1.el6_1.1 will be installed\n--> Processing Dependency: postgresql-libs(x86-32) = 8.4.9-1.el6_1.1 for package: postgresql-8.4.9-1.el6_1.1.i686\n--> Processing Dependency: libpq.so.5 for package: postgresql-8.4.9-1.el6_1.1.i686\n---> Package postgresql-server.i686 0:8.4.9-1.el6_1.1 will be installed\n--> Running transaction check\n---> Package postgresql-libs.i686 0:8.4.9-1.el6_1.1 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n====================================================================================================\n Package                   Arch         Version                  Repository                    Size\n====================================================================================================\nInstalling:\n postgresql                i686         8.4.9-1.el6_1.1          CentOS6.2-Repository         2.7 M\n postgresql-server         i686         8.4.9-1.el6_1.1          CentOS6.2-Repository         3.3 M\nInstalling for dependencies:\n postgresql-libs           i686         8.4.9-1.el6_1.1          CentOS6.2-Repository         201 k\n\nTransaction Summary\n====================================================================================================\nInstall       3 Package(s)\n\nTotal download size: 6.2 M\nInstalled size: 28 M\nDownloading Packages:\n----------------------------------------------------------------------------------------------------\nTotal                                                                50 MB\/s | 6.2 MB     00:00\nRunning rpm_check_debug\nRunning Transaction Test\nTransaction Test Succeeded\nRunning Transaction\n  Installing : postgresql-libs-8.4.9-1.el6_1.1.i686                                             1\/3\n  Installing : postgresql-8.4.9-1.el6_1.1.i686                                                  2\/3\n  Installing : postgresql-server-8.4.9-1.el6_1.1.i686                                           3\/3\n\nInstalled:\n  postgresql.i686 0:8.4.9-1.el6_1.1             postgresql-server.i686 0:8.4.9-1.el6_1.1\n\nDependency Installed:\n  postgresql-libs.i686 0:8.4.9-1.el6_1.1\n\nComplete!\n<\/pre>\n<p>2. Check PostgreSQL status :<\/p>\n<pre>\n[root@centos62 ~]# service postgresql status\npostmaster is stopped\n<\/pre>\n<p>3. On Linux CentOS 6.2, you have to initialize PostgreSQL database first before starting postgresql server. Please type the following command :<\/p>\n<pre>\n[root@centos62 ~]# service postgresql initdb\nInitializing database:                                     [  OK  ]\n<\/pre>\n<p>4. Start PostgreSQL server :<\/p>\n<pre>\n[root@centos62 ~]# service postgresql start\nStarting postgresql service:                               [  OK  ]\n<\/pre>\n<p>Turn on and off whether PostgreSQL starts at boot :<\/p>\n<pre>\n[root@centos62 ~]# chkconfig postgresql on\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>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&#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":[1029],"tags":[1244,1253,1322,1536,1665],"class_list":["post-2334","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-postgresql","tag-centos","tag-centos-6-2","tag-database","tag-linux","tag-postgresql"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2334","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=2334"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2334\/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=2334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=2334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=2334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}