<?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/"
	>

<channel>
	<title>Kawin Chailerd</title>
	<atom:link href="http://kawin.chailerd.com/feed" rel="self" type="application/rss+xml" />
	<link>http://kawin.chailerd.com</link>
	<description>System Design&#124;Network Security&#124;Hardening OS&#124;Linux&#124;*BSD&#124;Windows Server</description>
	<pubDate>Thu, 15 Jan 2009 04:04:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SSH โดยไม่ต้องใส่รหัสผ่าน</title>
		<link>http://kawin.chailerd.com/linux-and-bsd/ssh-login-without-password-73.html</link>
		<comments>http://kawin.chailerd.com/linux-and-bsd/ssh-login-without-password-73.html#comments</comments>
		<pubDate>Mon, 12 Jan 2009 17:27:36 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
		
		<category><![CDATA[CentOS]]></category>

		<category><![CDATA[FreeBSD]]></category>

		<category><![CDATA[Linux and *BSD]]></category>

		<category><![CDATA[Mac OS X]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<category><![CDATA[*BSD]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[Login]]></category>

		<category><![CDATA[OpenSSH]]></category>

		<category><![CDATA[password]]></category>

		<category><![CDATA[ssh]]></category>

		<category><![CDATA[รหัสผ่าน]]></category>

		<guid isPermaLink="false">http://kawin.chailerd.com/?p=73</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 OS X)

MacClient:~ UserA$ ssh-keygen [...]]]></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-73"></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 &gt;&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 &gt;&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>
]]></content:encoded>
			<wfw:commentRss>http://kawin.chailerd.com/linux-and-bsd/ssh-login-without-password-73.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>วิธีตรวจสอบ Linux / Unix distribution version</title>
		<link>http://kawin.chailerd.com/linux-and-bsd/how-to-check-linux-unix-distribution-version-62.html</link>
		<comments>http://kawin.chailerd.com/linux-and-bsd/how-to-check-linux-unix-distribution-version-62.html#comments</comments>
		<pubDate>Fri, 09 Jan 2009 07:48:31 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
		
		<category><![CDATA[Linux and *BSD]]></category>

		<category><![CDATA[*BSD]]></category>

		<category><![CDATA[command]]></category>

		<category><![CDATA[Distribution]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[คำสั่ง]]></category>

		<guid isPermaLink="false">http://kawin.chailerd.com/?p=62</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 - pre-login message and identification file)

cat /etc/issue

ได้ Output ประมาณนี้ครับ

Ubuntu 8.10 \n \l

* ทดสอบบน Ubuntu 8.10
]]></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 - 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>
]]></content:encoded>
			<wfw:commentRss>http://kawin.chailerd.com/linux-and-bsd/how-to-check-linux-unix-distribution-version-62.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Mac OS X (แมค โอเอส เท็น)</title>
		<link>http://kawin.chailerd.com/mac-os-x/macosx-51.html</link>
		<comments>http://kawin.chailerd.com/mac-os-x/macosx-51.html#comments</comments>
		<pubDate>Mon, 08 Dec 2008 15:41:30 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
		
		<category><![CDATA[Mac OS X]]></category>

		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Darwin]]></category>

		<category><![CDATA[OS]]></category>

		<category><![CDATA[UNIX]]></category>

		<category><![CDATA[ยูนิกซ์]]></category>

		<category><![CDATA[ระบบปฏิบัติการ]]></category>

		<category><![CDATA[แมคอินทอช]]></category>

		<category><![CDATA[แมคโอเอส]]></category>

		<category><![CDATA[โอเอส]]></category>

		<guid isPermaLink="false">http://kawin.chailerd.com/?p=51</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 มีนาคม พ.ศ. 2544 ได้รับคำชมในเรื่องความเสถียรและความสามารถ แต่มีปัญหาในด้านความเร็วในการทำงาน ราคาจำหน่าย 129 [...]]]></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-51"></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 - อินสแตนท์ เมสเซจจริง</li>
