<?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>How to Config &#187; กวิน ชัยเลิศ</title>
	<atom:link href="http://www.howtoconfig.com/author/kawin/feed" rel="self" type="application/rss+xml" />
	<link>http://www.howtoconfig.com</link>
	<description>how to config - how to configure</description>
	<lastBuildDate>Fri, 29 Apr 2011 09:52:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>SSH โดยไม่ต้องใส่รหัสผ่าน</title>
		<link>http://www.howtoconfig.com/os/ubuntu/ssh-login-without-password.html</link>
		<comments>http://www.howtoconfig.com/os/ubuntu/ssh-login-without-password.html#comments</comments>
		<pubDate>Fri, 16 Jan 2009 12:30:01 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[*BSD]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSSH]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[รหัสผ่าน]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=57</guid>
		<description><![CDATA[สำหรับผู้ดูแลระบบที่มีความจำเป็นต้องใช้งาน Remote Login ผ่าน OpenSSH Client อยู่เป็นประจำไม่ว่าจะใช้งานบน Linux, *BSD, Mac OS X คงจะเกิดอาการเบื่อไม่น้อยที่ต้องพิมพ์ Password ทุกๆ ครั้งที่ต้องการจะ Login (ไม่นับ Password จำพวก 123456 นะครับ) ทางออกสำหรับผู้ที่ต้องการ Login โดยไม่ต้องพิมพ์ Password แถมยังคงความปลอดภัยตามแบบฉบับของ OpenSSH สามารถทำได้ตามวิธีดังต่อไปนี้ครับ ระบบที่ทำการทดสอบ - OpenSSH Client บน Mac OS X 10.5.6 - OpenSSH Server บน Ubuntu 8.04 ขั้นตอนแรก ทำการสร้าง keys สำหรับยืนยันตัวตนระหว่าง Client และ Server (ทำบนเครื่อง Client ในที่นี้คือ Mac [...]]]></description>
			<content:encoded><![CDATA[<p>สำหรับผู้ดูแลระบบที่มีความจำเป็นต้องใช้งาน Remote Login ผ่าน OpenSSH Client อยู่เป็นประจำไม่ว่าจะใช้งานบน Linux, *BSD, Mac OS X คงจะเกิดอาการเบื่อไม่น้อยที่ต้องพิมพ์ Password ทุกๆ ครั้งที่ต้องการจะ Login (ไม่นับ Password จำพวก 123456 นะครับ) ทางออกสำหรับผู้ที่ต้องการ Login โดยไม่ต้องพิมพ์ Password แถมยังคงความปลอดภัยตามแบบฉบับของ OpenSSH สามารถทำได้ตามวิธีดังต่อไปนี้ครับ</p>
<p>ระบบที่ทำการทดสอบ<br />
- OpenSSH Client บน Mac OS X 10.5.6<br />
- OpenSSH Server บน Ubuntu 8.04</p>
<p>ขั้นตอนแรก ทำการสร้าง keys สำหรับยืนยันตัวตนระหว่าง Client และ Server (ทำบนเครื่อง Client ในที่นี้คือ Mac OS X)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">MacClient:~ UserA$ <span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span> <span style="color: #660033;">-t</span> rsa</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">MacClient:~ UserA$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/UserA/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/UserA/.ssh/id_rsa.
Your public key has been saved in /Users/UserA/.ssh/id_rsa.pub.
The key fingerprint is:
a4:74:0b:bc:2f:d1:f5:c7:4e:90:51:7f:f4:45:84:a0 UserA@MacClient</pre></div></div>

<p><span id="more-57"></span></p>
<p>ขั้นตอนต่อไป ใช้ ssh สร้าง directory ~/.ssh บน Server ปลายทาง (ทำบน Client ได้เลย โดยผ่าน ssh)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">MacClient:~ UserA$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> UserA<span style="color: #000000; font-weight: bold;">@</span>UbuntuServer <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> .ssh</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">MacClient:~ UserA$ ssh UserA@UbuntuServer mkdir -p .ssh
UserA@vmtuserver's password:</pre></div></div>

<p>ขั้นตอนสุดท้าย ทำการเพิ่ม Public keys ที่สร้างขึ้นในขั้นตอนแรกไปยังไฟล์ ~/.ssh/authorized_keys บน Server ปลายทาง (ทำบน Client โดยผ่าน ssh เช่นเคย)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">MacClient:~ UserA$ <span style="color: #c20cb9; font-weight: bold;">cat</span> .ssh<span style="color: #000000; font-weight: bold;">/</span>id_rsa <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> UserA<span style="color: #000000; font-weight: bold;">@</span>UbuntuServer <span style="color: #ff0000;">'cat &amp;gt;&amp;gt; .ssh/authorized_keys'</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">MacClient:~ UserA$ cat .ssh/id_rsa | ssh UserA@UbuntuServer 'cat &amp;gt;&amp;gt; .ssh/authorized_keys'
UserA@vmtuserver's password:</pre></div></div>

<p>ทำการทดสอบ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">MacClient:~ UserA$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> UserA<span style="color: #000000; font-weight: bold;">@</span>UbuntuServer</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">MacClient:~ UserA$ ssh UserA@UbuntuServer
Linux UbuntuServer 2.6.24-19-server #1 SMP Wed Jun 18 15:18:00 UTC 2008 i686
&nbsp;
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
&nbsp;
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
&nbsp;
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
You have mail.
Last login: Tue Jan 13 00:14:19 2009 from MacClient
UserA@UbuntuServer:~$</pre></div></div>

<p>*สามารถเพิ่ม Public keys ที่สร้างขึ้นไปยัง User ใดๆ ก็ได้ ไม่จำเป็นต้องมีชื่อเหมือนกับ User ที่มีอยู่บน Client</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fos%2Fubuntu%2Fssh-login-without-password.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/os/ubuntu/ssh-login-without-password.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>วิธีตรวจสอบ Linux / Unix distribution version</title>
		<link>http://www.howtoconfig.com/os/ubuntu/how-to-check-linux-unix-distribution-version.html</link>
		<comments>http://www.howtoconfig.com/os/ubuntu/how-to-check-linux-unix-distribution-version.html#comments</comments>
		<pubDate>Fri, 16 Jan 2009 12:10:15 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[*BSD]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[Distribution]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=53</guid>
		<description><![CDATA[กรณีที่ผู้ดูแลระบบได้รับมอบหมายให้ดูแล server ที่ตนเองไม่ได้ติดตั้ง คงจะอยากรู้ว่า Linux / Unix server ที่ใช้อยู่เป็น version อะไร &#8230; สามารถตรวจสอบได้จากคำสั่งต่อไปนี้ครับ cat /proc/version ได้ Output ประมาณนี้ครับ Linux version 2.6.27-9-generic &#40;buildd@rothera&#41; &#40;gcc version 4.3.2 &#40;Ubuntu 4.3.2-1ubuntu11&#41; &#41; #1 SMP Thu Nov 20 21:57:00 UTC 200 หรือดู version ในไฟล์ /etc/issue (issue &#8211; pre-login message and identification file) cat /etc/issue ได้ Output ประมาณนี้ครับ Ubuntu 8.10 \n [...]]]></description>
			<content:encoded><![CDATA[<p>กรณีที่ผู้ดูแลระบบได้รับมอบหมายให้ดูแล server ที่ตนเองไม่ได้ติดตั้ง คงจะอยากรู้ว่า Linux / Unix server ที่ใช้อยู่เป็น version อะไร &#8230;<br />
สามารถตรวจสอบได้จากคำสั่งต่อไปนี้ครับ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>version</pre></div></div>

<p>ได้ Output ประมาณนี้ครับ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Linux version 2.6.27-<span style="color: #000000;">9</span>-generic <span style="color: #7a0874; font-weight: bold;">&#40;</span>buildd<span style="color: #000000; font-weight: bold;">@</span>rothera<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">gcc</span> version 4.3.2 <span style="color: #7a0874; font-weight: bold;">&#40;</span>Ubuntu 4.3.2-1ubuntu11<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #666666; font-style: italic;">#1 SMP Thu Nov 20 21:57:00 UTC 200</span></pre></div></div>

<p>หรือดู version ในไฟล์ /etc/issue<br />
(issue &#8211; pre-login message and identification file)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>issue</pre></div></div>

<p>ได้ Output ประมาณนี้ครับ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Ubuntu <span style="color: #000000;">8.10</span> \n \l</pre></div></div>

<p>* ทดสอบบน Ubuntu 8.10</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fos%2Fubuntu%2Fhow-to-check-linux-unix-distribution-version.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/os/ubuntu/how-to-check-linux-unix-distribution-version.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mac OS X (แมค โอเอส เท็น)</title>
		<link>http://www.howtoconfig.com/mac-os-x/macosx.html</link>
		<comments>http://www.howtoconfig.com/mac-os-x/macosx.html#comments</comments>
		<pubDate>Mon, 08 Dec 2008 15:46:21 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Darwin]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[ยูนิกซ์]]></category>
		<category><![CDATA[ระบบปฏิบัติการ]]></category>
		<category><![CDATA[แมคอินทอช]]></category>
		<category><![CDATA[แมคโอเอส]]></category>
		<category><![CDATA[โอเอส]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=48</guid>
		<description><![CDATA[&#8220;Mac OS X&#8221; หลายๆ คนอาจเข้าใจผิดออกเสียงโอเอสตัวเก่งของ Apple ว่า &#8220;โอเอส เอ็ก&#8221; ซึ่งความจริงแล้วโอเอสที่ว่านี้ทาง Apple ตั้งใจให้ออกเสียงว่า &#8220;โอเอส เท็น&#8221; (ผมก็คนนึงละที่เคยเรียกมันว่า &#8220;โอเอส เอ็ก&#8221;) ทำไมต้องออกเสียง X ว่า &#8220;เท็น&#8221; ? ตัวอักษร &#8220;X&#8221; หมายถึงเลขสิบในระบบโรมัน และอ่านออกเสียงว่า &#8220;เท็น&#8221; (Ten, แปลว่า &#8220;สิบ&#8221; ในภาษาอังกฤษ) และยังแสดงถึงรุ่นที่ต่อมากจากแมคโอเอสตัวก่อนหน้านี้คือ แมคโอเอส 9 นอกจากนี้ตัวอักษร X ยังแสดงถึงความเป็นยูนิกซ์ (UNIX) ในตัวโอเอสด้วย ซึ่งแมคโอเอสเท็นได้ใช้ยูนิกซ์ที่เป็นโอเพนซอร์สที่ชื่อว่า Darwin เป็นแกนกลาง Mac OS X รุ่นต่างๆ Mac OS X 10.0 (Cheetah) วางจำหน่าย 24 มีนาคม พ.ศ. [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;Mac OS X&#8221; หลายๆ คนอาจเข้าใจผิดออกเสียงโอเอสตัวเก่งของ Apple ว่า &#8220;โอเอส เอ็ก&#8221; ซึ่งความจริงแล้วโอเอสที่ว่านี้ทาง Apple ตั้งใจให้ออกเสียงว่า &#8220;โอเอส เท็น&#8221; (ผมก็คนนึงละที่เคยเรียกมันว่า &#8220;โอเอส เอ็ก&#8221;)</p>
<p><strong>ทำไมต้องออกเสียง X ว่า &#8220;เท็น&#8221; ?</strong></p>
<p>ตัวอักษร &#8220;X&#8221; หมายถึงเลขสิบในระบบโรมัน และอ่านออกเสียงว่า &#8220;เท็น&#8221; (Ten, แปลว่า &#8220;สิบ&#8221; ในภาษาอังกฤษ) และยังแสดงถึงรุ่นที่ต่อมากจากแมคโอเอสตัวก่อนหน้านี้คือ แมคโอเอส 9 นอกจากนี้ตัวอักษร X ยังแสดงถึงความเป็นยูนิกซ์ (UNIX) ในตัวโอเอสด้วย ซึ่งแมคโอเอสเท็นได้ใช้ยูนิกซ์ที่เป็นโอเพนซอร์สที่ชื่อว่า Darwin เป็นแกนกลาง</p>
<p><span id="more-48"></span><strong>Mac OS X รุ่นต่างๆ</strong></p>
<p><strong>Mac OS X 10.0 (Cheetah)</strong></p>
<p>วางจำหน่าย 24 มีนาคม พ.ศ. 2544 ได้รับคำชมในเรื่องความเสถียรและความสามารถ แต่มีปัญหาในด้านความเร็วในการทำงาน ราคาจำหน่าย 129 ดอลลาร์</p>
<p><strong>Mac OS X 10.1 (Puma)</strong></p>
<p>วางจำหน่าย 25 กันยายน พ.ศ. 2544 ไม่ได้วางจำหน่าย แต่แจกเป็นชุดอัพเกรดฟรีสำหรับ Cheetah เพิ่มความเร็วในการทำงาน และความสามารถอื่นๆ เช่น การเล่นดีวีดี</p>
<p><strong>Mac OS X 10.2 (Jaguar)</strong></p>
<p>วางจำหน่าย 23 สิงหาคม พ.ศ. 2545 เพิ่มความรวดเร็วในการทำงาน หน้าตาแบบใหม่ และความสามารถ เช่น</p>
<ul>
<li>สนับสนุนเครือข่ายที่เป็นไมโครซอฟท์วินโดวส์</li>
</ul>
<ul>
<li> iChat &#8211; อินสแตนท์ เมสเซจจริง</li>
</ul>
<ul>
<li> Apple Rendezvous &#8211; การเชื่อมต่อเครือข่ายแบบอัตโนมัติ</li>
</ul>
<ul>
<li> CUPS (The Common Unix Printing System) &#8211; ระบบการพิมพ์&#8217;กลาง&#8217;ของระบบยูนิกซ์</li>
</ul>
<p><strong>Mac OS X 10.3 (Panther)</strong><br />
วางจำหน่าย 24 ตุลาคม พ.ศ. 2546 พัฒนาความสามารถด้านอื่นเพิ่มขึ้น แต่หยุดสนับสนุนสถาปัตยกรรมแบบ G3 แล้ว ความสามารถเด่นมีดังนี้</p>
<ul>
<li> Exposé &#8211; การแสดงหน้าต่างทำงานทั้งหมดในหน้าจอเดียว ทำให้ผู้ใช้เปลี่ยนหน้าต่างทำงานได้อย่างรวดเร็ว</li>
</ul>
<ul>
<li> Fast User Switching</li>
</ul>
<ul>
<li> FileVault</li>
</ul>
<p><strong>Mac OS X 10.4 (Tiger)</strong><br />
กำหนดวางจำหน่าย 29 เมษายน พ.ศ. 2548 ความสามารถเด่นมีดังนี้</p>
<ul>
<li> Spotlight</li>
</ul>
<ul>
<li> Dashboard</li>
</ul>
<ul>
<li> QuickTime 7</li>
</ul>
<ul>
<li> Automator</li>
</ul>
<ul>
<li> Front row</li>
</ul>
<p><strong>Mac OS X 10.5 (Leopard)</strong><br />
แมคโอเอสเทน เลเพิร์ด (มักเรียกผิดเป็น ลีโอพาร์ด) วางจำหน่ายในวันที่ 26 ตุลาคม พ.ศ. 2550 มีความสามารถเด่นที่ประกาศแล้วดังนี้</p>
<ul>
<li> Time Machine</li>
</ul>
<ul>
<li> Spaces</li>
</ul>
<ul>
<li> Core Animation</li>
</ul>
<ul>
<li> Quicklook</li>
</ul>
<ul>
<li> Stack</li>
</ul>
<ul>
<li> Finder ใหม่ที่รวม Cover Flow view เข้าไป</li>
</ul>
<ul>
<li> รองรับ 64-bit</li>
</ul>
<p>นอกจากนี้ยังมีการปรับปรุงแอปพลิเคชันที่มีอยู่เดิมอีกด้วย</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fmac-os-x%2Fmacosx.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/mac-os-x/macosx.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>วิธีติดตั้ง Reverse Proxy ด้วย Squid</title>
		<link>http://www.howtoconfig.com/os/ubuntu/how-to-implement-squid-reverse-proxy.html</link>
		<comments>http://www.howtoconfig.com/os/ubuntu/how-to-implement-squid-reverse-proxy.html#comments</comments>
		<pubDate>Fri, 11 Jul 2008 12:25:40 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[HTTP traffic]]></category>
		<category><![CDATA[httpd-accelerator]]></category>
		<category><![CDATA[Implement]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Reverse Proxy]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[transparent cache]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=32</guid>
		<description><![CDATA[ในเบื่องต้นผมขอแนะนำให้รู้จัก Squid กันก่อนครับ Squid เป็น Open Source Software ที่ให้บริการ Proxy caches ซึ่ง Squid สามารถติดตั้งให้ทำงานใน 3 รูปแบบหลักดังนี้ 1. Standard Proxy Cache ใช้สำหรับเก็บ cache ของ static web pages จำพวก html และรูปภาพ โดยทั่วไปมักจะถูกใช้งานใน network ภายในองค์กร โดยที่ web pages ต่างๆ ที่ถูกเรียกผ่าน local network เป็นครั้งที่สอง web browser จะแสดงผล web pages นั้นผ่าน proxy cache แทนที่ไปดึงข้อมูลจาก web server มาแสดงผล (ประหยัด bandwidth และเพิ่มความเร็วในการแสดงผล) [...]]]></description>
			<content:encoded><![CDATA[<p>ในเบื่องต้นผมขอแนะนำให้รู้จัก Squid กันก่อนครับ</p>
<p>Squid เป็น Open Source Software ที่ให้บริการ Proxy caches ซึ่ง Squid สามารถติดตั้งให้ทำงานใน 3 รูปแบบหลักดังนี้</p>
<p><strong>1. Standard Proxy Cache</strong><br />
ใช้สำหรับเก็บ cache ของ static web pages จำพวก html และรูปภาพ โดยทั่วไปมักจะถูกใช้งานใน network ภายในองค์กร โดยที่ web pages ต่างๆ ที่ถูกเรียกผ่าน local network เป็นครั้งที่สอง web browser จะแสดงผล web pages นั้นผ่าน proxy cache แทนที่ไปดึงข้อมูลจาก web server มาแสดงผล (ประหยัด bandwidth และเพิ่มความเร็วในการแสดงผล)</p>
<p><strong>2. Transparent Cache</strong><br />
ความสามารถหลักๆ เหมือนกับการติดตั้งแบบ standard proxy cache จะแตกต่างกันที่การติดตั้งแบบ transparent cache ไม่จำเป็นต้องปรับแต่ง web browser ให้สามารถใช้งาน proxy cache โดยที่ transparent cache จะทำหน้าที่คอยกรอง HTTP traffic (on port 80) แล้วตรวจสอบว่า request นั้นมีอยู่ใน cahce หรือไม่ ถ้าไม่มีก็จะทำการส่งต่อไปยัง web server ของ web pages นั้น (สำหรับ Linux การใช้งาน transparent cache จะใช้ควบคู่ไปกับ iptables ในการกรอง HTTP traffic)</p>
<p><strong>3. Reverse Proxy Cache</strong><br />
สำหรับ reverse proxy cache จะทำหน้าที่แตกต่างกับ standard และ transparent caches โดยที่ reverse proxy cache จะทำหน้าที่ลดภาระของ web server แทนที่การลด network bandwidth ของฝั่ง client กล่าวคือ reverse proxy cache ถูกติดตั้งอยู่หน้า web server (ระหว่าง internet และ web server) คอยจัดการ traffic ที่เกิดขึ้นทั้งหมดก่อนจะถึง web server ป้องกัน traffic ที่เพิ่มขึ้นโดยไม่พีงประสงค์ (ซึ่งอาจจะโดนโจมตีจาก hacker เป็นต้น) อีกทั้งยังลดภาระของ web server อีกทางนึง<br />
<img class="alignnone size-full image-33" title="reverse-proxy" src="http://www.howtoconfig.com/content/uploads/2008/07/reverse-proxy.gif" alt="" width="436" height="451" /><br />
<span id="more-32"></span><br />
สำหรับวิธีการติดตั้ง Reverse Proxy ด้วย Squid สามารถทำตามขั้นตอนต่อไปนี้ได้เลยครับ<br />
(ทำการติดตั้งบน CentOS 4.6)</p>
<p>ตรวจสอบว่าได้ติดตั้ง squid แล้วหรือยัง</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rpm <span style="color: #660033;">-qa</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> squid</pre></div></div>

<p>ถ้าได้ทำการติดตั้ง squid ไว้แล้วจะแสดงผลของคำสั้งตามตัวอย่างครับ</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@reverse ~]# rpm -qa|grep squid
squid-2.5.STABLE14-1.4E.el4_6.2
[root@reverse ~]#</pre></div></div>

<p>กรณียังไม่ได้ติดตั้งให้ใช้คำสั่ง yum install squid ได้เลยครับ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> squid</pre></div></div>

<p>หลังจากทำการติดตั้ง squid เรียบร้อยแล้วให้ทำการปรับแต่งไฟล์ /etc/squid/squid.conf โดยแก้ไขเพิ่มเติม options เหล่านี้</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">http_port 80 #Port ของ Squid
httpd_accel_host 192.168.0.2 #IP address ของ Web Server (แทนที่ public ip 203.101.102.1 ด้วย private ip 192.168.0.2)
httpd_accel_port 80 #Port ของ Web Server
httpd_accel_single_host on #Option on ใช้ในกรณีที่ต้องการติดตั้ง Reverse Proxy ไว้หน้า Web Server เดี่ยวๆ
httpd_accel_with_proxy on
httpd_accel_uses_host_header off</pre></div></div>

<p>เพียงเท่านี้ก็สามารถใช้งาน Reverse Proxy ได้แล้ว รับรองว่าสามารถลดภาระการทำงานของ Web Server แน่นอน<br />
หากเพื่อนๆ มีข้อสงสัยหรือข้อเสนอแนะ &#8230; ก็ comment ไว้ด้วยนะครับ</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fos%2Fubuntu%2Fhow-to-implement-squid-reverse-proxy.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/os/ubuntu/how-to-implement-squid-reverse-proxy.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>แก้ปัญหาลืมรหัสผ่านของ FreeBSD</title>
		<link>http://www.howtoconfig.com/os/how-to-recovery-freebsd-root-password.html</link>
		<comments>http://www.howtoconfig.com/os/how-to-recovery-freebsd-root-password.html#comments</comments>
		<pubDate>Tue, 08 Jul 2008 05:05:19 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Enter Shell]]></category>
		<category><![CDATA[forgot password]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[พาสเวิร์ด]]></category>
		<category><![CDATA[รหัสผ่าน]]></category>
		<category><![CDATA[ลืมพาสเวิร์ด]]></category>
		<category><![CDATA[ลืมรหัสผ่าน]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=31</guid>
		<description><![CDATA[แก้ปัญหาลืมรหัสผ่านของ root บน FreeBSD ง่ายๆ ตามนี้ครับ 1. Restart FreeBSD (Ctrl+Alt+Delete หรือ กดปุ่ม Reset T_T) 2. พิมพ์ boot -s ที่ Boot: prompt (เพื่อเข้า Single User Mode) 3. Enter (ตอนมีคำถามให้เลือก Shell) 4. ใช้คำสั่ง mount -urw / เพื่อให้สามารถอ่าน/เขียน ไฟล์ได้ mount -urw / 5. ใช้คำสั่ง mount -a (remount ระบบไฟล์ทั้งหมด) mount -a 6. ใช้คำสั่ง passwd root เพื่อเปลี่ยนรหัสผ่านของ root passwd root [...]]]></description>
			<content:encoded><![CDATA[<p>แก้ปัญหาลืมรหัสผ่านของ root บน FreeBSD ง่ายๆ ตามนี้ครับ</p>
<p>1. Restart FreeBSD (Ctrl+Alt+Delete หรือ กดปุ่ม Reset T_T)<br />
2. พิมพ์ boot -s ที่ Boot: prompt (เพื่อเข้า Single User Mode)<br />
3. Enter (ตอนมีคำถามให้เลือก Shell)<br />
4. ใช้คำสั่ง mount -urw / เพื่อให้สามารถอ่าน/เขียน ไฟล์ได้</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-urw</span> <span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>5. ใช้คำสั่ง mount -a (remount ระบบไฟล์ทั้งหมด)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-a</span></pre></div></div>

<p>6. ใช้คำสั่ง passwd root เพื่อเปลี่ยนรหัสผ่านของ root</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">passwd</span> root</pre></div></div>

<p>เพียงเท่านี้ก็สามารถกลับมาใช้ root ได้ตามปกติครับ</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fos%2Fhow-to-recovery-freebsd-root-password.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/os/how-to-recovery-freebsd-root-password.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ยกเลิก Blank Screen บน Linux Console</title>
		<link>http://www.howtoconfig.com/os/ubuntu/disable-screen-blanking-screen-going-blank-on-linux.html</link>
		<comments>http://www.howtoconfig.com/os/ubuntu/disable-screen-blanking-screen-going-blank-on-linux.html#comments</comments>
		<pubDate>Thu, 03 Jul 2008 05:39:18 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[blank screen]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[concole]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux console]]></category>
		<category><![CDATA[setterm]]></category>
		<category><![CDATA[X window]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=30</guid>
		<description><![CDATA[ไม่ยากใช่ไหมครับหากต้องการยกเลิก screen saver บน X window แต่สำหรับ text mode (linux console) ผมคิดว่าหลายๆ คนยังไม่เคยยกเลิก blank screen หรือกำลังหาทางยกเลิกมันอยู่ สำหรับผมแล้วการยกเลิก blank screen บน linux console นั้นมีประโยชน์มากครับ ยกตัวอย่างเช่น เราสามารถทำงานไปพร้อมๆ กันกับการ monitor ดู error หรือ log จากอีกจอนึง (กรณีมีจอ monitor มากกว่าหนึ่งจอ) โดยที่ไม่ต้องคอยกดคีย์บอร์ดหรือเลื่อนเมาส์เพื่อให้ linux console แสดงผลอยู่ตลอดเวลา สำหรับวิธีการนั้นก็ไม่ได้ยุ่งยากเลยครับ แค่ใช้คำสั่ง setterm เท่านั้น setterm -blank 0 -powersave off -powerdown 0 &#60; /dev/console &#62; /dev/console 2&#62;&#38;1 [...]]]></description>
			<content:encoded><![CDATA[<p>ไม่ยากใช่ไหมครับหากต้องการยกเลิก screen saver บน X window แต่สำหรับ text mode (linux console) ผมคิดว่าหลายๆ คนยังไม่เคยยกเลิก blank screen หรือกำลังหาทางยกเลิกมันอยู่ สำหรับผมแล้วการยกเลิก blank screen บน linux console นั้นมีประโยชน์มากครับ ยกตัวอย่างเช่น เราสามารถทำงานไปพร้อมๆ กันกับการ monitor ดู error หรือ log จากอีกจอนึง (กรณีมีจอ monitor มากกว่าหนึ่งจอ) โดยที่ไม่ต้องคอยกดคีย์บอร์ดหรือเลื่อนเมาส์เพื่อให้ linux console แสดงผลอยู่ตลอดเวลา</p>
<p>สำหรับวิธีการนั้นก็ไม่ได้ยุ่งยากเลยครับ แค่ใช้คำสั่ง setterm เท่านั้น</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">setterm</span> <span style="color: #660033;">-blank</span> <span style="color: #000000;">0</span> <span style="color: #660033;">-powersave</span> off <span style="color: #660033;">-powerdown</span> <span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>console <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>console <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span></pre></div></div>

<p>หากต้องการยกเลิก blank screen ทุกครั้งหลังจาก start linux ให้ทำการเพิ่มคำสั่งดังกล่าวในไฟล์ /etc/rc.local เพียงเท่านี้ก็ไม่ต้องคอยกดคีย์บอร์ดหรือเลื่อนเมาส์ทุกๆ 5 นาทีแล้วครับ</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fos%2Fubuntu%2Fdisable-screen-blanking-screen-going-blank-on-linux.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/os/ubuntu/disable-screen-blanking-screen-going-blank-on-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>inittab หายไปไหนใน ubuntu 8.04</title>
		<link>http://www.howtoconfig.com/os/ubuntu/whereis-inittab-on-ubuntu-804.html</link>
		<comments>http://www.howtoconfig.com/os/ubuntu/whereis-inittab-on-ubuntu-804.html#comments</comments>
		<pubDate>Wed, 02 Jul 2008 09:25:19 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[Operating System]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[inittab]]></category>
		<category><![CDATA[ubuntu 8.04]]></category>
		<category><![CDATA[upstart]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=29</guid>
		<description><![CDATA[หลายๆ คนอาจจะสงสัยว่าทำไมไม่มีไฟล์ /etc/inittab อยู่บน ubuntu 8.04 (ที่จริงมันหายไปตั้งแต่ ubuntu 6.10 แล้วละครับ) บางคนอาจจะคิดว่าติดตั้งผิดหรือเผลอลบไปตอนไหน อันที่จริงแล้ว /etc/inittab ไม่ได้หายไปหรอกครับเพียงแต่ ubuntu เปลี่ยนการใช้งาน /sbin/init daemon (System-V init) ไปเป็น Upstart แทน สำหรับผมแล้วรู่สึกว่าการใช้งาน System-V init มันง่ายกว่ากันเยอะเลย &#8230; ผมใช้งาน Upstart คล่องเมื่อไหร่จะมาเขียนให้เพื่อนๆ ได้อ่านกันอีกครั้ง]]></description>
			<content:encoded><![CDATA[<p>หลายๆ คนอาจจะสงสัยว่าทำไมไม่มีไฟล์ /etc/inittab อยู่บน ubuntu 8.04 (ที่จริงมันหายไปตั้งแต่ ubuntu 6.10 แล้วละครับ) บางคนอาจจะคิดว่าติดตั้งผิดหรือเผลอลบไปตอนไหน อันที่จริงแล้ว /etc/inittab ไม่ได้หายไปหรอกครับเพียงแต่ ubuntu เปลี่ยนการใช้งาน /sbin/init daemon (System-V init) ไปเป็น <a href="http://upstart.ubuntu.com/">Upstart </a>แทน สำหรับผมแล้วรู่สึกว่าการใช้งาน System-V init มันง่ายกว่ากันเยอะเลย &#8230; ผมใช้งาน Upstart คล่องเมื่อไหร่จะมาเขียนให้เพื่อนๆ ได้อ่านกันอีกครั้ง</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fos%2Fubuntu%2Fwhereis-inittab-on-ubuntu-804.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/os/ubuntu/whereis-inittab-on-ubuntu-804.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>จัดเก็บ Logs ของ ADSL Router ด้วย syslog บน CentOS</title>
		<link>http://www.howtoconfig.com/os/centos-syslog-zyxel-p660hw-t1.html</link>
		<comments>http://www.howtoconfig.com/os/centos-syslog-zyxel-p660hw-t1.html#comments</comments>
		<pubDate>Wed, 25 Jun 2008 09:36:31 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[adsl]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[Log]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[p660hw-t1]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[syslog]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[zyxel]]></category>
		<category><![CDATA[zyxel p660hw-t1]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=27</guid>
		<description><![CDATA[แค่ออกแรงปรับแต่ง ADSL Router (ZyXel P660HW-T1) กับ syslog บน CentOS เพิ่มเติมอีกนิดก็จะสามารถจัดเก็บ Logs ของ ADSL Router ได้แล้วครับ ขั้นแรกทำการแก้ไข file &#8220;/etc/sysconfig/syslog&#8221; โดยเพิ่ม -r เข้าไปที่ SYSLOGD_OPTIONS ซึ่งเดิมๆ จะเป็นตามนี้ครับ SYSLOGD_OPTIONS=&#34;-m 0&#34; หลังจากทำการแก้ไข SYSLOGD_OPTIONS=&#34;-r -m 0&#34; เพิ่ม -r เข้าไปยัง SYSLOGD_OPTIONS เพื่อจะบอกให้ syslog daemon ยอมรับ logs จากเครื่องหรืออุปกรณ์อื่นๆ จากนั้นเพิ่ม config เข้าไปใน file &#8220;/etc/syslog.conf&#8221; ตามนี้ครับ local2.* /var/log/zyxel-p660hw.log คราวนี้ย้ายจาก CentOS มาจัดการกับ ZyXEL P660HW-T1 กันครับ 1. [...]]]></description>
			<content:encoded><![CDATA[<p>แค่ออกแรงปรับแต่ง ADSL Router (ZyXel P660HW-T1) กับ syslog บน CentOS เพิ่มเติมอีกนิดก็จะสามารถจัดเก็บ Logs ของ ADSL Router ได้แล้วครับ</p>
<p>ขั้นแรกทำการแก้ไข file &#8220;/etc/sysconfig/syslog&#8221; โดยเพิ่ม -r เข้าไปที่ SYSLOGD_OPTIONS ซึ่งเดิมๆ จะเป็นตามนี้ครับ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">SYSLOGD_OPTIONS</span>=<span style="color: #ff0000;">&quot;-m 0&quot;</span></pre></div></div>

<p>หลังจากทำการแก้ไข</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">SYSLOGD_OPTIONS</span>=<span style="color: #ff0000;">&quot;-r -m 0&quot;</span></pre></div></div>

<p><span style="color: #ff0000;">เพิ่ม -r เข้าไปยัง SYSLOGD_OPTIONS เพื่อจะบอกให้ syslog daemon ยอมรับ logs จากเครื่องหรืออุปกรณ์อื่นๆ</span></p>
<p><span id="more-27"></span>จากนั้นเพิ่ม config เข้าไปใน file &#8220;/etc/syslog.conf&#8221; ตามนี้ครับ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">local2.<span style="color: #000000; font-weight: bold;">*</span>                                                <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>zyxel-p660hw.log</pre></div></div>

<p>คราวนี้ย้ายจาก CentOS มาจัดการกับ ZyXEL P660HW-T1 กันครับ</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">1. telnet ZyXel-IP-Address
2. Select Number 24 -&amp;gt; 3 -&amp;gt; 2 (24.System Maintenance, 3.Log ans Trace, 2.Unix Syslog)
UNIX Syslog:
Active= Yes
Syslog IP Address= ZyXel-IP-Address
Log Facility= Local 2</pre></div></div>

<p><span style="color: #ff0000;">Log Facility ต้องมีค่าเท่ากันกับ config ที่ได้เพิ่มเข้าไปในfile &#8220;/etc/syslog.conf&#8221; ที่ผ่านไปเมื่อครู่นี้ครับ โดยปกติจะมีค่าอยู่ระหว่าง Local 1 &#8211; Local 7</span></p>
<p>เพียงเท่านี้ก็สามารถจัดเก็บ Logs ของ ADSL Router ด้วย syslog บน CentOS ได้แล้วครับ <em>(อย่าลืม restart syslog ด้วยนะครับ)</em></p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fos%2Fcentos-syslog-zyxel-p660hw-t1.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/os/centos-syslog-zyxel-p660hw-t1.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>เปลี่ยน default editor บน ubuntu</title>
		<link>http://www.howtoconfig.com/os/ubuntu/change-default-editor-on-ubuntu.html</link>
		<comments>http://www.howtoconfig.com/os/ubuntu/change-default-editor-on-ubuntu.html#comments</comments>
		<pubDate>Tue, 24 Jun 2008 10:32:48 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[Operating System]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[default editor]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[nano]]></category>
		<category><![CDATA[pine]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[system administrator]]></category>
		<category><![CDATA[ubuntu 8.04 hardy]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=25</guid>
		<description><![CDATA[จากประสบการณ์ที่ผ่านมา default editor บน linux และ *bsd มักจะเป็น vi ซึ่งตามปกติแล้ว system administrator (sysadmin) จำเป็นต้องใช้ default editor ของ os ในหลายๆ เหตุการณ์ เช่น ใช้ในคำสั่ง crontab เป็นต้น หลังจากที่ติดตั้ง Ubuntu 8.04 hardy ก็พบว่า default editor ไม่ใช่ vi ที่ผมคุ้นเคย กลับกลายเป็น nano editor หน้าตาเหมือนกับ pineapple สมัยที่ linux ยังไม่เฟื่องฟู (pine e-mail client) ไม่รู้ว่าคนแก่แถวๆ นี้มีใครนิยมกิน pine บ้างครับ &#8230; เพื่อไม่ให้ยืดเยื้อไปกว่านี้ เรามาเปลี่ยน default editor บน [...]]]></description>
			<content:encoded><![CDATA[<p>จากประสบการณ์ที่ผ่านมา default editor บน linux และ *bsd มักจะเป็น vi ซึ่งตามปกติแล้ว system administrator (sysadmin) จำเป็นต้องใช้ default editor ของ os ในหลายๆ เหตุการณ์ เช่น ใช้ในคำสั่ง crontab เป็นต้น</p>
<p>หลังจากที่ติดตั้ง Ubuntu 8.04 hardy ก็พบว่า default editor ไม่ใช่ vi ที่ผมคุ้นเคย กลับกลายเป็น nano editor หน้าตาเหมือนกับ pineapple สมัยที่ linux ยังไม่เฟื่องฟู (pine e-mail client) ไม่รู้ว่าคนแก่แถวๆ นี้มีใครนิยมกิน pine บ้างครับ &#8230; เพื่อไม่ให้ยืดเยื้อไปกว่านี้ เรามาเปลี่ยน default editor บน ubuntu กันดีกว่าครับ</p>
<p><span id="more-25"></span><br />
แปลงร่างเป็น root หรือใครถนัดใช้ sudo ก็ข้ามไปใช้ sudo ตามสะดวกครับ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span> -</pre></div></div>

<p>ทีนี้ก็เปลี่ยน default editor ตามนี้ครับ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">update-alternatives <span style="color: #660033;">--config</span> editor</pre></div></div>

<blockquote><p>
There are 4 alternatives which provide `editor&#8217;.</p>
<p>  Selection    Alternative<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
          1    /usr/bin/vim.tiny<br />
          2    /bin/ed<br />
 +        3    /bin/nano<br />
*         4    /usr/bin/vim.basic</p>
<p>Press enter to keep the default[*], or type selection number:
</p></blockquote>
<p>แฟนพันธุ์ vi ก็ต้องเลือกหมายเลข 4 อยู่แล้ว &#8230; เพื่อนๆ เลือกหมายเลขอะไรกันครับ</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fos%2Fubuntu%2Fchange-default-editor-on-ubuntu.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/os/ubuntu/change-default-editor-on-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ติดตั้ง Linux ผ่าน Network ด้วย PXE Server</title>
		<link>http://www.howtoconfig.com/os/ubuntu/network-install-via-pxe-server.html</link>
		<comments>http://www.howtoconfig.com/os/ubuntu/network-install-via-pxe-server.html#comments</comments>
		<pubDate>Fri, 20 Jun 2008 17:41:01 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[intel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[network booting]]></category>
		<category><![CDATA[network install]]></category>
		<category><![CDATA[open standard]]></category>
		<category><![CDATA[PXE]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[syslinux]]></category>
		<category><![CDATA[tftp-server]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=24</guid>
		<description><![CDATA[มาทำความรู้รักกับ PXE กันก่อนครับ PXE หรือ Preboot eXecution Environment เป็น Open Standard ที่พัฒนาขึ้นโดย Intel ซึ่ง PXE นี้จะยอมให้ Computer ต่างๆ (Server, PC, Laptop, Notebook ที่ BIOS ลองรับ PXE Booting) สามารถ boot ผ่าน network ได้ไม่ต้องง้อ floppy, cd หรือ dvd กันเลยทีเดียว (มันสุดยอดจริงๆ ครับ) มาลุยกันเลยครับ Server : CentOS 5.1 + dhcp + tftp-server + httpd + syslinux Client : Ubuntu [...]]]></description>
			<content:encoded><![CDATA[<p><strong>มาทำความรู้รักกับ PXE กันก่อนครับ</strong><br />
<span style="color: #0000ff;">PXE</span> หรือ <span style="color: #0000ff;">P</span>reboot e<span style="color: #0000ff;">X</span>ecution <span style="color: #0000ff;">E</span>nvironment เป็น Open Standard ที่พัฒนาขึ้นโดย Intel ซึ่ง PXE นี้จะยอมให้ Computer ต่างๆ (Server, PC, Laptop, Notebook ที่ BIOS ลองรับ PXE Booting) สามารถ boot ผ่าน network ได้ไม่ต้องง้อ floppy, cd หรือ dvd กันเลยทีเดียว (มันสุดยอดจริงๆ ครับ)</p>
<p>มาลุยกันเลยครับ<br />
Server : CentOS 5.1 + dhcp + tftp-server + httpd + syslinux<br />
Client : Ubuntu 8.04</p>
<p>เอาเป็นว่าทุกๆ ท่านติดตั้ง CentOS ไว้เป็นที่เรียบร้อย ทีนี้ก็เป็นขั้นตอนการติดตั้ง PXE Server ละครับ</p>
<p>แปลงร่างเป็น root</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span> -</pre></div></div>

<p>ติดตั้ง dhcp, tftp-server, httpd และ syslinux</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> dhcp tftp-server httpd syslinux</pre></div></div>

<p>เตรียม install files (ผมเลือกติดตั้ง Ubuntu 8.04)<br />
<a href="http://www.howtoconfig.com/linux/how-to-mount-iso-image-under-linux.html">>>วิธี mount iso image บน linux</a></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>ftp.science.nus.edu.sg<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>ubuntu-ISO<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8.04</span><span style="color: #000000; font-weight: bold;">/</span>ubuntu-<span style="color: #000000;">8.04</span>-server-i386.iso
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>html<span style="color: #000000; font-weight: bold;">/</span>mirror<span style="color: #000000; font-weight: bold;">/</span>ubuntu<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8.04</span>
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> loop ubuntu-<span style="color: #000000;">8.04</span>-server-i386.iso <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>html<span style="color: #000000; font-weight: bold;">/</span>mirror<span style="color: #000000; font-weight: bold;">/</span>ubuntu<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8.04</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-fr</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>html<span style="color: #000000; font-weight: bold;">/</span>mirror<span style="color: #000000; font-weight: bold;">/</span>ubuntu<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8.04</span><span style="color: #000000; font-weight: bold;">/</span>install<span style="color: #000000; font-weight: bold;">/</span>netboot<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #000000; font-weight: bold;">/</span>tftpboot</pre></div></div>

<p><span id="more-24"></span><br />
Config tftp-server<br />
โดย default CentOS จะ disable tftp ที่ start ผ่าน xinetd ให้ทำการ configuration file &#8220;/etc/xinetd.d/tftp&#8221; ใหม่ด้วยการเปลี่ยน &#8220;disable = yes&#8221; ให้เป็น &#8220;disable = no&#8221; หรือใช้ sed ทำการแก้ไขก็ได้ครับ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'/disable/ s/yes/no/'</span> <span style="color: #660033;">-i</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>xinetd.d<span style="color: #000000; font-weight: bold;">/</span>tftp
<span style="color: #666666; font-style: italic;">#restart xinetd</span>
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>xinetd restart</pre></div></div>

<p>Config dhcpd<br />
โดย default CentOS จะให้ copy configuration file มาจาก &#8220;/usr/share/doc/dhcp*/dhcpd.conf.sample&#8221; ส่วนตัวแล้วผมใช้เพียง configuration และ parameters บางตัวเท่านั้น ตามตัวอย่างนี้ครับ</p>

<div class="wp_syntax"><div class="code"><pre class="scheme" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">;</span>
<span style="color: #808080; font-style: italic;">;</span>
<span style="color: #808080; font-style: italic;">;</span>
<span style="color: #808080; font-style: italic;">;</span>
<span style="color: #808080; font-style: italic;">;</span>
<span style="color: #ff0000;">&quot;pxelinux.0&quot;</span><span style="color: #808080; font-style: italic;">;</span>
&nbsp;</pre></div></div>

<p>หลังจากทำการแก้ไข configuration file &#8220;/etc/dhcpd.conf&#8221; ก็ Start dhcpd ได้เลยครับ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>dhcpd start</pre></div></div>

<p><span style="color: #ff0000;">Note : สามารถกำหนดได้ว่าจะให้ dhcpd ใช้ Interface ใดๆ โดย config ที่ file &#8220;/etc/sysconfig/dhcpd&#8221; ทำการเปลี่ยนค่าของ Interface DHCPDARGS=<em>ethX</em></span></p>
<p>เท่านี้ก็สามารถ Install Ubuntu ผ่าน Network โดย PXE Server บน CentOS ได้แล้วครับ<br />
หากเพื่อนๆ มีข้อสงสัยก็ถามมาได้เลยนะครับ webmaster@howtoconfig.com</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fos%2Fubuntu%2Fnetwork-install-via-pxe-server.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/os/ubuntu/network-install-via-pxe-server.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

