<?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/"
	 xmlns:media="http://search.yahoo.com/mrss/" >

<channel>
	<title>PostgreSQL &#8211; PhalconHost Blog</title>
	<atom:link href="https://blog.phalconhost.com/tag/postgresql/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.phalconhost.com</link>
	<description>PhalconHost Blog</description>
	<lastBuildDate>Wed, 12 Feb 2025 07:23:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>การติดตั้ง PostgreSQL 17 บน AlmaLinux 8.9</title>
		<link>https://blog.phalconhost.com/how-to-install-postgresql-17-on-almalinux-8-9/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 09 Feb 2025 03:57:54 +0000</pubDate>
				<category><![CDATA[Server Setup & Configuration]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<guid isPermaLink="false">https://blog.phalconhost.com/?p=1250</guid>

					<description><![CDATA[<p>หากคุณต้องการติดตั้ง PostgreSQL เวอร์ชัน 17 ลงบน AlmaLinux 8.9 สามารถทำตามขั้นตอนดังต่อไปนี้: 1.อัปเดตระบบ: เริ่มต้นด้วยการอัปเดตแพ็กเกจทั้งหมดในระบบ เพื่อให้แน่ใจว่าคุณมีซอฟต์แวร์เวอร์ชันล่าสุด: 2.ติดตั้ง Repo ของ PostgreSQL: เพื่อให้สามารถติดตั้ง PostgreSQL เวอร์ชัน 17 ได้: 3.ปิดใช้งานโมดูล PostgreSQL เริ่มต้น: AlmaLinux มาพร้อมกับโมดูล PostgreSQL เริ่มต้นที่อาจทำให้เกิดการ Conflict กับการติดตั้งเวอร์ชันใหม่ ดังนั้นเราควรปิดใช้งานโมดูลนี้: 4.ติดตั้ง PostgreSQL 17: หลังจากเพิ่ม Repo PostgresSQL และปิดใช้งานโมดูลเริ่มต้นแล้ว เราสามารถติดตั้ง PostgreSQL เวอร์ชัน 17 ดังนี้: 5.เริ่มต้นฐานข้อมูล: หลังการติดตั้งเสร็จ เราสามารถเริ่มต้นฐานข้อมูลด้วยคำสั่งต่อไปนี้: 6.เริ่มต้นและเปิดใช้งานบริการ PostgreSQL: เริ่มต้นบริการ PostgreSQL และตั้งค่าให้เริ่มต้นอัตโนมัติเมื่อระบบบูต: 7.ตั้งรหัสผ่านสำหรับผู้ใช้ &#8216;postgres&#8217;: โดยค่าเริ่มต้น ผู้ใช้ &#8216;postgres&#8217; [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.phalconhost.com/how-to-install-postgresql-17-on-almalinux-8-9/">การติดตั้ง PostgreSQL 17 บน AlmaLinux 8.9</a> appeared first on <a rel="nofollow" href="https://blog.phalconhost.com">PhalconHost Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="840" height="480" src="https://blog.phalconhost.com/wp-content/uploads/2025/02/postgresql17-almalinux89.png" alt="" class="wp-image-1272" srcset="https://blog.phalconhost.com/wp-content/uploads/2025/02/postgresql17-almalinux89.png 840w, https://blog.phalconhost.com/wp-content/uploads/2025/02/postgresql17-almalinux89-768x439.png 768w" sizes="(max-width: 840px) 100vw, 840px" /></figure>



<div class="wp-block-simple-note-error">ก่อนที่จะดำเนินการติดตั้ง ทีมงานเราแนะนำให้สำรองข้อมูลไว้ก่อน เพื่อความปลอดภัยครับ</div>



<p>หากคุณต้องการติดตั้ง PostgreSQL เวอร์ชัน 17 ลงบน AlmaLinux 8.9 สามารถทำตามขั้นตอนดังต่อไปนี้:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p></p>
</blockquote>



<div class="wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-ad2f72ca wp-block-group-is-layout-flex">
<div class="wp-block-simple-note-info">SSH เข้า Linux Server ด้วย IP, USERNAME, PASSWORD, PORT และรันคำสั่งดังต่อไปนี้ หากคุณไม่ทราบว่าต้อง SSH เข้า Linux อย่างไร สามารถดูวิธีการ ssh ได้ที่บทความนี้<br/><a href="https://blog.phalconhost.com/ssh-access-for-linux/">https://blog.phalconhost.com/ssh-access-for-linux/</a></div>
</div>



<p>1.<strong>อัปเดตระบบ:</strong> เริ่มต้นด้วยการอัปเดตแพ็กเกจทั้งหมดในระบบ เพื่อให้แน่ใจว่าคุณมีซอฟต์แวร์เวอร์ชันล่าสุด:</p>



<pre class="wp-block-code"><code>sudo dnf update -y</code></pre>



<p>2.<strong>ติดตั้ง Repo ของ PostgreSQL:</strong>  เพื่อให้สามารถติดตั้ง PostgreSQL เวอร์ชัน 17 ได้:</p>



<pre class="wp-block-code"><code>sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm</code></pre>



<span id="more-1250"></span>



<p>3.<strong>ปิดใช้งานโมดูล PostgreSQL เริ่มต้น:</strong> AlmaLinux มาพร้อมกับโมดูล PostgreSQL เริ่มต้นที่อาจทำให้เกิดการ Conflict กับการติดตั้งเวอร์ชันใหม่ ดังนั้นเราควรปิดใช้งานโมดูลนี้:</p>



<pre class="wp-block-code"><code>sudo dnf -qy module disable postgresql</code></pre>



<p>4.<strong>ติดตั้ง PostgreSQL 17:</strong> หลังจากเพิ่ม  Repo PostgresSQL และปิดใช้งานโมดูลเริ่มต้นแล้ว เราสามารถติดตั้ง PostgreSQL เวอร์ชัน 17 ดังนี้:</p>



<pre class="wp-block-code"><code>sudo dnf install -y postgresql17 postgresql17-server</code></pre>



<p>5.<strong>เริ่มต้นฐานข้อมูล:</strong> หลังการติดตั้งเสร็จ เราสามารถเริ่มต้นฐานข้อมูลด้วยคำสั่งต่อไปนี้:</p>



<pre class="wp-block-code"><code>sudo /usr/pgsql-17/bin/postgresql-17-setup initdb</code></pre>



<p>6.<strong>เริ่มต้นและเปิดใช้งานบริการ PostgreSQL:</strong> เริ่มต้นบริการ PostgreSQL และตั้งค่าให้เริ่มต้นอัตโนมัติเมื่อระบบบูต:</p>



<pre class="wp-block-code"><code>sudo systemctl enable postgresql-17
sudo systemctl start postgresql-17</code></pre>



<p>7.<strong>ตั้งรหัสผ่านสำหรับผู้ใช้ &#8216;postgres&#8217;:</strong> โดยค่าเริ่มต้น ผู้ใช้ &#8216;postgres&#8217; จะไม่มีรหัสผ่าน เราสามารถตั้งรหัสผ่านด้วยคำสั่งต่อไปนี้:</p>



<pre class="wp-block-code"><code>sudo passwd postgres</code></pre>



<p>8.<strong>ยืนยันการติดตั้ง:</strong> ตรวจสอบว่า PostgreSQL ทำงานอย่างถูกต้อง โดยตรวจสอบสถานะของ Service:</p>



<pre class="wp-block-code"><code>sudo systemctl status postgresql-17</code></pre>



<p>เราควรเห็นสถานะเป็น &#8220;active (running)&#8221; ซึ่งแสดงว่า postgres ทำงานอย่างถูกต้อง</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1844" height="638" src="https://blog.phalconhost.com/wp-content/uploads/2025/02/Screenshot-2568-02-09-at-11.41.31.png" alt="สถานะ PostgresSQL 17 กำลังทำงาน (active running)" class="wp-image-1267" srcset="https://blog.phalconhost.com/wp-content/uploads/2025/02/Screenshot-2568-02-09-at-11.41.31.png 1844w, https://blog.phalconhost.com/wp-content/uploads/2025/02/Screenshot-2568-02-09-at-11.41.31-768x266.png 768w, https://blog.phalconhost.com/wp-content/uploads/2025/02/Screenshot-2568-02-09-at-11.41.31-1536x531.png 1536w" sizes="(max-width: 1844px) 100vw, 1844px" /></figure>



<div class="wp-block-simple-note-info">สำหรับลูกค้า PhalconHost ที่ต้องการให้เราช่วยติดตั้ง PostgresSQL ลงบน Server ให้ท่าน สามารถแจ้งยืนยันไปที่อีเมล์ support[@]phalconhost[dot]com ได้เลยครับ เดี๋ยวทีมงานเราจะดำเนินการติดตั้งให้ฟรี ไม่มีค่าใช้จ่ายครับ หรือติดต่อสอบถามเพิ่มเติมได้ที่ line: @PhalconHost ได้เลยครับ</div>
<p>The post <a rel="nofollow" href="https://blog.phalconhost.com/how-to-install-postgresql-17-on-almalinux-8-9/">การติดตั้ง PostgreSQL 17 บน AlmaLinux 8.9</a> appeared first on <a rel="nofollow" href="https://blog.phalconhost.com">PhalconHost Blog</a>.</p>
]]></content:encoded>
					
		
		
		
		<media:thumbnail url="https://blog.phalconhost.com/wp-content/uploads/2025/02/postgresql17-almalinux89.png" />
		<media:content url="https://blog.phalconhost.com/wp-content/uploads/2025/02/postgresql17-almalinux89.png" medium="image">
			<media:title type="html">postgresql17-almalinux89</media:title>
		</media:content>
		<media:content url="https://blog.phalconhost.com/wp-content/uploads/2025/02/Screenshot-2568-02-09-at-11.41.31.png" medium="image">
			<media:title type="html">Screenshot 2568-02-09 at 11.41.31</media:title>
		</media:content>
	</item>
	</channel>
</rss>
