<?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>Smilesquare &#187; Smilesquare SetUP</title>
	<atom:link href="http://www.smilesquare.com/category/smilesquare-setup/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.smilesquare.com</link>
	<description>New Generation</description>
	<lastBuildDate>Wed, 20 Jul 2011 12:58:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>แก้ปัญหา apache ไม่ start เมื่อ add domain เยอะๆ</title>
		<link>http://www.smilesquare.com/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-apache-%e0%b9%84%e0%b8%a1%e0%b9%88-start-%e0%b9%80%e0%b8%a1%e0%b8%b7%e0%b9%88%e0%b8%ad-add-domain-%e0%b9%80%e0%b8%a2%e0%b8%ad/</link>
		<comments>http://www.smilesquare.com/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-apache-%e0%b9%84%e0%b8%a1%e0%b9%88-start-%e0%b9%80%e0%b8%a1%e0%b8%b7%e0%b9%88%e0%b8%ad-add-domain-%e0%b9%80%e0%b8%a2%e0%b8%ad/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 09:06:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Smilesquare SetUP]]></category>

		<guid isPermaLink="false">http://www.smilesquare.com/?p=39</guid>
		<description><![CDATA[เมื่อมีการ add domain เยอะ process ของ httpd ทุกตัวจะมีการเปิดไฟล์จำนวนมาก สมมติ 1 httpd เปิดไฟล์ 2000 ไฟล์ ถ้ามี httpd 20 ตัวทำงานอยู่ ก็เท่ากับว่าจะมีการเปิดไฟล์ถึง 4หมื่นไฟล์เลยทีเดียว ซึ่ง centos จะมีการ limit จำนวน file open descriptor อยู่
คำสั่งในการตรวจสอบ maximum file open ของทั้งระบบ
cat /proc/sys/fs/file-max
คำสั่งตรวจสอบ max file open สำหรับ user
ulimit -n
เพิ่มจำนวน max file open สำหรับ user ให้เป็น 500000
ulimit -n 500000
แต่ค่าที่ set ด้วยคำสั่ง ulimit -n ในข้างต้น จะถูก [...]]]></description>
			<content:encoded><![CDATA[<p>เมื่อมีการ add domain เยอะ process ของ httpd ทุกตัวจะมีการเปิดไฟล์จำนวนมาก สมมติ 1 httpd เปิดไฟล์ 2000 ไฟล์ ถ้ามี httpd 20 ตัวทำงานอยู่ ก็เท่ากับว่าจะมีการเปิดไฟล์ถึง 4หมื่นไฟล์เลยทีเดียว ซึ่ง centos จะมีการ limit จำนวน file open descriptor อยู่</p>
<p>คำสั่งในการตรวจสอบ maximum file open ของทั้งระบบ</p>
<p><code>cat /proc/sys/fs/file-max</code></p>
<p>คำสั่งตรวจสอบ max file open สำหรับ user</p>
<p><code>ulimit -n</code></p>
<p>เพิ่มจำนวน max file open สำหรับ user ให้เป็น 500000</p>
<p><code>ulimit -n 500000</code></p>
<p>แต่ค่าที่ set ด้วยคำสั่ง ulimit -n ในข้างต้น จะถูก reset กลับไปเป็น default เมื่อเรา reboot ดังนั้นวิธีที่ทำให้ apache ทำงานได้ เราจะต้อง set ulimit -n ก่อนโหลด apache สามารถทำได้ง่ายๆด้วยคำสั่ง</p>
<p><code>nano /etc/init.d/httpd</code></p>
<p>แล้วเพิ่ม <code>ulimit -n 500000</code> เข้าไป บรรทัดบนสุด แล้ว save ลอง reboot ดูว่า apache โหลดตอน boot หรือไม่</p>
<p>เท่านี้ก็แก้ปัญหา apache ไม่ start เมื่อ add domain เยอะๆ ได้แล้ว<br />
ปล. ถ้า apache ไม่ start อีก ลองเปลี่ยน 500000 เป็นค่าอื่นที่สูงกว่าดู</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smilesquare.com/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-apache-%e0%b9%84%e0%b8%a1%e0%b9%88-start-%e0%b9%80%e0%b8%a1%e0%b8%b7%e0%b9%88%e0%b8%ad-add-domain-%e0%b9%80%e0%b8%a2%e0%b8%ad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Font Lao to Thai</title>
		<link>http://www.smilesquare.com/font-lao-to-thai/</link>
		<comments>http://www.smilesquare.com/font-lao-to-thai/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 16:25:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Smilesquare SetUP]]></category>

		<guid isPermaLink="false">http://www.smilesquare.com/?p=14</guid>
		<description><![CDATA[หลังจากที่ server โดน hack ข้อมูลหายเกลี้ยง แต่ก็ยังมีเพื่อนๆ เข้ามาหา download ฟ้อนต์ เอาไว้อ่านภาษาลาวกันอยู่ ผมจึง ลื้อเครื่องคอม เพื่อหาฟอนต์ ที่เคย save เก็บไว้ และ up ให้เพื่อนๆใหม่
ดูรูปตัวอย่างด้านล่างครับ  ส่วนบนจะเป็นรูป ที่ capture มาจากฟอนท์ลาวจริงๆ ส่วนล่างที่ออกเป็นฟอนต์ไทยไทย ก็เป็นฟอนท์ที่ผมทำขึ้นเองโดยแปลงอักษรภาษาลาว ให้ดูเป็นภาษาไทย เพื่อจะได้อ่านง่ายขึ้นครับ

Download Font
]]></description>
			<content:encoded><![CDATA[<p>หลังจากที่ server โดน hack ข้อมูลหายเกลี้ยง แต่ก็ยังมีเพื่อนๆ เข้ามาหา download ฟ้อนต์ เอาไว้อ่านภาษาลาวกันอยู่ ผมจึง ลื้อเครื่องคอม เพื่อหาฟอนต์ ที่เคย save เก็บไว้ และ up ให้เพื่อนๆใหม่</p>
<p>ดูรูปตัวอย่างด้านล่างครับ  ส่วนบนจะเป็นรูป ที่ capture มาจากฟอนท์ลาวจริงๆ ส่วนล่างที่ออกเป็นฟอนต์ไทยไทย ก็เป็นฟอนท์ที่ผมทำขึ้นเองโดยแปลงอักษรภาษาลาว ให้ดูเป็นภาษาไทย เพื่อจะได้อ่านง่ายขึ้นครับ</p>
<p><img class="alignnone" title="Font Lao to Thai" src="http://www.smilesquare.com/i/lao-to-thai.gif" alt="" width="440" height="300" /></p>
<p><a title="font thai to lao" href="http://www.smilesquare.com/download/SmileSquare LT.ttf">Download Font</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.smilesquare.com/font-lao-to-thai/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>แก้ปัญหา wordpress mu activate plugin error</title>
		<link>http://www.smilesquare.com/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-wordpress-mu-activate-plugin-error/</link>
		<comments>http://www.smilesquare.com/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-wordpress-mu-activate-plugin-error/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 08:12:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Smilesquare SetUP]]></category>

		<guid isPermaLink="false">http://www.smilesquare.com/?p=12</guid>
		<description><![CDATA[วันนี้ download wpmu 2.81 มาใช้ ปรากฎว่า เจอปัญหาครับ เมื่อผมต้องการจะ activate plugin ก็ได้รับ error ตัวนี้

Fatal error:  Call to undefined function wp_get_current_user() in /var/www/mymu.com/wp-includes/capabilities.php on line 920
แต่เมื่อเข้า refresh หน้า plugin ใหม่ ปรากฎว่า plugin ตัวนั้นก็ได้ activate ไปแล้ว ตอนแรก error แต่ตอนนี้ดูเหมือนกับไม่มีปัญหา แต่ดูอีกที ตัว plugin เหมือนกับเอ๋อเอ๋อ  ไม่ได้ทำงานตามที่เราต้องการ ลอง deactivate แล้ว activate ใหม่ ก็ขึ้น error เหมือนเดิม ก็ต้องหาวิธีแก้ไขกันครับ วิธีแก้ไขไม่ได้ยากอะไร แต่จะยากตรงตอนหาวิธีแก้ไขนี่แหล่ะครับ search google [...]]]></description>
			<content:encoded><![CDATA[<p>วันนี้ download wpmu 2.81 มาใช้ ปรากฎว่า เจอปัญหาครับ เมื่อผมต้องการจะ activate plugin ก็ได้รับ error ตัวนี้</p>
<blockquote><p>
<strong>Fatal error</strong>:  Call to undefined function wp_get_current_user() in <strong>/var/www/mymu.com/wp-includes/capabilities.php</strong> on line <strong>920</strong></p></blockquote>
<p>แต่เมื่อเข้า refresh หน้า plugin ใหม่ ปรากฎว่า plugin ตัวนั้นก็ได้ activate ไปแล้ว ตอนแรก error แต่ตอนนี้ดูเหมือนกับไม่มีปัญหา แต่ดูอีกที ตัว plugin เหมือนกับเอ๋อเอ๋อ  ไม่ได้ทำงานตามที่เราต้องการ ลอง deactivate แล้ว activate ใหม่ ก็ขึ้น error เหมือนเดิม ก็ต้องหาวิธีแก้ไขกันครับ วิธีแก้ไขไม่ได้ยากอะไร แต่จะยากตรงตอนหาวิธีแก้ไขนี่แหล่ะครับ search google ก็แล้ว ทำโน่น ลองนี่แล้ว ในที่สุด มาแก้ที่โค้ดดีกว่าครับ เราก็เปิดไฟล์</p>
<p><strong>/var/www/mymu.com/wp-includes/capabilities.php</strong></p>
<p>ให้เพิ่มบรรทัดที่สอง</p>
<blockquote><p>include_once(&#8217;pluggable.php&#8217;);</p></blockquote>
<p>4 บรรทัดแรกของไฟล์ capabilities.php เราจะได้ประมาณนี้</p>
<blockquote><p>&lt;?php<br />
include_once(&#8217;pluggable.php&#8217;);<br />
/**<br />
* WordPress Roles and Capabilities.</p></blockquote>
<p>ทีนี้ก็ save แล้วกลับไป activate plugin ใหม่ &#8230; ในที่สุด plugin ก็ใช้ได้ปกติ &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smilesquare.com/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-wordpress-mu-activate-plugin-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Backup และ Restore database</title>
		<link>http://www.smilesquare.com/backup-%e0%b9%81%e0%b8%a5%e0%b8%b0-restore-database/</link>
		<comments>http://www.smilesquare.com/backup-%e0%b9%81%e0%b8%a5%e0%b8%b0-restore-database/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 06:08:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Smilesquare SetUP]]></category>

		<guid isPermaLink="false">http://www.smilesquare.com/?p=9</guid>
		<description><![CDATA[วิธี backup database
วิธีการจัดการกับ database สามารถทำได้รวดเร็วผ่าน shell โดยไม่ต้องใช้ phpmyadmin
วิธี backup ให้ใช้คำสั่งตามนี้ครับ
mysqldump --user=[username] --password=[password] [databasename] > [dump file]
โดย &#8211;user=[username] ก็ใช้ใส่ username ของ database ครับ หรือ password ก็ให้ใส่ password ครับ
ดูตัวอย่างครับ สมมติ database user คือ hello และ password คือ world และมี database ชื่อ mydb และให้ backup ใส่ file mybackup.sql เราจะพิมพ์คำสั่งดังนี้
mysqldump --user=hello --password=world mydb > mybackup.sql
ทีนี้มาดูวิธี restore ไฟล์ backup กลับลง [...]]]></description>
			<content:encoded><![CDATA[<p><strong>วิธี backup database</strong></p>
<p>วิธีการจัดการกับ database สามารถทำได้รวดเร็วผ่าน shell โดยไม่ต้องใช้ phpmyadmin</p>
<p>วิธี backup ให้ใช้คำสั่งตามนี้ครับ</p>
<p><code>mysqldump --user=[username] --password=[password] [databasename] > [dump file]</code></p>
<p>โดย &#8211;user=[username] ก็ใช้ใส่ username ของ database ครับ หรือ password ก็ให้ใส่ password ครับ</p>
<p>ดูตัวอย่างครับ สมมติ database user คือ hello และ password คือ world และมี database ชื่อ mydb และให้ backup ใส่ file mybackup.sql เราจะพิมพ์คำสั่งดังนี้</p>
<p><code>mysqldump --user=hello --password=world mydb > mybackup.sql</code></p>
<p><strong>ทีนี้มาดูวิธี restore ไฟล์ backup กลับลง db ครับ</strong></p>
<p><code>mysql --user=[username] --password=[password] [databasename] < [dumpfile]</code></p>
<p>ซึ่งจากตัวอย่างข้างบน จะได้คำสั่งดังนี้</p>
<p><code>mysql --user=hello --password=world mydb < mybackup.sql</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.smilesquare.com/backup-%e0%b9%81%e0%b8%a5%e0%b8%b0-restore-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

