<?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>Web Server linux Centos Games &#187; CentOS</title>
	<atom:link href="http://www.webserverthai.com/category/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webserverthai.com</link>
	<description>Web Server linux Centos blog game</description>
	<lastBuildDate>Sun, 04 Sep 2011 05:27:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>การ yum จากแผ่น cd dvd CentOS</title>
		<link>http://www.webserverthai.com/linux/%e0%b8%81%e0%b8%b2%e0%b8%a3-yum-%e0%b8%88%e0%b8%b2%e0%b8%81%e0%b9%81%e0%b8%9c%e0%b9%88%e0%b8%99-cd-dvd-centos/</link>
		<comments>http://www.webserverthai.com/linux/%e0%b8%81%e0%b8%b2%e0%b8%a3-yum-%e0%b8%88%e0%b8%b2%e0%b8%81%e0%b9%81%e0%b8%9c%e0%b9%88%e0%b8%99-cd-dvd-centos/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 01:55:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.webserverthai.com/?p=236</guid>
		<description><![CDATA[ปกติเวลาที่เราต้องการลงโปรแกรมอะไรเพิ่มใน CentOS เราคงคุ้นเคยกับการใช้คำสั่ง yum เช่น yum install httpd yum install mysqld นี่คือในกรณีที่เราสามารถต่อ internet ได้ แต่ในกรณีที่เราไม่สามารถเชื่อมต่อกับ internet ได้ แต่เรามีแผ่น  cd/dvd ของ OS เราก็สามารถใช้คำสั่ง yum ได้เช่นกัน โดยมีขั้นตอนดังนี้ ขั้นที่ 1 ใส่แผ่น cd dvd แล้ว mount ใ้ห้เรียบร้อย # mount /dev/cdrom /media/cdrom ขั้นที่ 2 แก้ไขไฟล์ CentOS-Media.repo เพื่อให้สามารถใช้คำสั่ง yum โดยตรงจากแผ่น cd หรือ dvd ได้ # vi /etc/yum.repos.d/CentOS-Media.repo แก้ไขบรรทัดนี้ให้ ตามนี้ enabled=1 จากนั้น [...]]]></description>
			<content:encoded><![CDATA[<p>ปกติเวลาที่เราต้องการลงโปรแกรมอะไรเพิ่มใน CentOS เราคงคุ้นเคยกับการใช้คำสั่ง yum เช่น</p>
<p>yum install httpd</p>
<p>yum install mysqld</p>
<p>นี่คือในกรณีที่เราสามารถต่อ internet ได้ แต่ในกรณีที่เราไม่สามารถเชื่อมต่อกับ internet ได้ แต่เรามีแผ่น  cd/dvd ของ OS เราก็สามารถใช้คำสั่ง yum ได้เช่นกัน โดยมีขั้นตอนดังนี้</p>
<p><strong>ขั้นที่ 1</strong> ใส่แผ่น cd dvd แล้ว mount ใ้ห้เรียบร้อย</p>
<p># mount /dev/cdrom /media/cdrom</p>
<p><strong>ขั้นที่ 2</strong> แก้ไขไฟล์ CentOS-Media.repo เพื่อให้สามารถใช้คำสั่ง yum โดยตรงจากแผ่น cd หรือ dvd ได้</p>
<p># vi /etc/yum.repos.d/CentOS-Media.repo</p>
<p>แก้ไขบรรทัดนี้ให้ ตามนี้</p>
<p>enabled=1</p>
<p>จากนั้น save ไฟล์</p>
<p><strong>ขั้นที่ 3</strong> ใช้คำสั่ง yum</p>
<p># yum &#8211;disablerepo=\* &#8211;enablerepo=c5-media install pacakge-name</p>
<p>หรือก็เหมือนกับคำสั่ง yum ทั่วไป สามารถใช้ group install ได้</p>
<p># yum &#8211;disablerepo=\* &#8211;enablerepo=c5-media groupinstall &#8216;Virtualization&#8217;</p>
<p>เท่านี้ก็เป็นอันเรียบร้อย</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webserverthai.com/linux/%e0%b8%81%e0%b8%b2%e0%b8%a3-yum-%e0%b8%88%e0%b8%b2%e0%b8%81%e0%b9%81%e0%b8%9c%e0%b9%88%e0%b8%99-cd-dvd-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CPAN ตัวรวบรวม library ภาษา Perl</title>
		<link>http://www.webserverthai.com/linux/cpan-%e0%b8%95%e0%b8%b1%e0%b8%a7%e0%b8%a3%e0%b8%a7%e0%b8%9a%e0%b8%a3%e0%b8%a7%e0%b8%a1-library-%e0%b8%a0%e0%b8%b2%e0%b8%a9%e0%b8%b2-perl/</link>
		<comments>http://www.webserverthai.com/linux/cpan-%e0%b8%95%e0%b8%b1%e0%b8%a7%e0%b8%a3%e0%b8%a7%e0%b8%9a%e0%b8%a3%e0%b8%a7%e0%b8%a1-library-%e0%b8%a0%e0%b8%b2%e0%b8%a9%e0%b8%b2-perl/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 16:25:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[directadmin]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.webserverthai.com/?p=178</guid>
		<description><![CDATA[CPAN เป็นที่รวบรวมมอดูลและไลบรารีต่างๆ ให้ภาษา Perl สามารถใช้ในการติดตั้ง packages ต่างของภาษา Perl ได้อย่างง่ายดาย CPAN คล้ายกับ PEAR ของ PHP นั่นเอง การติดตั้ง cpan ใน CentOS สามารถใช้คำสั่ง yum install perl-libwww-perl เพื่อน install ตัว cpan ได้เลย ตัวอย่างการเข้า shell ของ cpan [root@serverscripts]# cpan cpan&#62; เมื่อต้องการ install package ใดๆ ก็ใช้คำสั่ง cpan&#62;install Archive::Tar เมื่อต้องการออกจาก cpan shell ให้ใช้คำสั่ง exit นอกจากนี้ที่ prompt ของ system สามารถ สั่งงานได้เลยโดยไม่ต้องเข้า shell ของ [...]]]></description>
			<content:encoded><![CDATA[<p>CPAN เป็นที่รวบรวมมอดูลและไลบรารีต่างๆ ให้ภาษา Perl สามารถใช้ในการติดตั้ง packages ต่างของภาษา Perl ได้อย่างง่ายดาย</p>
<p>CPAN คล้ายกับ PEAR ของ PHP นั่นเอง</p>
<p>การติดตั้ง cpan</p>
<p>ใน CentOS สามารถใช้คำสั่ง</p>
<p>yum install perl-libwww-perl</p>
<p>เพื่อน install ตัว cpan ได้เลย</p>
<p><span style="text-decoration: underline;">ตัวอย่างการเข้า shell ของ cpan</span></p>
<div id="_mcePaste"><span style="color: #ff0000;">[root@serverscripts]# cpan</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">cpan&gt;</span></div>
<p>เมื่อต้องการ install package ใดๆ ก็ใช้คำสั่ง</p>
<p><span style="color: #ff0000;"><span>cpan&gt;i</span>nstall Archive::Tar</span></p>
<p>เมื่อต้องการออกจาก cpan shell ให้ใช้คำสั่ง exit</p>
<p>นอกจากนี้ที่ prompt ของ system สามารถ สั่งงานได้เลยโดยไม่ต้องเข้า shell ของ CPAN เช่น</p>
<p><span style="color: #ff0000;">[root@serverscripts]#cpan install Archive::Tar Digest::SHA IP::Country Razor2 Net::Ident Mail::DKIM</span></p>
<p><span style="color: #000000;">ตัวนี้จะจำเป็นเวลาที่เราต้องการลงโปรแกรมที่ใช้ libraries ต่างๆของ Perl จำนวนมาก เช่น Spamassasin เป็นต้น</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webserverthai.com/linux/cpan-%e0%b8%95%e0%b8%b1%e0%b8%a7%e0%b8%a3%e0%b8%a7%e0%b8%9a%e0%b8%a3%e0%b8%a7%e0%b8%a1-library-%e0%b8%a0%e0%b8%b2%e0%b8%a9%e0%b8%b2-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ปรับแต่ง kernel รีดพลังให้ Linux</title>
		<link>http://www.webserverthai.com/linux/%e0%b8%9b%e0%b8%a3%e0%b8%b1%e0%b8%9a%e0%b9%81%e0%b8%95%e0%b9%88%e0%b8%87-kernel-%e0%b8%a3%e0%b8%b5%e0%b8%94%e0%b8%9e%e0%b8%a5%e0%b8%b1%e0%b8%87%e0%b9%83%e0%b8%ab%e0%b9%89-linux/</link>
		<comments>http://www.webserverthai.com/linux/%e0%b8%9b%e0%b8%a3%e0%b8%b1%e0%b8%9a%e0%b9%81%e0%b8%95%e0%b9%88%e0%b8%87-kernel-%e0%b8%a3%e0%b8%b5%e0%b8%94%e0%b8%9e%e0%b8%a5%e0%b8%b1%e0%b8%87%e0%b9%83%e0%b8%ab%e0%b9%89-linux/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 08:16:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.webserverthai.com/?p=173</guid>
		<description><![CDATA[โดยปกติแล้วโดย default Linux จะตั้งค่าของ kernel มาให้แล้ว แต่แน่นอนว่าจะเป็นค่ากลางๆ สำหรับ hardware แบบกลางๆ ถ้าหากเราต้องการรีดพลังให้สูงสุด เราสามารถทำได้ดังนี้ 1. แก้ไขไฟล์ /etc/sysctl.conf ตัวอย่างไฟล์ sysctl แบบที่ปรับแต่งแล้ว # Kernel sysctl configuration file for Red Hat Linux # # For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and # sysctl.conf(5) for more details. # Controls IP packet forwarding net.ipv4.ip_forward = 0 # Controls [...]]]></description>
			<content:encoded><![CDATA[<p>โดยปกติแล้วโดย default Linux จะตั้งค่าของ kernel มาให้แล้ว แต่แน่นอนว่าจะเป็นค่ากลางๆ สำหรับ hardware แบบกลางๆ</p>
<div>ถ้าหากเราต้องการรีดพลังให้สูงสุด เราสามารถทำได้ดังนี้</div>
<div>1. แก้ไขไฟล์ /etc/sysctl.conf</div>
<div>ตัวอย่างไฟล์ sysctl แบบที่ปรับแต่งแล้ว</div>
<div><span style="color: #ff0000;"># Kernel sysctl configuration file for Red Hat Linux</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">#</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># sysctl.conf(5) for more details.</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Controls IP packet forwarding</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.ip_forward = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Controls source route verification</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.default.rp_filter = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Do not accept source routing</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.default.accept_source_route = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Controls the System Request debugging functionality of the kernel</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">kernel.sysrq = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Controls whether core dumps will append the PID to the core filename</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Useful for debugging multi-threaded applications</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">kernel.core_uses_pid = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Controls the use of TCP syncookies</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.tcp_syncookies = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Controls the maximum size of a message, in bytes</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">kernel.msgmnb = 65536</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Controls the default maxmimum size of a mesage queue</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">kernel.msgmax = 65536</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Controls the maximum shared segment size, in bytes</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">kernel.shmmax = 4294967295</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Controls the maximum number of shared memory segments, in pages</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">kernel.shmall = 268435456</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Disables packet forwarding</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.ip_forward=0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Disables IP source routing</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.all.accept_source_route = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.lo.accept_source_route = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.eth0.accept_source_route = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.default.accept_source_route = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Enable IP spoofing protection, turn on source route verification</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.all.rp_filter = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.lo.rp_filter = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.eth0.rp_filter = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.default.rp_filter = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Disable ICMP Redirect Acceptance</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.all.accept_redirects = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.lo.accept_redirects = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.eth0.accept_redirects = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.default.accept_redirects = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Disables IP source routing</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.all.accept_source_route = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.lo.accept_source_route = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.eth0.accept_source_route = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.default.accept_source_route = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Enable IP spoofing protection, turn on source route verification</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.all.rp_filter = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.lo.rp_filter = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.eth0.rp_filter = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.default.rp_filter = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Disable ICMP Redirect Acceptance</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.all.accept_redirects = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.lo.accept_redirects = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.eth0.accept_redirects = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.default.accept_redirects = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Disables the magic-sysrq key</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">kernel.sysrq = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Decrease the time default value for tcp_fin_timeout connection</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.tcp_fin_timeout = 15</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Decrease the time default value for tcp_keepalive_time connection</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.tcp_keepalive_time = 1200</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Turn off the tcp_window_scaling</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.tcp_window_scaling = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Turn off the tcp_sack</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.tcp_sack = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Turn off the tcp_timestamps</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.tcp_timestamps = 0</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.tcp_syncookies = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Enable ignoring broadcasts request</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.icmp_echo_ignore_broadcasts = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Enable bad error message Protection</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.icmp_ignore_bogus_error_responses = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Log Spoofed Packets, Source Routed Packets, Redirect Packets</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.conf.all.log_martians = 1</span></div>
<div id="_mcePaste"><span style="color: #ff0000;"># Increases the size of the socket queue (effectively, q0).</span></div>
<div id="_mcePaste"><span style="color: #ff0000;">net.ipv4.tcp_max_syn_backlog = 1024</span></div>
<p><span style="color: #ff0000;"># Kernel sysctl configuration file for Red Hat Linux## For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and# sysctl.conf(5) for more details.<br />
# Controls IP packet forwardingnet.ipv4.ip_forward = 0<br />
# Controls source route verificationnet.ipv4.conf.default.rp_filter = 1<br />
# Do not accept source routingnet.ipv4.conf.default.accept_source_route = 0<br />
# Controls the System Request debugging functionality of the kernelkernel.sysrq = 0<br />
# Controls whether core dumps will append the PID to the core filename# Useful for debugging multi-threaded applicationskernel.core_uses_pid = 1<br />
# Controls the use of TCP syncookiesnet.ipv4.tcp_syncookies = 1<br />
# Controls the maximum size of a message, in byteskernel.msgmnb = 65536<br />
# Controls the default maxmimum size of a mesage queuekernel.msgmax = 65536<br />
# Controls the maximum shared segment size, in byteskernel.shmmax = 4294967295<br />
# Controls the maximum number of shared memory segments, in pageskernel.shmall = 268435456<br />
# Disables packet forwardingnet.ipv4.ip_forward=0<br />
# Disables IP source routingnet.ipv4.conf.all.accept_source_route = 0net.ipv4.conf.lo.accept_source_route = 0net.ipv4.conf.eth0.accept_source_route = 0net.ipv4.conf.default.accept_source_route = 0<br />
# Enable IP spoofing protection, turn on source route verificationnet.ipv4.conf.all.rp_filter = 1net.ipv4.conf.lo.rp_filter = 1net.ipv4.conf.eth0.rp_filter = 1net.ipv4.conf.default.rp_filter = 1<br />
# Disable ICMP Redirect Acceptancenet.ipv4.conf.all.accept_redirects = 0net.ipv4.conf.lo.accept_redirects = 0net.ipv4.conf.eth0.accept_redirects = 0net.ipv4.conf.default.accept_redirects = 0</span></p>
<p><span style="color: #ff0000;"># Disables IP source routingnet.ipv4.conf.all.accept_source_route = 0net.ipv4.conf.lo.accept_source_route = 0net.ipv4.conf.eth0.accept_source_route = 0net.ipv4.conf.default.accept_source_route = 0<br />
# Enable IP spoofing protection, turn on source route verificationnet.ipv4.conf.all.rp_filter = 1net.ipv4.conf.lo.rp_filter = 1net.ipv4.conf.eth0.rp_filter = 1net.ipv4.conf.default.rp_filter = 1<br />
# Disable ICMP Redirect Acceptancenet.ipv4.conf.all.accept_redirects = 0net.ipv4.conf.lo.accept_redirects = 0net.ipv4.conf.eth0.accept_redirects = 0net.ipv4.conf.default.accept_redirects = 0<br />
# Disables the magic-sysrq keykernel.sysrq = 0<br />
# Decrease the time default value for tcp_fin_timeout connectionnet.ipv4.tcp_fin_timeout = 15<br />
# Decrease the time default value for tcp_keepalive_time connectionnet.ipv4.tcp_keepalive_time = 1200<br />
# Turn off the tcp_window_scalingnet.ipv4.tcp_window_scaling = 0<br />
# Turn off the tcp_sacknet.ipv4.tcp_sack = 0<br />
# Turn off the tcp_timestampsnet.ipv4.tcp_timestamps = 0<br />
net.ipv4.tcp_syncookies = 1<br />
# Enable ignoring broadcasts requestnet.ipv4.icmp_echo_ignore_broadcasts = 1<br />
# Enable bad error message Protectionnet.ipv4.icmp_ignore_bogus_error_responses = 1<br />
# Log Spoofed Packets, Source Routed Packets, Redirect Packetsnet.ipv4.conf.all.log_martians = 1<br />
# Increases the size of the socket queue (effectively, q0).net.ipv4.tcp_max_syn_backlog = 10242.</span></p>
<p>2. หลังจากนั้นใช้คำสั่ง sysctl -p เพื่อใช้ค่าใหม่โดยไม่ต้อง boot เครื่อง หรือ reboot เครื่องใหม่เลยก็ได้</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webserverthai.com/linux/%e0%b8%9b%e0%b8%a3%e0%b8%b1%e0%b8%9a%e0%b9%81%e0%b8%95%e0%b9%88%e0%b8%87-kernel-%e0%b8%a3%e0%b8%b5%e0%b8%94%e0%b8%9e%e0%b8%a5%e0%b8%b1%e0%b8%87%e0%b9%83%e0%b8%ab%e0%b9%89-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>เทคนิดการลบ file ใน Linux กรณีไฟล์เยอะๆ</title>
		<link>http://www.webserverthai.com/linux/%e0%b9%80%e0%b8%97%e0%b8%84%e0%b8%99%e0%b8%b4%e0%b8%94%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%a5%e0%b8%9a-file-%e0%b9%83%e0%b8%99-linux-%e0%b8%81%e0%b8%a3%e0%b8%93%e0%b8%b5%e0%b9%84%e0%b8%9f%e0%b8%a5/</link>
		<comments>http://www.webserverthai.com/linux/%e0%b9%80%e0%b8%97%e0%b8%84%e0%b8%99%e0%b8%b4%e0%b8%94%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%a5%e0%b8%9a-file-%e0%b9%83%e0%b8%99-linux-%e0%b8%81%e0%b8%a3%e0%b8%93%e0%b8%b5%e0%b9%84%e0%b8%9f%e0%b8%a5/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 08:31:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.webserverthai.com/?p=156</guid>
		<description><![CDATA[ในบางครั้ง files ใน directory ของเราอาจจะมีจำนวนมาก จนกระทั่งเมื่อเราต้องการลบโดยคำสั่ง rm -f (ชื่อไฟล์) จะไม่สามารถลบได้ ( error จะขึ้นว่า /bin/rm: Argument list too long ) ให้ใช้คำสั่ง find แทน แล้วตามด้วย argument xargs rm -f ก็จะสามารถลบได้ ตัวอย่างคำสั่ง find . -name spam* &#124; xargs rm -f อีกเทคนิคนึงที่ผมชอบใช้คือ ในกรณีที่ต้องการลบไฟล์ทั้งหมดใน directory นั้น ก็ลบ directory ทิ้ง แล้วค่อยสร้างขึ้นมาใหม่ก็ได้]]></description>
			<content:encoded><![CDATA[<p>ในบางครั้ง files ใน directory ของเราอาจจะมีจำนวนมาก จนกระทั่งเมื่อเราต้องการลบโดยคำสั่ง rm -f (ชื่อไฟล์) จะไม่สามารถลบได้ ( error จะขึ้นว่า /bin/rm: Argument list too long )</p>
<p>ให้ใช้คำสั่ง find แทน แล้วตามด้วย argument xargs rm -f ก็จะสามารถลบได้</p>
<p>ตัวอย่างคำสั่ง find . -name spam* | xargs rm -f</p>
<p>อีกเทคนิคนึงที่ผมชอบใช้คือ ในกรณีที่ต้องการลบไฟล์ทั้งหมดใน directory นั้น ก็ลบ directory ทิ้ง แล้วค่อยสร้างขึ้นมาใหม่ก็ได้</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webserverthai.com/linux/%e0%b9%80%e0%b8%97%e0%b8%84%e0%b8%99%e0%b8%b4%e0%b8%94%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%a5%e0%b8%9a-file-%e0%b9%83%e0%b8%99-linux-%e0%b8%81%e0%b8%a3%e0%b8%93%e0%b8%b5%e0%b9%84%e0%b8%9f%e0%b8%a5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การทำ sub-interface บน Linux</title>
		<link>http://www.webserverthai.com/linux/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-sub-interface-%e0%b8%9a%e0%b8%99-linux/</link>
		<comments>http://www.webserverthai.com/linux/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-sub-interface-%e0%b8%9a%e0%b8%99-linux/#comments</comments>
		<pubDate>Sat, 04 Dec 2010 15:47:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.webserverthai.com/?p=146</guid>
		<description><![CDATA[ในบางครั้งเรามีความต้องการที่จะให้ 1 interface มีหลาย ip เพื่อประโยชน์บางอย่าง เช่น ใช้ Linux เป็น Router , ให้บริการ network หลายๆวง ฯลฯ กรณีต้องการทำ sub interface ( 1 interface มีหลาย ip ) มีขั้นตอนดังนี้ 1. copy file /etc/sysconfig/network-scripts/ifcfg-eth0 ( กรณีเป็น Ethernet 0 ) ไปเป็น /etc/sysconfig/network-scripts/ifcfg-eth0:1 2. ใช้โปรแกรม vi editor แก้ไขไฟล์ /etc/sysconfig/network-scripts/ifcfg-eth0:1 3. แก้บรรทัดที่เขียนว่า DEVICE=eth0 เป็น DEVICE=eth0:1 4. แก้ไข ip address และ parameters อื่นๆให้เรียบร้อย 5. Restart [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">ในบางครั้งเรามีความต้องการที่จะให้ 1 interface มีหลาย ip เพื่อประโยชน์บางอย่าง เช่น ใช้ Linux เป็น Router , ให้บริการ network หลายๆวง ฯลฯ</div>
<div><strong>กรณีต้องการทำ sub interface</strong> ( 1 interface มีหลาย ip ) มีขั้นตอนดังนี้</div>
<div>1. copy file /etc/sysconfig/network-scripts/ifcfg-eth0 ( กรณีเป็น Ethernet 0 ) ไปเป็น /etc/sysconfig/network-scripts/ifcfg-eth0:1</div>
<div id="_mcePaste">2. ใช้โปรแกรม vi editor แก้ไขไฟล์ /etc/sysconfig/network-scripts/ifcfg-eth0:1</div>
<div>3. แก้บรรทัดที่เขียนว่า DEVICE=eth0 เป็น DEVICE=eth0:1</div>
<div>4. แก้ไข ip address และ parameters อื่นๆให้เรียบร้อย</div>
<div>5. Restart network service ด้วยคำสั่ง service network restart</div>
<div>6. ใช้คำสั่ง ifconfig เพื่อเช็คดู interface ที่สร้างขึ้นใหม่</div>
<p><a href="http://www.webserverthai.com/wp-content/uploads/2010/12/ifconfig.png"><img class="aligncenter size-full wp-image-147" title="ifconfig" src="http://www.webserverthai.com/wp-content/uploads/2010/12/ifconfig.png" alt="" width="320" height="240" /></a></p>
<p>7. ทดลอง ping ไป ที่ ip ของเครื่องในวงเดียวกันกับ sub interface</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webserverthai.com/linux/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-sub-interface-%e0%b8%9a%e0%b8%99-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การแก้ไข ip address บน Linux ( CentOS , Redhat )</title>
		<link>http://www.webserverthai.com/linux/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82-ip-address-%e0%b8%9a%e0%b8%99-linux-centos-redhat/</link>
		<comments>http://www.webserverthai.com/linux/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82-ip-address-%e0%b8%9a%e0%b8%99-linux-centos-redhat/#comments</comments>
		<pubDate>Sat, 04 Dec 2010 15:35:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.webserverthai.com/?p=139</guid>
		<description><![CDATA[การแก้ไข ip บนเครื่อง Linux ทำได้ดังนี้ 1. ใช้โปรแกรม Editor เช่น vi editor แก้ไขไฟล์ /etc/sysconfig/network-scripts/ifcfg-eth0 ( กรณีเป็น Ethernet 0 ) 2. แก้ไข GATEWAY ได้ที่ไฟล์ /etc/sysconfig/network ( กรณีใส่ GATEWAY ไว้ที่ interface แล้วไม่ต้องใส่อีก ) 3. ใช้คำสั่ง service network restart เพื่อ restart ให้ใช้ ip ใหม่ 4. ใช้คำสั่ง ifconfig เพื่อดู ว่า ip address ของเราตอนนี้เป็น ip อะไรแล้ว 5. ทดสอบ ping ไปยังเครื่องอื่นในวงเดียวกัน และ [...]]]></description>
			<content:encoded><![CDATA[<p><strong>การแก้ไข ip บนเครื่อง Linux</strong></p>
<p>ทำได้ดังนี้</p>
<p>1. ใช้โปรแกรม Editor เช่น <a href="http://www.webserverthai.com/linux/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99-vi-editor/" target="_blank">vi editor</a> แก้ไขไฟล์ /etc/sysconfig/network-scripts/ifcfg-eth0 ( กรณีเป็น Ethernet 0 )</p>
<p style="text-align: center;"><a href="http://www.webserverthai.com/wp-content/uploads/2010/12/vi-eth0.jpg"><img class="aligncenter size-full wp-image-141" title="vi-eth0" src="http://www.webserverthai.com/wp-content/uploads/2010/12/vi-eth0.jpg" alt="change ip address linux vi" width="547" height="200" /></a></p>
<p>2. แก้ไข GATEWAY ได้ที่ไฟล์ /etc/sysconfig/network ( กรณีใส่ GATEWAY ไว้ที่ interface แล้วไม่ต้องใส่อีก )</p>
<p>3. ใช้คำสั่ง service network restart เพื่อ restart ให้ใช้ ip ใหม่</p>
<p>4. ใช้คำสั่ง ifconfig เพื่อดู ว่า ip address ของเราตอนนี้เป็น ip อะไรแล้ว</p>
<p>5. ทดสอบ ping ไปยังเครื่องอื่นในวงเดียวกัน และ default gateway เพื่อทดสอบดูว่าสามารถไปได้ไหม</p>
<p>6. จำไว้ว่า default gateway ต้องเป็น network วงเดียวกันเท่านั้น</p>
<p>7. กรณีแก้ชั่วคราวสามารถใช้คำสั่งนี้ได้</p>
<p>ifconfig eth0 192.168.1.5 netmask 255.255.255.0 up</p>
<p>แต่จำไว้ว่าแบบนี้ ip address จะกลับไปเป็นตาม ip ที่อยู่ใน configure file กรณี boot เครื่องใหม่</p>
<p><strong> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webserverthai.com/linux/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82-ip-address-%e0%b8%9a%e0%b8%99-linux-centos-redhat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rpm คำสั่ง install โปรแกรมใน Linux ตระกูล Redhat</title>
		<link>http://www.webserverthai.com/linux/rpm-%e0%b8%84%e0%b8%b3%e0%b8%aa%e0%b8%b1%e0%b9%88%e0%b8%87-install-%e0%b9%82%e0%b8%9b%e0%b8%a3%e0%b9%81%e0%b8%81%e0%b8%a3%e0%b8%a1%e0%b9%83%e0%b8%99-linux-%e0%b8%95%e0%b8%a3%e0%b8%b0%e0%b8%81%e0%b8%b9/</link>
		<comments>http://www.webserverthai.com/linux/rpm-%e0%b8%84%e0%b8%b3%e0%b8%aa%e0%b8%b1%e0%b9%88%e0%b8%87-install-%e0%b9%82%e0%b8%9b%e0%b8%a3%e0%b9%81%e0%b8%81%e0%b8%a3%e0%b8%a1%e0%b9%83%e0%b8%99-linux-%e0%b8%95%e0%b8%a3%e0%b8%b0%e0%b8%81%e0%b8%b9/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 17:01:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.webserverthai.com/?p=130</guid>
		<description><![CDATA[ปกติถ้าใครใช้ Linux ในตระกูล Redhat คงจะคุ้นเคยกับคำสั่ง rpm rpm เป็นคำสั่งในการ install โปรแกรมใน Redhat โดยโปรแกรมจะถูกจัดให้อยู่ในรูปของ packet สามารถดูในแผ่น install ของ Linux ได้จะพบ rpm ของ Software อยู่ รูปแบบของคำสั่ง ดูว่ามีโปรแกรมอะไรลงอยู่บ้าง rpm -qa อาจจะใช้คำสั่ง grep ช่วยเพื่อแสดงแต่ที่ต้องการดู เช่น rpm -qa&#124;grep php การลงโปรแกรมใหม่ให้ใช้คำสั่งต่อไปนี้ rpm -ivh packagename.rpm การลบโปรแกรมที่มีอยู่ออกใช้คำสั่งต่อไปนี้ rpm -e packagename หากต้องการ upgrade โปรแกรมใช้คำสั่งต่อไปนี้ rpm -Uvh packagename.rpm ถ้า package ที่เราจะลงหรือลบนั้นมีโปรแกรมอื่นใช้งานอยู่ เราจะลงไม่ได้จะขึ้นว่า failed dependencies ให้เราเติม option [...]]]></description>
			<content:encoded><![CDATA[<p>ปกติถ้าใครใช้ Linux ในตระกูล Redhat คงจะคุ้นเคยกับคำสั่ง rpm</p>
<p>rpm เป็นคำสั่งในการ install โปรแกรมใน Redhat โดยโปรแกรมจะถูกจัดให้อยู่ในรูปของ packet สามารถดูในแผ่น install ของ Linux ได้จะพบ rpm ของ Software อยู่</p>
<p><strong><span style="text-decoration: underline;">รูปแบบของคำสั่ง</span></strong></p>
<p>ดูว่ามีโปรแกรมอะไรลงอยู่บ้าง</p>
<p><span style="color: #ff0000;">rpm -qa</span></p>
<p>อาจจะใช้คำสั่ง grep ช่วยเพื่อแสดงแต่ที่ต้องการดู เช่น <span style="color: #ff0000;">rpm -qa|grep php</span></p>
<p>การลงโปรแกรมใหม่ให้ใช้คำสั่งต่อไปนี้</p>
<p><span style="color: #ff0000;">rpm -ivh packagename.rpm</span></p>
<p>การลบโปรแกรมที่มีอยู่ออกใช้คำสั่งต่อไปนี้</p>
<p><span style="color: #ff0000;">rpm -e packagename </span></p>
<p>หากต้องการ upgrade โปรแกรมใช้คำสั่งต่อไปนี้</p>
<p><span style="color: #ff0000;">rpm -Uvh packagename.rpm</span></p>
<p>ถ้า package ที่เราจะลงหรือลบนั้นมีโปรแกรมอื่นใช้งานอยู่ เราจะลงไม่ได้จะขึ้นว่า failed dependencies ให้เราเติม option &#8211;nodepts ลงไปในคำสั่ง เช่น</p>
<p><span style="color: #ff0000;">rpm -Uvh &#8211;nodepts packagename.rpm </span></p>
<p>จะเป็นการลงโดยไม่สนใจ package อื่น แต่ต้องระวังให้มากเพราะโปรแกรมที่ link กันอยู่อาจจะทำงานไม่ได้</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webserverthai.com/linux/rpm-%e0%b8%84%e0%b8%b3%e0%b8%aa%e0%b8%b1%e0%b9%88%e0%b8%87-install-%e0%b9%82%e0%b8%9b%e0%b8%a3%e0%b9%81%e0%b8%81%e0%b8%a3%e0%b8%a1%e0%b9%83%e0%b8%99-linux-%e0%b8%95%e0%b8%a3%e0%b8%b0%e0%b8%81%e0%b8%b9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>แก้ไข ip address ใน Linux</title>
		<link>http://www.webserverthai.com/linux/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82-ip-address-%e0%b9%83%e0%b8%99-linux/</link>
		<comments>http://www.webserverthai.com/linux/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82-ip-address-%e0%b9%83%e0%b8%99-linux/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 04:53:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.webserverthai.com/?p=125</guid>
		<description><![CDATA[ใช้ได้ในตระกูล Redhat , CentOS นะครับ โดยเข้าไปที่ /etc/sysconfig/network-scripts/ แก้ไขไฟชื่อ ifcfg-eth0 สำหรับ port ethernet 0 โดยคำสั่ง #vi ifcfg-eth0 แก้ไขบรรทัดที่เขียนว่า IPADDR DEVICE=eth0 BOOTPROTO=static HWADDR=00:19:B9:E5:68:82 ONBOOT=yes TYPE=Ethernet IPADDR=192.168.12.203 NETMASK=255.255.255.0 สำหรับการแก้ไขค่า default gateway แก้ไขได้ที่ไฟล์ /etc/sysconfig/network แก้ไขบรรทัดที่เขียนว่า GATEWAY NETWORKING=yes HOSTNAME=localhost.localdomain GATEWAY=192.168.12.1 จากนั้นอย่าลืม restart network service ด้วยคำสั่ง service network restart ก็เป็นอันเรียบร้อย]]></description>
			<content:encoded><![CDATA[<p>ใช้ได้ในตระกูล Redhat , CentOS นะครับ โดยเข้าไปที่</p>
<p>/etc/sysconfig/network-scripts/</p>
<p>แก้ไขไฟชื่อ ifcfg-eth0 สำหรับ port ethernet 0</p>
<p>โดยคำสั่ง #vi ifcfg-eth0</p>
<p>แก้ไขบรรทัดที่เขียนว่า IPADDR</p>
<div id="_mcePaste">DEVICE=eth0</div>
<div id="_mcePaste">BOOTPROTO=static</div>
<div id="_mcePaste">HWADDR=00:19:B9:E5:68:82</div>
<div id="_mcePaste">ONBOOT=yes</div>
<div id="_mcePaste">TYPE=Ethernet</div>
<div id="_mcePaste"><span style="color: #ff0000;">IPADDR=192.168.12.203</span></div>
<div id="_mcePaste">NETMASK=255.255.255.0</div>
<p>สำหรับการแก้ไขค่า default gateway แก้ไขได้ที่ไฟล์</p>
<p>/etc/sysconfig/network</p>
<p>แก้ไขบรรทัดที่เขียนว่า GATEWAY</p>
<p>NETWORKING=yes</p>
<p>HOSTNAME=localhost.localdomain</p>
<p><span style="color: #ff0000;">GATEWAY=192.168.12.1</span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">จากนั้นอย่าลืม restart network service ด้วยคำสั่ง</span></span></p>
<p>service network restart</p>
<p>ก็เป็นอันเรียบร้อย</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webserverthai.com/linux/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82-ip-address-%e0%b9%83%e0%b8%99-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux troubleshooting คำสั่งในการแก้ปัญหา Linux</title>
		<link>http://www.webserverthai.com/linux/linux-troubleshooting-%e0%b8%84%e0%b8%b3%e0%b8%aa%e0%b8%b1%e0%b9%88%e0%b8%87%e0%b9%83%e0%b8%99%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-linux/</link>
		<comments>http://www.webserverthai.com/linux/linux-troubleshooting-%e0%b8%84%e0%b8%b3%e0%b8%aa%e0%b8%b1%e0%b9%88%e0%b8%87%e0%b9%83%e0%b8%99%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-linux/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 12:44:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.webserverthai.com/?p=101</guid>
		<description><![CDATA[เวลา server ของเรามีปัญหา โดยปกติแล้วกว่า 90% จะมาจากปัญหาพื้นฐานต่างๆ เช่น disk เต็ม , ram ไม่พอ , CPU 100% ผมได้รวบรวมวิธีการค้นหาปัญหาที่เิกิดขึ้นใน Linux sever ( Linux troubleshooting ) ลองทำตามดูรับรองว่ามีประโยชน์มากทีเดียว 1. ใช้คำสั่ง df -h เพื่อดู disk space ว่าเต็ม 100% หรือเปล่า นี่เป็นสิ่งแรกที่ต้องตรวจสอบ #df -h Filesystem            Size  Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 901G  901G  0G  100% / &#60;&#60; นี่แสดงว่ามีปัญหา [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>เวลา server ของเรามีปัญหา โดยปกติแล้วกว่า 90% จะมาจากปัญหาพื้นฐานต่างๆ เช่น disk เต็ม , ram ไม่พอ , CPU 100%</p>
<p>ผมได้รวบรวมวิธีการค้นหาปัญหาที่เิกิดขึ้นใน Linux sever ( Linux troubleshooting ) ลองทำตามดูรับรองว่ามีประโยชน์มากทีเดียว</p>
<p>1. ใช้คำสั่ง df -h</p>
<p>เพื่อดู disk space ว่าเต็ม 100% หรือเปล่า นี่เป็นสิ่งแรกที่ต้องตรวจสอบ</p>
<div id="_mcePaste">#df -h</div>
<div id="_mcePaste">Filesystem            Size  Used Avail Use% Mounted on</div>
<div id="_mcePaste">/dev/mapper/VolGroup00-LogVol00</div>
<div>901G  901G  0G  100% / &lt;&lt; นี่แสดงว่ามีปัญหา disk เต็ม</div>
<div id="_mcePaste">/dev/sdb1             903G   36G  821G   5% /backup</div>
<div id="_mcePaste">/dev/sda1              99M   12M   83M  13% /boot</div>
<div id="_mcePaste">tmpfs                         2.0G     0  2.0G   0% /dev/shm</div>
<div id="_mcePaste">/var/tmpMnt          1008M   35M  922M   4% /tmp</div>
<div>ถ้าพบว่า disk เต็ม สามารถไปที่ / แล้วลองใช้คำสั่ง du &#8211;max-depth=1 -h เพื่อดูว่า file ไหนที่ทำให้เต็ม โดยไล่ไปทีละ directpry</div>
<p>2. ใช้คำสั่ง top</p>
<p>เพื่อดู CPU , RAM , swap file และ process ที่ใช้ CPU และ memory สูงที่สุด</p>
<p><a href="http://www.webserverthai.com/wp-content/uploads/2010/04/top.jpg"><img title="top" src="http://www.webserverthai.com/wp-content/uploads/2010/04/top.jpg" alt="top command" width="554" height="336" /></a></p>
<p>3. ใช้คำสั่ง <tt>tail -100 /var/log/messages</tt></p>
<p><tt>เพื่อดู log ไฟล์ของระบบว่าเกิดอะไรขึ้นเพื่อดู log ไฟล์ของระบบว่าเกิดอะไรขึ้น 100 คือ 100 บรรทัดสุดท้าย สามารถเปลี่ยนได้ตามต้องการ</tt></p>
<p>4. ดู log ของ process นั้นๆ เช่น log ของ http , mysql</p>
</div>
<p>#df -hFilesystem            Size  Used Avail Use% Mounted on/dev/mapper/VolGroup00-LogVol00/dev/sdb1             903G   36G  821G   5% /backup/dev/sda1              99M   12M   83M  13% /boottmpfs                         2.0G     0  2.0G   0% /dev/shm/var/tmpMnt          1008M   35M  922M   4% /tmp</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webserverthai.com/linux/linux-troubleshooting-%e0%b8%84%e0%b8%b3%e0%b8%aa%e0%b8%b1%e0%b9%88%e0%b8%87%e0%b9%83%e0%b8%99%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux ลืม password root ทำไงดี</title>
		<link>http://www.webserverthai.com/linux/linux-%e0%b8%a5%e0%b8%b7%e0%b8%a1-password-root-%e0%b8%97%e0%b8%b3%e0%b9%84%e0%b8%87%e0%b8%94%e0%b8%b5/</link>
		<comments>http://www.webserverthai.com/linux/linux-%e0%b8%a5%e0%b8%b7%e0%b8%a1-password-root-%e0%b8%97%e0%b8%b3%e0%b9%84%e0%b8%87%e0%b8%94%e0%b8%b5/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 04:26:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[single mode]]></category>

		<guid isPermaLink="false">http://www.webserverthai.com/?p=95</guid>
		<description><![CDATA[เชื่อว่าคงจะมีบางครั้งที่หลายๆคนจำเป็นจะต้อง login เข้า server ทั้งๆที่ไม่รู้ password ของ root ( คนเก่าลาออก,admin ไม่อยู่ เป็นต้น ) หรืออาจจะเป็นความสะเพร่าของเราเองที่จำ password ที่ set เอาไว้ไม่ได้ นี่คือสิ่งที่จะต้องทำในกรณีนี้ เตรียมตัว อุปกรณ์ให้พร้อม เตรียม Keyboard , จอ monitor ต่อเข้ากับ server ที่เราต้องการ login เข้าไป ขั้นตอน หลังจากต่อ Keyboard และ monitor แล้วให้ reboot เครื่อง 1. ตอนนี้เข้าหน้า GRUB menu (หน้าที่นับถอยหลัง 5 4 3 2 1 ) ให้กดปุ่มอะไรก็ได้เพื่อให้เลือก GRUฺ menu ได้ 2. [...]]]></description>
			<content:encoded><![CDATA[<p>เชื่อว่าคงจะมีบางครั้งที่หลายๆคนจำเป็นจะต้อง login เข้า server ทั้งๆที่ไม่รู้ password ของ root ( คนเก่าลาออก,admin ไม่อยู่ เป็นต้น ) หรืออาจจะเป็นความสะเพร่าของเราเองที่จำ password ที่ set เอาไว้ไม่ได้ นี่คือสิ่งที่จะต้องทำในกรณีนี้</p>
<p><strong>เตรียมตัว อุปกรณ์ให้พร้อม</strong></p>
<p>เตรียม Keyboard , จอ monitor ต่อเข้ากับ server ที่เราต้องการ login เข้าไป</p>
<p><strong>ขั้นตอน</strong></p>
<p>หลังจากต่อ Keyboard และ monitor แล้วให้ reboot เครื่อง</p>
<p>1. ตอนนี้เข้าหน้า GRUB menu (หน้าที่นับถอยหลัง 5 4 3 2 1 ) ให้กดปุ่มอะไรก็ได้เพื่อให้เลือก GRUฺ menu ได้</p>
<p>2. ที่ menu &#8220;Red Hat Enterprise Linux ที่มี kernal version ที่เราต้องการ boot ให้กด a</p>
<p>3. ไปที่สุดบรรทัด กด space bar 1 ทีแล้วพิมพ์ single กด enter เพื่อเข้าสู่ single mode</p>
<p>4. หลังจาก boot เข้าไปเรียบร้อยใช้คำสั่ง #passwd root เพื่อแก้ไข password ใหม่</p>
<p>5. reboot ใหม่อีกครั้งตามปกติ</p>
<p><a href="http://www.webserverthai.com/wp-content/uploads/2010/03/grub.png"><img class="alignleft size-full wp-image-98" title="centos grub" src="http://www.webserverthai.com/wp-content/uploads/2010/03/grub.png" alt="centos grub" width="550" height="413" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webserverthai.com/linux/linux-%e0%b8%a5%e0%b8%b7%e0%b8%a1-password-root-%e0%b8%97%e0%b8%b3%e0%b9%84%e0%b8%87%e0%b8%94%e0%b8%b5/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

