<?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>Just My Life &#187; troubleshooting</title>
	<atom:link href="http://imrgill.com/tag/troubleshooting/feed/" rel="self" type="application/rss+xml" />
	<link>http://imrgill.com</link>
	<description>I&#039;m mrGilL, I&#039;m Newbie Admin</description>
	<lastBuildDate>Mon, 19 Dec 2011 11:46:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>แก้ปัญหา traceroute: raw socket: Protocol not supported บน Solaris Containers</title>
		<link>http://imrgill.com/2011/11/22/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-traceroute-raw-socket-protocol-not-supported-%e0%b8%9a%e0%b8%99-solaris-containers.html</link>
		<comments>http://imrgill.com/2011/11/22/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-traceroute-raw-socket-protocol-not-supported-%e0%b8%9a%e0%b8%99-solaris-containers.html#comments</comments>
		<pubDate>Tue, 22 Nov 2011 15:06:45 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Daily tips]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[net_rawaccess]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris 10]]></category>
		<category><![CDATA[solaris containers]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[traceroute]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=674</guid>
		<description><![CDATA[ช่วงนี้จับเครื่อง Sun บ่อยครับเลยเขียนเรื่อง Solaris บ่อย เช่น วันนี้เจอปัญหา bash-2.03$ /usr/sbin/traceroute x.x.x.x traceroute: raw socket: Protocol not supported ปัญหานี้เกิดจากเราไม่ได้กำหนด Privileges Non-Global Zones บางตัวเข้าไปครับซึ่งจะเป็นเฉพาะกับ Branded Zones เท่านั้นเช่นถ้าเราติดตั้ง Non-Global Zones ที่เป็น Solaris 9 วิธีแก้ปัญหานี้คือให้เราเพิ่ม Privileges net_rawaccess เข้าไป ขั้นตอน zonecfg -z &#60;zonename&#62; set limitpriv=default,sys_admin,net_rawaccess verify commit exit zoneadm -z &#60;zonename&#62; reboot หลังจาก Reboot เสร็จก็ลองใช้คำสั่ง traceroute ดูครับก็น่าจะใช้ได้แล้ว แหล่งข้อมูล : http://solarisbackupandstorage.wordpress.com/2011/09/17/solaris-branded-zones/]]></description>
			<content:encoded><![CDATA[<p>ช่วงนี้จับเครื่อง Sun บ่อยครับเลยเขียนเรื่อง Solaris บ่อย เช่น วันนี้เจอปัญหา</p>
<pre>
<div class="codesnip-container" >bash-2.03$ /usr/sbin/traceroute x.x.x.x
traceroute: raw socket: Protocol not supported</div>
</pre>
<p>ปัญหานี้เกิดจากเราไม่ได้กำหนด Privileges Non-Global Zones บางตัวเข้าไปครับซึ่งจะเป็นเฉพาะกับ Branded Zones เท่านั้นเช่นถ้าเราติดตั้ง Non-Global Zones ที่เป็น Solaris 9<br />
วิธีแก้ปัญหานี้คือให้เราเพิ่ม Privileges net_rawaccess เข้าไป<br />
ขั้นตอน</p>
<pre>
<div class="codesnip-container" >zonecfg -z &#60;zonename&#62;
set limitpriv=default,sys_admin,net_rawaccess
verify
commit
exit
zoneadm -z &#60;zonename&#62; reboot</div>
</pre>
<p>หลังจาก Reboot เสร็จก็ลองใช้คำสั่ง traceroute ดูครับก็น่าจะใช้ได้แล้ว<br />
แหล่งข้อมูล : <a href="http://solarisbackupandstorage.wordpress.com/2011/09/17/solaris-branded-zones/" target="_blank">http://solarisbackupandstorage.wordpress.com/2011/09/17/solaris-branded-zones/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2011/11/22/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-traceroute-raw-socket-protocol-not-supported-%e0%b8%9a%e0%b8%99-solaris-containers.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>แก้ปัญหา Emesene connect ไม่ได้บน Ubuntu</title>
		<link>http://imrgill.com/2011/11/11/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-emesene-connect-%e0%b9%84%e0%b8%a1%e0%b9%88%e0%b9%84%e0%b8%94%e0%b9%89%e0%b8%9a%e0%b8%99-ubuntu.html</link>
		<comments>http://imrgill.com/2011/11/11/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-emesene-connect-%e0%b9%84%e0%b8%a1%e0%b9%88%e0%b9%84%e0%b8%94%e0%b9%89%e0%b8%9a%e0%b8%99-ubuntu.html#comments</comments>
		<pubDate>Fri, 11 Nov 2011 04:08:10 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Daily tips]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=667</guid>
		<description><![CDATA[ตอนนี้หลายที่คนใช้ Emesene บน Ubuntu คงประสบปัญหาน้ำท่วมกันแถมยัง connect หรือ login เจ้า emesene ไม่ได้อีกใช่ไหมครับ ปัญหาดังกล่าวเกิดมาจากทาง Server ของ Live Messenger จึงทำให้ Third-party MSN Client ไม่สามารถ login ได้ วิธีแก้ไขปัญหาชั่วคราวตอนนี้ก็ให้ Download Emesene จากลิงค์ข้างล่างมาใช้ไปก่อนครับ Download Emesene Snapshot โหลดมาแล้วก็ Extract มันออกมาครับแล้วเข้าไปในไดเรกทอรี emesene -> ดัลเบิลคลิกที่ emesene เลือก Run จากนั้นก็กรอกข้อมูล login ปกติได้เลยครับ หลังจาก login สำเร็จ ระบบอาจแจ้งเตือนว่า profile เรา broken ถ้าเรากด Yes มันก็จะให้เรา login เข้าไปใน Live [...]]]></description>
			<content:encoded><![CDATA[<p>ตอนนี้หลายที่คนใช้ Emesene บน Ubuntu คงประสบปัญหาน้ำท่วมกันแถมยัง connect หรือ login เจ้า emesene ไม่ได้อีกใช่ไหมครับ<br />
ปัญหาดังกล่าวเกิดมาจากทาง Server ของ Live Messenger จึงทำให้ Third-party MSN Client ไม่สามารถ login ได้<br />
วิธีแก้ไขปัญหาชั่วคราวตอนนี้ก็ให้ Download Emesene จากลิงค์ข้างล่างมาใช้ไปก่อนครับ</p>
<p><a href="https://github.com/emesene/emesene/zipball/master">Download Emesene Snapshot</a></p>
<p>โหลดมาแล้วก็ Extract มันออกมาครับแล้วเข้าไปในไดเรกทอรี emesene -> ดัลเบิลคลิกที่ emesene เลือก Run<br />
จากนั้นก็กรอกข้อมูล login ปกติได้เลยครับ<br />
หลังจาก login สำเร็จ ระบบอาจแจ้งเตือนว่า profile เรา broken ถ้าเรากด Yes มันก็จะให้เรา login เข้าไปใน Live profile เพื่อแก้ไข profile ได้ครับ</p>
<p>สำหรับหรับใครที่จะใช้ emesene ตัวนี้เป็นการถาวรก็ mv directory emesene ของใหม่ไปทับของเก่าที่ /usr/share/emesene/ ได้เลยครับ</p>
<pre>
<div class="codesnip-container" >root@mrgill-laptop:~# mv /usr/share/emesene/emesene /usr/share/emesene/emesene.backup #backup ตัวเก่าเก็บไว้ก่อน
root@mrgill-laptop:~# mv Desktop/emesene-emesene-00cd2cc/emesene/ /usr/share/emesene/ #ย้ายตัวใหม่มาไว้แทนที่ของเก่า</div>
</pre>
<p>จบครับ</p>
<p>ขอบคุณข้อมูลจาก : <a href="http://www.omgubuntu.co.uk/2011/11/emesene-not-connecting-quick-fix/">http://www.omgubuntu.co.uk/2011/11/emesene-not-connecting-quick-fix/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2011/11/11/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-emesene-connect-%e0%b9%84%e0%b8%a1%e0%b9%88%e0%b9%84%e0%b8%94%e0%b9%89%e0%b8%9a%e0%b8%99-ubuntu.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>แก้ปัญหาเวลาใน Solaris Container Non-Global ไม่ตรงกับ Global</title>
		<link>http://imrgill.com/2011/11/10/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2%e0%b9%80%e0%b8%a7%e0%b8%a5%e0%b8%b2%e0%b9%83%e0%b8%99-solaris-container-non-global-%e0%b9%84%e0%b8%a1%e0%b9%88%e0%b8%95.html</link>
		<comments>http://imrgill.com/2011/11/10/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2%e0%b9%80%e0%b8%a7%e0%b8%a5%e0%b8%b2%e0%b9%83%e0%b8%99-solaris-container-non-global-%e0%b9%84%e0%b8%a1%e0%b9%88%e0%b8%95.html#comments</comments>
		<pubDate>Thu, 10 Nov 2011 03:41:03 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Daily command]]></category>
		<category><![CDATA[Daily tips]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[container]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[timezone]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[zone]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=665</guid>
		<description><![CDATA[เครื่อง Global เวลา bash-3.00# date Tue Nov 8 18:16:00 GMT+7 2011 เครื่อง Non-Global เวลา root@email # date Wed Nov 9 08:16:12 ICT 2011 ผมพยายามลอง date MMddhhmmYY แล้วก็ไม่สามารถเปลี่ยนได้ครับ root@email # date 1108181711 date: Not owner usage: date [-u] mmddHHMM[[cc]yy][.SS] date [-u] [+format] date -a [-]sss[.fff] Solved : สำหรับ error : Not owner สามารถแก้ไขโด้โดยเพิ่ม privileg sys_time เข้าไปใน [...]]]></description>
			<content:encoded><![CDATA[<p>เครื่อง Global เวลา</p>
<div class="codesnip-container" >bash-3.00# date<br />
Tue Nov  8 18:16:00 GMT+7 2011</div>
<p>เครื่อง Non-Global เวลา</p>
<div class="codesnip-container" >root@email # date<br />
Wed Nov  9 08:16:12 ICT 2011</div>
<p>ผมพยายามลอง date MMddhhmmYY แล้วก็ไม่สามารถเปลี่ยนได้ครับ</p>
<div class="codesnip-container" >root@email # date 1108181711<br />
date: Not owner<br />
usage:  date [-u] mmddHHMM[[cc]yy][.SS]<br />
        date [-u] [+format]<br />
        date -a [-]sss[.fff]</div>
<p><strong>Solved</strong> :<br />
สำหรับ error : Not owner สามารถแก้ไขโด้โดยเพิ่ม privileg sys_time เข้าไปใน zonecfg (sys_time ทำให้เราใช้คำสั่ง date และ ntpdate สำหรับ adjust เวลาได้)</p>
<div class="codesnip-container" >zonecfg -z myzone1<br />
zonecfg:myzone1> set limitpriv=default,sys_time<br />
zonecfg:myzone1> verify<br />
zonecfg:myzone1> commit<br />
zonecfg:myzone1> exit</div>
<p>จากนั้นแก้ไข /etc/default/init ของเครื่อง Global ให้ตรงกับใน Zone เนื่องจาก /etc/default/init สิทธิ์เป็น 555 read only เราต้องแก้สิทธิ์ให้เป็น 644 เพื่อให้แก้ไขได้ชั่วคราว</p>
<div class="codesnip-container" >chmod 644 /etc/default/init<br />
vi /etc/default/init</div>
<p>ตัวอย่างของผมใน Global set ไว้เป็น GMT+7 แต่ใน Non-global set ไว้เป็น Asia/Bangkok ก็เปลี่ยนจาก GMT เป็น Bangkok</p>
<div class="codesnip-container" >#TZ=&#8221;&#60;GMT+7&#62;+7&#8243;<br />
TZ=Asia/Bangkok</div>
<p>บันทึกและแก้สิทธิ์เป็น 555 ตามเดิมเพื่อความปลอดภัย</p>
<div class="codesnip-container" >chmod 555 /etc/default/init</div>
<p>reboot สักรอบครับทั้งใน zone และ global </p>
<p>เสร็จครับ</p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2011/11/10/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2%e0%b9%80%e0%b8%a7%e0%b8%a5%e0%b8%b2%e0%b9%83%e0%b8%99-solaris-container-non-global-%e0%b9%84%e0%b8%a1%e0%b9%88%e0%b8%95.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Server x86_64 error : bash: ./xxxxx: No such file or directory</title>
		<link>http://imrgill.com/2011/10/11/how-to-fix-ubuntu-server-x86_64-error-bash-dot-slash-xxx-no-such-file-or-directory.html</link>
		<comments>http://imrgill.com/2011/10/11/how-to-fix-ubuntu-server-x86_64-error-bash-dot-slash-xxx-no-such-file-or-directory.html#comments</comments>
		<pubDate>Tue, 11 Oct 2011 09:38:13 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Daily tips]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[ia32-libs]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=656</guid>
		<description><![CDATA[วันนี้ remote ไปแก้ปัญหาบน server ของเพื่อนมาครับ คือ เขาจะรัน shoutcast บน ubuntu 10.04 เขาก็โหลด shoutcast มาแล้วแตก tar.gz ออกมาให้เรียบร้อยแล้ว แต่รัน ./sc_serv ไม่ได้มันจะ error bash: ./sc_serv: No such file or directory ตลอดเวลาเลยทั้งๆ ที่มีไฟล์ sc_serv อยู่ในเครื่อง ครั่นว่าจะลืม chmod ก็ลอง chmode +x sc_serv ก็ทำแล้ว แต่ก็ยัง error เห็นดังนั้นก็เอะใจว่าต้องมีอะไรผิดปกติแน่นอนเลยเอา error ไป search ใน google ดู ก็ไปเจอในกระทู้ต่างประเทศ ซึ่งบอกว่า Ubuntu เป็นตัว 64bit แต่ไม่ได้ติดตั้ง packages สำหรับรันโปรแกรม [...]]]></description>
			<content:encoded><![CDATA[<p>วันนี้ remote ไปแก้ปัญหาบน server ของเพื่อนมาครับ คือ เขาจะรัน shoutcast บน ubuntu 10.04 เขาก็โหลด shoutcast มาแล้วแตก tar.gz ออกมาให้เรียบร้อยแล้ว แต่รัน ./sc_serv ไม่ได้มันจะ error </p>
<div class="codesnip-container" >bash: ./sc_serv: No such file or directory</div>
<p>ตลอดเวลาเลยทั้งๆ ที่มีไฟล์ sc_serv อยู่ในเครื่อง ครั่นว่าจะลืม chmod ก็ลอง chmode +x sc_serv ก็ทำแล้ว แต่ก็ยัง error เห็นดังนั้นก็เอะใจว่าต้องมีอะไรผิดปกติแน่นอนเลยเอา error ไป search ใน google ดู ก็ไปเจอในกระทู้ต่างประเทศ ซึ่งบอกว่า Ubuntu เป็นตัว 64bit แต่ไม่ได้ติดตั้ง packages สำหรับรันโปรแกรม 32bit ไว้จึงทำให้เกิด error ดังกล่าว วิธีแก้ไขปัญหานี้ไม่ยากครับแค่ใช้คำสั่ง</p>
<pre>
<div class="codesnip-container" >sudo apt-get install ia32-libs</div>
</pre>
<p>แล้วก็ลองไปสั่งรัน ./sc_serv ก็รันผ่านฉลุยครับ</p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2011/10/11/how-to-fix-ubuntu-server-x86_64-error-bash-dot-slash-xxx-no-such-file-or-directory.html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>แก้ปัญหา VirtualBox เรียกใช้งานอุปกรณ์ USB ไม่ได้บน Ubuntu</title>
		<link>http://imrgill.com/2009/11/11/how-to-fix-usb-device-problem-for-virtualbox-on-ubuntu.html</link>
		<comments>http://imrgill.com/2009/11/11/how-to-fix-usb-device-problem-for-virtualbox-on-ubuntu.html#comments</comments>
		<pubDate>Tue, 10 Nov 2009 17:47:56 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[device]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=350</guid>
		<description><![CDATA[ผมเคยเจอปัญหา VirtualBox เรียกใช้งานอุปกรณ์ USB ไม่ได้ตั้งแต่สมัย Version แรกๆ ตอนนั้นเลยไม่ประทับใจมันเท่าไหร่ และไม่คิดจะแก้ปัญหามันด้วย ตอนที่ผมเพิ่งลง Ubuntu 9.10 ใหม่ๆ ก็ลองติดตั้ง Virtualbox แล้วลง Windows XP ปรากฏว่ามันมองเห็น Flash Drive ที่ผมเสียบเข้าไป จนมาวันนี้ผมเพิ่งสังเกตว่ามันใช้งาน USB ไม่ได้อีกแล้ว ก็เลยลองหาคำตอบจากเน็ตก็ได้คำตอบว่าต้องเพิ่มชื่อ User ของเราให้อยู่ Group เดียวกับ vboxusers โดยสามารถเข้าไปแก้ไขไฟล์ /etc/group ได้โดยตรง mrgill@mrgill-laptop:~$ sudo nano /etc/group เพิ่มชื่อ user ของคุณหลัง group vboxusers vboxusers:x:123:mrgill หรือจะใช้คำสั่งด้านล้างก็ได้ mrgill@mrgill-laptop:~$ sudo usermod -G vboxusers -a `whoami` ตัวอย่างผมใส่ `whoami` แทน [...]]]></description>
			<content:encoded><![CDATA[<p>ผมเคยเจอปัญหา VirtualBox เรียกใช้งานอุปกรณ์ USB ไม่ได้ตั้งแต่สมัย Version แรกๆ ตอนนั้นเลยไม่ประทับใจมันเท่าไหร่ และไม่คิดจะแก้ปัญหามันด้วย ตอนที่ผมเพิ่งลง Ubuntu 9.10 ใหม่ๆ ก็ลองติดตั้ง Virtualbox แล้วลง Windows XP ปรากฏว่ามันมองเห็น Flash Drive ที่ผมเสียบเข้าไป จนมาวันนี้ผมเพิ่งสังเกตว่ามันใช้งาน USB ไม่ได้อีกแล้ว ก็เลยลองหาคำตอบจากเน็ตก็ได้คำตอบว่าต้องเพิ่มชื่อ User ของเราให้อยู่ Group เดียวกับ vboxusers โดยสามารถเข้าไปแก้ไขไฟล์ /etc/group ได้โดยตรง</p>
<pre>
<div class="codesnip-container" >mrgill@mrgill-laptop:~$ sudo nano /etc/group</div>
</pre>
<p>เพิ่มชื่อ user ของคุณหลัง group vboxusers</p>
<pre>
<div class="codesnip-container" >vboxusers:x:123:mrgill</div>
</pre>
<p>หรือจะใช้คำสั่งด้านล้างก็ได้</p>
<pre>
<div class="codesnip-container" >mrgill@mrgill-laptop:~$ sudo usermod -G vboxusers -a `whoami`</div>
</pre>
<p>ตัวอย่างผมใส่ `whoami` แทน User mrgill แต่ถ้าใครจะใส่ชื่อ user ไปตรงๆ ก็ได้ครับ</p>
<p>จากนั้น Logout แล้ว Login ใหม่ อุปกรณ์ USB ก็จะพร้อมให้งานแล้วครับ<span id="more-350"></span></p>
<p>ภาพตัวอย่างก่อนเพิ่ม mrgill ใน group vboxusers</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/imrgill/4092513529/sizes/o/" target="_blank"><img class=" aligncenter" title="ก่อนเพิ่ม user ใน group vboxusers" src="http://farm3.static.flickr.com/2762/4092513529_997d70b8db_o.png" alt="" width="503" height="426" /></a></p>
<p style="text-align: center;">
<p>จะเห็นว่าตรงอุปกรณ์ USB จะทึบไม่สามารถเรียกใช้งานได้</p>
<p>หลังเพิ่ม mrgill ใน group vboxusers</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/imrgill/4092513533/sizes/o/" target="_blank"><img class=" aligncenter" title="หลังเพิ่ม user ใน group vboxusers" src="http://farm3.static.flickr.com/2669/4092513533_a13b155f86_o.png" alt="" width="503" height="426" /></a></p>
<p style="text-align: center;">
<p>สามารถเรียกใช้งานอุปกรณ์ USB ได้แล้ว<br />
Enjoy with VirtualBox : )</p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2009/11/11/how-to-fix-usb-device-problem-for-virtualbox-on-ubuntu.html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>จะเอา /var/lib/mysql บน Ubuntu ไปไว้ที่อื่นทำอย่างไร</title>
		<link>http://imrgill.com/2009/11/09/how-to-move-mysql-data-folder-to-another-path.html</link>
		<comments>http://imrgill.com/2009/11/09/how-to-move-mysql-data-folder-to-another-path.html#comments</comments>
		<pubDate>Mon, 09 Nov 2009 07:57:58 +0000</pubDate>
		<dc:creator>mrgill</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://imrgill.com/?p=332</guid>
		<description><![CDATA[ต้องการเอา /var/lib/mysql ไปไว้ที่อื่นครับเพราะกลัวเวลาเครื่องมีปัญหาอาจทำให้ข้อมูลหายได้เพราะ /var/lib/mysql อยู่ใน / เลย(ไม่ได้แบ่ง partition แยกออกมา) วิธีแรกที่ผมทำเลยคือ root@ubuntu:~# mv /var/lib/mysql /data/mysql root@ubuntu:~# ln -s /data/mysql /var/lib/mysql ก็คือ move จาก /var/lib/mysql ไปไว้ที่ /data/mysql ผลคือตอน restart mysql มันจะฟ้องว่า root@ubuntu:~# /etc/init.d/mysql restart * Stopping MySQL database server mysqld [ OK ] * Starting MySQL database server mysqld [fail] ไปใน /var/log/syslog ก็เจอ error ประมาณนี้ แล้วจะทำไงดี root@ubuntu:~# [...]]]></description>
			<content:encoded><![CDATA[<p>ต้องการเอา /var/lib/mysql ไปไว้ที่อื่นครับเพราะกลัวเวลาเครื่องมีปัญหาอาจทำให้ข้อมูลหายได้เพราะ /var/lib/mysql อยู่ใน / เลย(ไม่ได้แบ่ง partition แยกออกมา) วิธีแรกที่ผมทำเลยคือ</p>
<pre>
<div class="codesnip-container" >root@ubuntu:~# mv /var/lib/mysql /data/mysql
root@ubuntu:~# ln -s /data/mysql /var/lib/mysql</div>
</pre>
<p>ก็คือ move จาก /var/lib/mysql ไปไว้ที่ /data/mysql ผลคือตอน restart mysql มันจะฟ้องว่า</p>
<pre>
<div class="codesnip-container" >root@ubuntu:~# /etc/init.d/mysql restart
* Stopping MySQL database server mysqld                                 [ OK ]
* Starting MySQL database server mysqld                                 [fail]</div>
</pre>
<p>ไปใน /var/log/syslog ก็เจอ error ประมาณนี้ แล้วจะทำไงดี</p>
<pre>
<div class="codesnip-container" >root@ubuntu:~# tail -f /var/log/syslog
Nov  9 02:36:29 ubuntu kernel: [ 2394.732730] type=1503 audit(1257752189.048:131): operation="open" pid=5484 parent=5483 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov  9 02:36:30 ubuntu kernel: [ 2395.745479] type=1503 audit(1257752190.061:132): operation="open" pid=5494 parent=5493 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov  9 02:36:31 ubuntu kernel: [ 2396.761345] type=1503 audit(1257752191.080:133): operation="open" pid=5504 parent=5503 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov  9 02:36:31 ubuntu kernel: [ 2396.774493] type=1503 audit(1257752191.092:134): operation="open" pid=5513 parent=5512 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Nov  9 02:36:31 ubuntu /etc/init.d/mysql[5520]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Nov  9 02:36:31 ubuntu /etc/init.d/mysql[5520]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
Nov  9 02:36:31 ubuntu /etc/init.d/mysql[5520]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Nov  9 02:36:31 ubuntu /etc/init.d/mysql[5520]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!</div>
</pre>
<p><span id="more-332"></span><br />
ผมไปเจอคำตอบที่นี่ครับ<br />
<a href="http://forums.mysql.com/read.php?24,211657,225700#msg-225700">http://forums.mysql.com/read.php?24,211657,225700#msg-225700</a><br />
เขาบอกว่าให้เข้าไปแก้ไฟล์ /etc/apparmor.d/usr.sbin.mysqld ผมก็จัดไป</p>
<pre>
<div class="codesnip-container" >root@ubuntu:~# /etc/apparmor.d/usr.sbin.mysqld</div>
</pre>
<p>โดยเปลี่ยนจาก</p>
<pre>
<div class="codesnip-container" ># vim:syntax=apparmor
# Last Modified: Tue Jun 19 17:37:30 2007
#include 

/usr/sbin/mysqld {
  #include
  #include
  #include
  #include
  #include 

  capability dac_override,
  capability sys_resource,
  capability setgid,
  capability setuid,

  network tcp,

  /etc/hosts.allow r,
  /etc/hosts.deny r,

  /etc/mysql/*.pem r,
  /etc/mysql/conf.d/ r,
  /etc/mysql/conf.d/* r,
  /etc/mysql/my.cnf r,
  /usr/sbin/mysqld mr,
  /usr/share/mysql/** r,
  /var/log/mysql.log rw,
  /var/log/mysql.err rw,
<span style="color: #ff0000;">  /var/lib/mysql/ r,
  /var/lib/mysql/** rwk,</span>
  /var/log/mysql/ r,
  /var/log/mysql/* rw,
  /var/run/mysqld/mysqld.pid w,
  /var/run/mysqld/mysqld.sock w,
}</div>
</pre>
<p>ให้เปลี่ยนเป็น</p>
<pre>
<div class="codesnip-container" ># vim:syntax=apparmor
# Last Modified: Tue Jun 19 17:37:30 2007
#include 

/usr/sbin/mysqld {
  #include
  #include
  #include
  #include
  #include 

  capability dac_override,
  capability sys_resource,
  capability setgid,
  capability setuid,

  network tcp,

  /etc/hosts.allow r,
  /etc/hosts.deny r,

  /etc/mysql/*.pem r,
  /etc/mysql/conf.d/ r,
  /etc/mysql/conf.d/* r,
  /etc/mysql/my.cnf r,
  /usr/sbin/mysqld mr,
  /usr/share/mysql/** r,
  /var/log/mysql.log rw,
  /var/log/mysql.err rw,
<span style="color: #ff0000;">  /data/mysql/ r,
  /data/mysql/** rwk,</span>
  /var/log/mysql/ r,
  /var/log/mysql/* rw,
  /var/run/mysqld/mysqld.pid w,
  /var/run/mysqld/mysqld.sock w,
}</div>
</pre>
<p>แต่อย่าเพิ่งลบ Symbolic Link นะครับยังจำเป็นต้องใช้<br />
จากนั้นก็สั่ง Restart Apparmor โดย</p>
<pre>
<div class="codesnip-container" >root@ubuntu:~# /etc/init.d/apparmor restart</div>
</pre>
<p>จากนั้นลองสั่ง Restart Mysql อีกครั้ง</p>
<pre>
<div class="codesnip-container" >root@ubuntu:~# /etc/init.d/mysql restart
 * Stopping MySQL database server mysqld                                [ OK ]
 * Starting MySQL database server mysqld                                [ OK ]
 * Checking for corrupt, not cleanly closed and upgrade needing tables.</div>
</pre>
<p>ก็คงจบแต่เพียงเท่านี้</p>
]]></content:encoded>
			<wfw:commentRss>http://imrgill.com/2009/11/09/how-to-move-mysql-data-folder-to-another-path.html/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

