<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Install postgresql in Centos Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/install-postgresql-in-centos/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Sun, 15 Jul 2018 22:49:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How to Install PostgreSQL 10 on CentOS/RHEL 7/6 and Fedora 27/28</title>
		<link>https://www.osradar.com/how-to-install-postgresql-10-on-centos-rhel-7-6-and-fedora-27-28/</link>
					<comments>https://www.osradar.com/how-to-install-postgresql-10-on-centos-rhel-7-6-and-fedora-27-28/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Sun, 15 Jul 2018 21:51:15 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Install postgresql in Centos]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=4814</guid>

					<description><![CDATA[<p>PostgreSQL is an open source object-relational, highly scalable, SQL compliant database management system. PostgreSQL, often simply Postgres, is an object-relational database management system (ORDBMS) with an emphasis on extensibility and standards compliance. As a database server, its primary functions are to store data securely and return that data in response to requests from other software [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-postgresql-10-on-centos-rhel-7-6-and-fedora-27-28/">How to Install PostgreSQL 10 on CentOS/RHEL 7/6 and Fedora 27/28</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>PostgreSQL is an open source object-relational, highly scalable, SQL compliant database management system. <b>PostgreSQL</b>, often simply <b>Postgres</b>, is an object-relational database management system (ORDBMS) with an emphasis on extensibility and standards compliance. As a database server, its primary functions are to store data securely and return that data in response to requests from other software applications. It can handle workloads ranging from small single-machine applications to large Internet-facing applications (or for data warehousing) with many concurrent users; on macOS Server, PostgreSQL is the default database;<sup id="cite_ref-OS_X_Lion_Server_11-0" class="reference"></sup> and it is also available for Microsoft Windows and Linux (supplied in most distributions).</p>
<p>. This article will help you to  install PostgreSQL on CentOS, RHEL and Fedora Systems.</p>
<p><strong>Add PostgreSQL Yum Repository</strong></p>
<p>The first step is to install PostgreSQL repository in your system, Use one of below commands as per your system architecture and operating system.</p>
<h3><strong>CentOS/ 7 ###</strong></h3>
<pre>rpm -Uvh https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm</pre>
<h3><img loading="lazy" class="alignnone size-full wp-image-4819" src="https://www.osradar.com/wp-content/uploads/2018/07/post11.png" alt="" width="817" height="152" srcset="https://www.osradar.com/wp-content/uploads/2018/07/post11.png 817w, https://www.osradar.com/wp-content/uploads/2018/07/post11-300x56.png 300w, https://www.osradar.com/wp-content/uploads/2018/07/post11-768x143.png 768w, https://www.osradar.com/wp-content/uploads/2018/07/post11-696x129.png 696w" sizes="(max-width: 817px) 100vw, 817px" /></h3>
<h3><strong>CentOS/ 6 ###</strong></h3>
<pre>rpm -Uvh https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-6-x86_64/pgdg-centos10-10-2.noarch.rpm</pre>
<h3><strong>Fedora 27 ###</strong></h3>
<pre>rpm -Uvh https://download.postgresql.org/pub/repos/yum/10/fedora/fedora-27-x86_64/pgdg-fedora10-10-4.noarch.rpm</pre>
<h3><strong>Fedora 28 ###</strong></h3>
<pre>rpm -Uvh https://download.postgresql.org/pub/repos/yum/10/fedora/fedora-28-x86_64/pgdg-fedora10-10-4.noarch.rpm</pre>
<h2><strong>Installing PostgreSQL Server</strong></h2>
<p>After enabling PostgreSQL yum repository in your system use following command to install PostgreSQL 10 on your system with yum package manager.</p>
<pre>yum install postgresql10-server postgresql10</pre>
<p><img loading="lazy" class="alignnone size-full wp-image-4820" src="https://www.osradar.com/wp-content/uploads/2018/07/post12.png" alt="" width="1038" height="350" srcset="https://www.osradar.com/wp-content/uploads/2018/07/post12.png 1038w, https://www.osradar.com/wp-content/uploads/2018/07/post12-300x101.png 300w, https://www.osradar.com/wp-content/uploads/2018/07/post12-768x259.png 768w, https://www.osradar.com/wp-content/uploads/2018/07/post12-1024x345.png 1024w, https://www.osradar.com/wp-content/uploads/2018/07/post12-696x235.png 696w" sizes="(max-width: 1038px) 100vw, 1038px" /></p>
<h2><strong>Initializing PGDATA</strong></h2>
<p>After installing PostgreSQL server, It’s required to initialize it before using the first time. To initialize database use below command.  /usr/pgsql-10/bin/postgresql-10-setup initdb</p>
<pre>[root@iptables-server ~]# /usr/pgsql-10/bin/postgresql-10-setup initdb
Initializing database ... OK</pre>
<p>&nbsp;</p>
<p>Above command will  initialize PostgreSQL first time. PGDATA environment variable contains the path of the data directory.</p>
<p>PostgreSQL data directory Path is : /var/lib/pgsql/10/data/</p>
<pre>[root@iptables-server ~]# ls /var/lib/pgsql/10/data/ -altr
total 52
drwx------. 4 postgres postgres 51 Jul 15 17:33 ..
-rw-------. 1 postgres postgres 3 Jul 15 17:33 PG_VERSION
drwx------. 2 postgres postgres 6 Jul 15 17:33 pg_twophase
drwx------. 2 postgres postgres 6 Jul 15 17:33 pg_tblspc
drwx------. 2 postgres postgres 6 Jul 15 17:33 pg_stat_tmp
drwx------. 2 postgres postgres 6 Jul 15 17:33 pg_stat
drwx------. 2 postgres postgres 6 Jul 15 17:33 pg_snapshots
drwx------. 2 postgres postgres 6 Jul 15 17:33 pg_serial
drwx------. 2 postgres postgres 6 Jul 15 17:33 pg_replslot
drwx------. 4 postgres postgres 36 Jul 15 17:33 pg_multixact
drwx------. 2 postgres postgres 6 Jul 15 17:33 pg_dynshmem
drwx------. 2 postgres postgres 6 Jul 15 17:33 pg_commit_ts
-rw-------. 1 postgres postgres 22775 Jul 15 17:33 postgresql.conf
-rw-------. 1 postgres postgres 88 Jul 15 17:33 postgresql.auto.conf
-rw-------. 1 postgres postgres 1636 Jul 15 17:33 pg_ident.conf
-rw-------. 1 postgres postgres 4269 Jul 15 17:33 pg_hba.conf
drwx------. 2 postgres postgres 18 Jul 15 17:33 pg_xact
drwx------. 3 postgres postgres 60 Jul 15 17:33 pg_wal
drwx------. 2 postgres postgres 18 Jul 15 17:33 pg_subtrans
drwx------. 2 postgres postgres 18 Jul 15 17:33 pg_notify
drwx------. 2 postgres postgres 4096 Jul 15 17:33 global
drwx------. 5 postgres postgres 41 Jul 15 17:33 base
drwx------. 4 postgres postgres 68 Jul 15 17:33 pg_logical
drwx------. 2 postgres postgres 6 Jul 15 17:33 log

</pre>
<h2><strong>Start / Enable  PostgreSQL Server</strong></h2>
<p>To start PostgreSQL service using the following command as per your operating systems. Also, enable PostgreSQL service to autostart on system boot.</p>
<p><strong>For CentOS/RHEL 7 and Fedora</strong></p>
<pre>systemctl start postgresql-10
systemctl enable postgresql-10</pre>
<p><img loading="lazy" class="alignnone size-full wp-image-4822" src="https://www.osradar.com/wp-content/uploads/2018/07/post13.png" alt="" width="871" height="525" srcset="https://www.osradar.com/wp-content/uploads/2018/07/post13.png 871w, https://www.osradar.com/wp-content/uploads/2018/07/post13-300x181.png 300w, https://www.osradar.com/wp-content/uploads/2018/07/post13-768x463.png 768w, https://www.osradar.com/wp-content/uploads/2018/07/post13-696x420.png 696w, https://www.osradar.com/wp-content/uploads/2018/07/post13-697x420.png 697w" sizes="(max-width: 871px) 100vw, 871px" /></p>
<p><strong>For CentOS/RHEL 6</strong></p>
<pre>service postgresql-10 start
chkconfig postgresql-10 on</pre>
<p>&nbsp;</p>
<p>Check and Verify PostgreSQL Installation</p>
<p>After  the  above steps, your setup of  Postgresql 10 server is ready , Let’s log in to verify that installation completed successfully.</p>
<pre>su - postgres</pre>
<p>Use psql command to access PostgreSQL prompt with admin privileges.</p>
<pre>[root@iptables-server ~]# su - postgres
-bash-4.2$ psql
psql (10.4)
Type "help" for help.

postgres=#</pre>
<p>You may create password for user postgres</p>
<pre>postgres=#\ password postgres</pre>
<p>Congratulation  you  PostgreSQL installation  Server is completed</p>
<p>Please share  .</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-postgresql-10-on-centos-rhel-7-6-and-fedora-27-28/">How to Install PostgreSQL 10 on CentOS/RHEL 7/6 and Fedora 27/28</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-postgresql-10-on-centos-rhel-7-6-and-fedora-27-28/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
