<?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, 25 Jul 2010 17:20:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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 &#8211;nodepts ลงไปในคำสั่ง เช่น
rpm -Uvh &#8211;nodepts packagename.rpm 
จะเป็นการลงโดยไม่สนใจ package อื่น แต่ต้องระวังให้มากเพราะโปรแกรมที่ link [...]]]></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; นี่แสดงว่ามีปัญหา disk เต็ม
/dev/sdb1           [...]]]></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. ที่ menu &#8220;Red Hat Enterprise Linux [...]]]></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>0</slash:comments>
		</item>
		<item>
		<title>ขั้นตอนการทำ Secure /tmp ป้องกัน hacker</title>
		<link>http://www.webserverthai.com/linux/%e0%b8%82%e0%b8%b1%e0%b9%89%e0%b8%99%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-secure-tmp-%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99-hacker/</link>
		<comments>http://www.webserverthai.com/linux/%e0%b8%82%e0%b8%b1%e0%b9%89%e0%b8%99%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-secure-tmp-%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99-hacker/#comments</comments>
		<pubDate>Wed, 13 May 2009 04:17:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[secure]]></category>

		<guid isPermaLink="false">http://www.webserverthai.com/?p=16</guid>
		<description><![CDATA[1. สร้าง file ขนาด 512 MB สำหรับใช้เป็น /tmp
dd if=/dev/zero of=/var/TMP bs=1024 count=524288
2. สร้างเป็น ext3
mke2fs j /var/TMP
3. Backup /tmp เดิมไว้ก่อน
mv  /tmp /tmp_backup
4. สร้าง ไดเร็กทรอรี่ /tmp
mkdir /tmp
5. ลอง Mount ดู
mount -o loop,noexec,nosuid,rw /var/TMP /tmp
6. กำหนด Permission ของ /tmp
chmod 1777 /tmp
7. Restore /tmp กลับ และลบ Backup ทิ้ง
cp -R /tmp_backup/* /tmp/
rm -rf /tmp_backup
]]></description>
			<content:encoded><![CDATA[<p>1. สร้าง file ขนาด 512 MB สำหรับใช้เป็น /tmp</p>
<p>dd if=/dev/zero of=/var/TMP bs=1024 count=524288</p>
<p>2. สร้างเป็น ext3</p>
<p>mke2fs j /var/TMP</p>
<p>3. Backup /tmp เดิมไว้ก่อน</p>
<p>mv  /tmp /tmp_backup</p>
<p>4. สร้าง ไดเร็กทรอรี่ /tmp</p>
<p>mkdir /tmp</p>
<p>5. ลอง Mount ดู</p>
<p>mount -o loop,noexec,nosuid,rw /var/TMP /tmp</p>
<p>6. กำหนด Permission ของ /tmp</p>
<p>chmod 1777 /tmp</p>
<p>7. Restore /tmp กลับ และลบ Backup ทิ้ง</p>
<p>cp -R /tmp_backup/* /tmp/<br />
rm -rf /tmp_backup</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webserverthai.com/linux/%e0%b8%82%e0%b8%b1%e0%b9%89%e0%b8%99%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-secure-tmp-%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99-hacker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การ Format Harddisk ใหม่ใน Linux</title>
		<link>http://www.webserverthai.com/linux/%e0%b8%81%e0%b8%b2%e0%b8%a3-format-harddisk-%e0%b9%83%e0%b8%ab%e0%b8%a1%e0%b9%88%e0%b9%83%e0%b8%99-linux/</link>
		<comments>http://www.webserverthai.com/linux/%e0%b8%81%e0%b8%b2%e0%b8%a3-format-harddisk-%e0%b9%83%e0%b8%ab%e0%b8%a1%e0%b9%88%e0%b9%83%e0%b8%99-linux/#comments</comments>
		<pubDate>Thu, 07 May 2009 01:50:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://webserverthai.com/?p=8</guid>
		<description><![CDATA[การ Format Harddisk ใหม่ใน Linux
[root@server1 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won&#8217;t be recoverable.
The number of cylinders for this disk is set to 121601.
There [...]]]></description>
			<content:encoded><![CDATA[<p>การ Format Harddisk ใหม่ใน Linux</p>
<p>[root@server1 ~]# fdisk /dev/sdb<br />
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel<br />
Building a new DOS disklabel. Changes will remain in memory only,<br />
until you decide to write them. After that, of course, the previous<br />
content won&#8217;t be recoverable.<br />
The number of cylinders for this disk is set to 121601.<br />
There is nothing wrong with that, but this is larger than 1024,<br />
and could in certain setups cause problems with:<br />
1) software that runs at boot time (e.g., old versions of LILO)<br />
2) booting and partitioning software from other OSs<br />
   (e.g., DOS FDISK, OS/2 FDISK)<br />
Warning: invalid flag 0&#215;0000 of partition table 4 will be corrected by w(rite)</p>
<p>Command (m for help): p</p>
<p>Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes<br />
255 heads, 63 sectors/track, 121601 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes</p>
<p>   Device Boot      Start         End      Blocks   Id  System</p>
<p>Command (m for help): n<br />
Command action<br />
   e   extended<br />
   p   primary partition (1-4)<br />
p<br />
Partition number (1-4): 1<br />
First cylinder (1-121601, default 1):<br />
Using default value 1<br />
Last cylinder or +size or +sizeM or +sizeK (1-121601, default 121601):<br />
Using default value 121601</p>
<p>Command (m for help): p</p>
<p>Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes<br />
255 heads, 63 sectors/track, 121601 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes</p>
<p>   Device Boot      Start         End      Blocks   Id  System<br />
/dev/sdb1               1      121601   976760001   83  Linux</p>
<p>Command (m for help): w<br />
The partition table has been altered!</p>
<p>Calling ioctl() to re-read partition table.<br />
Syncing disks.</p>
<p>[root@server1 ~]# mkfs -t ext3 /dev/sdb1</p>
<p>mke2fs 1.39 (29-May-2006)<br />
Filesystem label=<br />
OS type: Linux<br />
Block size=4096 (log=2)<br />
Fragment size=4096 (log=2)<br />
122109952 inodes, 244190000 blocks<br />
12209500 blocks (5.00%) reserved for the super user<br />
First data block=0<br />
Maximum filesystem blocks=0<br />
7453 block groups<br />
32768 blocks per group, 32768 fragments per group<br />
16384 inodes per group<br />
Superblock backups stored on blocks:<br />
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,<br />
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,<br />
        102400000, 214990848</p>
<p>Writing inode tables: done                           <br />
Creating journal (32768 blocks): done<br />
Writing superblocks and filesystem accounting information: done</p>
<p>This filesystem will be automatically checked every 36 mounts or<br />
180 days, whichever comes first.  Use tune2fs -c or -i to override.</p>
<p> </p>
<p>แก้ไข /etc/fstab เพิ่ม</p>
<p>/dev/sdb1           /backup                 ext3    defaults        1 2</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webserverthai.com/linux/%e0%b8%81%e0%b8%b2%e0%b8%a3-format-harddisk-%e0%b9%83%e0%b8%ab%e0%b8%a1%e0%b9%88%e0%b9%83%e0%b8%99-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