</ul>
<ul>
<li> Apple Rendezvous - การเชื่อมต่อเครือข่ายแบบอัตโนมัติ</li>
</ul>
<ul>
<li> CUPS (The Common Unix Printing System) - ระบบการพิมพ์&#8217;กลาง&#8217;ของระบบยูนิกซ์</li>
</ul>
<p><strong>Mac OS X 10.3 (Panther)</strong><br />
วางจำหน่าย 24 ตุลาคม พ.ศ. 2546 พัฒนาความสามารถด้านอื่นเพิ่มขึ้น แต่หยุดสนับสนุนสถาปัตยกรรมแบบ G3 แล้ว ความสามารถเด่นมีดังนี้</p>
<ul>
<li> Exposé - การแสดงหน้าต่างทำงานทั้งหมดในหน้าจอเดียว ทำให้ผู้ใช้เปลี่ยนหน้าต่างทำงานได้อย่างรวดเร็ว</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>
]]></content:encoded>
			<wfw:commentRss>http://kawin.chailerd.com/mac-os-x/macosx-51.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>เปลี่ยน view source editor ของ IE</title>
		<link>http://kawin.chailerd.com/development/change-internet-explorer-view-source-editor-49.html</link>
		<comments>http://kawin.chailerd.com/development/change-internet-explorer-view-source-editor-49.html#comments</comments>
		<pubDate>Mon, 10 Nov 2008 10:01:25 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[editor]]></category>

		<category><![CDATA[IE]]></category>

		<category><![CDATA[Internet Explorer]]></category>

		<category><![CDATA[VIM]]></category>

		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://kawin.chailerd.com/?p=49</guid>
		<description><![CDATA[เทคนิคสำหรับเปลี่ยน view source editor ของ IE (Windows Internet Exploper)
Run regedit
HKEY_LOCAL_MACHINE
&#124;- Software
&#124;&#8211; Microsoft
&#124;&#8212; Internet Explorer
&#124;&#8212;- View Source Editor
&#124;&#8212;&#8211; Editor Name (Default) = C:\Program Files\Vim\vim71\gvim.exe
สร้างไฟล์ใหม่ชื่อ change-defaut-viewer.reg แล้ว copy ในข้อความข้างล่างนี้ไปใช้

1
2
3
4
Windows Registry Editor Version 5.00
&#160;
&#91;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name&#93;
@=&#34;C:\\Program Files\\Vim\\vim71\\gvim.exe&#34;

สำหรับบรรทัดสุดท้าย ให้เปลี่ยนเป็นที่อยู่ของ editor ที่ต้องการใช้สำหรับ view source
*แล้วพบกลับเทคนิคการใช้งาน VIM ที่นี่ &#8230; เร็วๆ นี้ครับ
]]></description>
			<content:encoded><![CDATA[<p>เทคนิคสำหรับเปลี่ยน view source editor ของ IE (Windows Internet Exploper)</p>
<p><span style="text-decoration: underline;">R</span>un <strong>regedit</strong></p>
<p>HKEY_LOCAL_MACHINE<br />
|- Software<br />
|&#8211; Microsoft<br />
|&#8212; Internet Explorer<br />
|&#8212;- View Source Editor<br />
|&#8212;&#8211; Editor Name (Default) = C:\Program Files\Vim\vim71\gvim.exe</p>
<p>สร้างไฟล์ใหม่ชื่อ change-defaut-viewer.reg แล้ว copy ในข้อความข้างล่างนี้ไปใช้</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="scheme" style="font-family:monospace;">Windows Registry Editor Version <span style="color: #cc66cc;">5.00</span>
&nbsp;
<span style="color: #66cc66;">&#91;</span>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name<span style="color: #66cc66;">&#93;</span>
@<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;C:<span style="color: #000099; font-weight: bold;">\\</span>Program Files<span style="color: #000099; font-weight: bold;">\\</span>Vim<span style="color: #000099; font-weight: bold;">\\</span>vim71<span style="color: #000099; font-weight: bold;">\\</span>gvim.exe&quot;</span></pre></td></tr></table></div>

<p>สำหรับบรรทัดสุดท้าย ให้เปลี่ยนเป็นที่อยู่ของ editor ที่ต้องการใช้สำหรับ view source</p>
<p>*แล้วพบกลับเทคนิคการใช้งาน VIM ที่นี่ &#8230; เร็วๆ นี้ครับ</p>
]]></content:encoded>
			<wfw:commentRss>http://kawin.chailerd.com/development/change-internet-explorer-view-source-editor-49.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>ลบ ^M (CTRL-M) ออกจากไฟล์ หรือแทนที่ด้วย  ด้วย VIM</title>
		<link>http://kawin.chailerd.com/development/remove-ctrl-m-with-vim-editor-37.html</link>
		<comments>http://kawin.chailerd.com/development/remove-ctrl-m-with-vim-editor-37.html#comments</comments>
		<pubDate>Mon, 10 Nov 2008 09:43:57 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[CTRL-M]]></category>

		<category><![CDATA[editor]]></category>

		<category><![CDATA[VIM]]></category>

		<category><![CDATA[^M]]></category>

		<guid isPermaLink="false">http://kawin.chailerd.com/?p=37</guid>
		<description><![CDATA[เพื่อนๆ คงจะเคยประสบปัญหากับ source code หรือ text file ที่เต็มไปด้วย ^M (CTRL-M) โดยที่เราไม่ต้องการจะเห็นมัน
ผมมีวิธีลบ ^M ออกไปจาก file ด้วย VIM (editor เทพ!) มาแนะนำครับ  
ตัวอย่าง file ที่เต็มไปด้วย ^M


ลบ ^M ออกจากไฟล์

:%s/^M//g

แทนที่ ^M ด้วย

:%s/^M/\r/g

*ให้พิมพ์ CRTL-V ตามด้วย CTRL-M จึงจะเป็น ^M ที่ถูกต้อง
สำหรับ VIM for Windows ต้องใช้ CTRL-Q แทน CRTL-V ครับ
ตัวอย่าง file ที่ถูกแทนที่ด้วย

]]></description>
			<content:encoded><![CDATA[<p>เพื่อนๆ คงจะเคยประสบปัญหากับ source code หรือ text file ที่เต็มไปด้วย ^M (CTRL-M) โดยที่เราไม่ต้องการจะเห็นมัน</p>
<p>ผมมีวิธีลบ ^M ออกไปจาก file ด้วย VIM (editor เทพ!) มาแนะนำครับ <img src='http://kawin.chailerd.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>ตัวอย่าง file ที่เต็มไปด้วย ^M</p>
<p><a href="http://kawin.chailerd.com/wp-content/uploads/2008/11/control-m.gif"><img class="alignnone size-full wp-image-39" title="control-m" src="http://kawin.chailerd.com/wp-content/uploads/2008/11/control-m.gif" alt="" /></a></p>
<p><span id="more-37"></span><br />
ลบ ^M ออกจากไฟล์</p>

<div class="wp_syntax"><div class="code"><pre class="genero" style="font-family:monospace;"><span style="color: #008000;">:%</span>s<span style="color: #008000;">/^</span>M<span style="color: #008000;">//</span>g</pre></div></div>

<p>แทนที่ ^M ด้วย</p>

<div class="wp_syntax"><div class="code"><pre class="genero" style="font-family:monospace;"><span style="color: #008000;">:%</span>s<span style="color: #008000;">/^</span>M<span style="color: #008000;">/</span>\r<span style="color: #008000;">/</span>g</pre></div></div>

<p><span style="color: #ff0000;">*ให้พิมพ์ CRTL-V ตามด้วย CTRL-M จึงจะเป็น ^M ที่ถูกต้อง<br />
สำหรับ VIM for Windows ต้องใช้ CTRL-Q แทน CRTL-V ครับ</span></p>
<p>ตัวอย่าง file ที่ถูกแทนที่ด้วย</p>
<p><a href="http://kawin.chailerd.com/wp-content/uploads/2008/11/remove-control-m.gif"><img class="alignnone size-full wp-image-45" title="remove-control-m" src="http://kawin.chailerd.com/wp-content/uploads/2008/11/remove-control-m.gif" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://kawin.chailerd.com/development/remove-ctrl-m-with-vim-editor-37.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>mount iso image บน linux</title>
		<link>http://kawin.chailerd.com/linux-and-bsd/how-to-mount-iso-image-under-linux-35.html</link>
		<comments>http://kawin.chailerd.com/linux-and-bsd/how-to-mount-iso-image-under-linux-35.html#comments</comments>
		<pubDate>Mon, 10 Nov 2008 09:40:57 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
		
		<category><![CDATA[CentOS]]></category>

		<category><![CDATA[Linux and *BSD]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<category><![CDATA[command]]></category>

		<category><![CDATA[iso]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[mount]]></category>

		<category><![CDATA[mount image file]]></category>

		<category><![CDATA[คำสั่ง]]></category>

		<guid isPermaLink="false">http://kawin.chailerd.com/?p=35</guid>
		<description><![CDATA[เราสามารถเรียกดูไฟล์ใน iso image บน linux ด้วยวิธีการง่ายๆ โดยใช้คำสั่ง mount ตามขั้นตอนต่อไปนี้
แปลงร่างเป็น root

su -

สร้่าง directory สำหรับ mount iso image

mkdir -p /var/www/mirror/centos/5

ทำการ mount iso image ด้วยคำสั่งตามตัวอย่าง

mount -o loop CentOS-5.1-i386-bin-DVD.iso /var/www/mirror/centos/5

ทดสอบเรียกดูรายชื่อไฟล์ที่อยู่ใน iso image

ls /var/www/mirror/centos/5

ในตัวอย่างเป็นการเตรียมไฟล์สำหรับติดตั้ง CentOS ผ่าน Network ซึ่งมีข้อดีดังนี้
1. ลดโลกร้อน  เพราะไม่ต้อง Burn DVD ประหยัด DVD หนึ่งแผ่น
2. ประหยัดพื้นที่ในการเก็บข้อมูลของ Harddisk (เก็บไว้เพียง iso image)
3. ประหยัดเวลาในการ Burn DVD
4. สามารถติดตั้ง CentOS ผ่าน Network ได้พร้อมกันหลายๆ เครื่อง
]]></description>
			<content:encoded><![CDATA[<p>เราสามารถเรียกดูไฟล์ใน iso image บน linux ด้วยวิธีการง่ายๆ โดยใช้คำสั่ง mount ตามขั้นตอนต่อไปนี้</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>สร้่าง directory สำหรับ mount iso image</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><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>mirror<span style="color: #000000; font-weight: bold;">/</span>centos<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5</span></pre></div></div>

<p>ทำการ mount iso image ด้วยคำสั่งตามตัวอย่าง</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;">-o</span> loop CentOS-<span style="color: #000000;">5.1</span>-i386-bin-DVD.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>mirror<span style="color: #000000; font-weight: bold;">/</span>centos<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5</span></pre></div></div>

<p>ทดสอบเรียกดูรายชื่อไฟล์ที่อยู่ใน iso image</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ls</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>mirror<span style="color: #000000; font-weight: bold;">/</span>centos<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5</span></pre></div></div>

<p>ในตัวอย่างเป็นการเตรียมไฟล์สำหรับติดตั้ง CentOS ผ่าน Network ซึ่งมีข้อดีดังนี้<br />
1. ลดโลกร้อน <img src='http://kawin.chailerd.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> เพราะไม่ต้อง Burn DVD ประหยัด DVD หนึ่งแผ่น<br />
2. ประหยัดพื้นที่ในการเก็บข้อมูลของ Harddisk (เก็บไว้เพียง iso image)<br />
3. ประหยัดเวลาในการ Burn DVD<br />
4. สามารถติดตั้ง CentOS ผ่าน Network ได้พร้อมกันหลายๆ เครื่อง</p>
]]></content:encoded>
			<wfw:commentRss>http://kawin.chailerd.com/linux-and-bsd/how-to-mount-iso-image-under-linux-35.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>ติดตั้ง Linux ผ่าน Network ด้วย PXE Server</title>
		<link>http://kawin.chailerd.com/linux-and-bsd/network-install-via-pxe-server-33.html</link>
		<comments>http://kawin.chailerd.com/linux-and-bsd/network-install-via-pxe-server-33.html#comments</comments>
		<pubDate>Mon, 10 Nov 2008 09:37:43 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
		
		<category><![CDATA[CentOS]]></category>

		<category><![CDATA[Linux and *BSD]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<category><![CDATA[debian]]></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[syslinux]]></category>

		<category><![CDATA[tftp-server]]></category>

		<guid isPermaLink="false">http://kawin.chailerd.com/?p=33</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 8.04
เอาเป็นว่าทุกๆ ท่านติดตั้ง CentOS ไว้เป็นที่เรียบร้อย [...]]]></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">&gt;&gt;วิธี 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><span style="color: #c20cb9; font-weight: bold;">install</span><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-33"></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;"># dhcpd configuration file for pxe boot by kawin@chailerd.com
# <span style="color: #66cc66;">/</span>etc<span style="color: #66cc66;">/</span>dhcpd.conf
# CentOS <span style="color: #cc66cc;">5.1</span>
ddns<span style="color: #66cc66;">-</span>update<span style="color: #66cc66;">-</span>style none<span style="color: #808080; font-style: italic;">;</span>
default<span style="color: #66cc66;">-</span>lease<span style="color: #66cc66;">-</span>time <span style="color: #cc66cc;">600</span><span style="color: #808080; font-style: italic;">;</span>
max<span style="color: #66cc66;">-</span>lease<span style="color: #66cc66;">-</span>time <span style="color: #cc66cc;">7200</span><span style="color: #808080; font-style: italic;">;</span>
log<span style="color: #66cc66;">-</span>facility local7<span style="color: #808080; font-style: italic;">;</span>
&nbsp;
subnet 192.168.1.0 netmask 255.255.255.0 <span style="color: #66cc66;">&#123;</span>
  range 192.168.1.10 192.168.1.20<span style="color: #808080; font-style: italic;">;</span>
  filename <span style="color: #ff0000;">&quot;pxelinux.0&quot;</span><span style="color: #808080; font-style: italic;">;</span>
<span style="color: #66cc66;">&#125;</span></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 />
หากเพื่อนๆ มีข้อสงสัยก็ถามมาได้เลยนะครับ kawin@chailerd.com</p>
]]></content:encoded>
			<wfw:commentRss>http://kawin.chailerd.com/linux-and-bsd/network-install-via-pxe-server-33.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>เปลี่ยน default editor บน ubuntu</title>
		<link>http://kawin.chailerd.com/linux-and-bsd/change-default-editor-on-ubuntu-29.html</link>
		<comments>http://kawin.chailerd.com/linux-and-bsd/change-default-editor-on-ubuntu-29.html#comments</comments>
		<pubDate>Mon, 10 Nov 2008 09:34:36 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
		
		<category><![CDATA[Linux and *BSD]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<category><![CDATA[command]]></category>

		<category><![CDATA[debian]]></category>

		<category><![CDATA[default 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>

		<category><![CDATA[คำสั่ง]]></category>

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

แปลงร่างเป็น root หรือใครถนัดใช้ [...]]]></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 หน้าตาเหมือนกับ pine (pine e-mail client) สมัยที่ linux ยังไม่เฟื่องฟู  &#8230; เพื่อไม่ให้ยืดเยื้อไปกว่านี้ เรามาเปลี่ยน default editor บน ubuntu กันดีกว่าครับ</p>
<p><span id="more-29"></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>
]]></content:encoded>
			<wfw:commentRss>http://kawin.chailerd.com/linux-and-bsd/change-default-editor-on-ubuntu-29.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>จัดเก็บ Logs ของ ADSL Router ด้วย syslog บน CentOS</title>
		<link>http://kawin.chailerd.com/linux-and-bsd/centos-syslog-zyxel-p660hw-t1-26.html</link>
		<comments>http://kawin.chailerd.com/linux-and-bsd/centos-syslog-zyxel-p660hw-t1-26.html#comments</comments>
		<pubDate>Mon, 10 Nov 2008 09:30:28 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
		
		<category><![CDATA[CentOS]]></category>

		<category><![CDATA[Linux and *BSD]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<category><![CDATA[adsl]]></category>

		<category><![CDATA[logs]]></category>

		<category><![CDATA[p660hw-t1]]></category>

		<category><![CDATA[router]]></category>

		<category><![CDATA[syslog]]></category>

		<category><![CDATA[syslog zyxel]]></category>

		<category><![CDATA[zyxel]]></category>

		<category><![CDATA[zyxel p660hw-t1]]></category>

		<category><![CDATA[zyxel syslog]]></category>

		<guid isPermaLink="false">http://kawin.chailerd.com/?p=26</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.*                [...]]]></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-26"></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 - Local 7</span></p>
<p>เพียงเท่านี้ก็สามารถจัดเก็บ Logs ของ ADSL Router ด้วย syslog บน CentOS ได้แล้วครับ <em>(อย่าลืม restart syslog ด้วยนะครับ)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://kawin.chailerd.com/linux-and-bsd/centos-syslog-zyxel-p660hw-t1-26.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>inittab หายไปไหนใน ubuntu 8.04</title>
		<link>http://kawin.chailerd.com/linux-and-bsd/whereis-inittab-on-ubuntu-24.html</link>
		<comments>http://kawin.chailerd.com/linux-and-bsd/whereis-inittab-on-ubuntu-24.html#comments</comments>
		<pubDate>Mon, 10 Nov 2008 09:25:47 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
		
		<category><![CDATA[CentOS]]></category>

		<category><![CDATA[Linux and *BSD]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<category><![CDATA[inittab]]></category>

		<category><![CDATA[ubuntu 8.04]]></category>

		<category><![CDATA[upstart]]></category>

		<guid isPermaLink="false">http://kawin.chailerd.com/?p=24</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>
]]></content:encoded>
			<wfw:commentRss>http://kawin.chailerd.com/linux-and-bsd/whereis-inittab-on-ubuntu-24.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
