<?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>MEMOBALL.info</title>
	<atom:link href="http://www.memoball.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.memoball.info</link>
	<description>All of my Memories</description>
	<lastBuildDate>Mon, 22 Feb 2010 02:13:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>70 web application ที่น่าสนใจ</title>
		<link>http://www.memoball.info/02/70-web-application-%e0%b8%97%e0%b8%b5%e0%b9%88%e0%b8%99%e0%b9%88%e0%b8%b2%e0%b8%aa%e0%b8%99%e0%b9%83%e0%b8%88/</link>
		<comments>http://www.memoball.info/02/70-web-application-%e0%b8%97%e0%b8%b5%e0%b9%88%e0%b8%99%e0%b9%88%e0%b8%b2%e0%b8%aa%e0%b8%99%e0%b9%83%e0%b8%88/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 02:12:03 +0000</pubDate>
		<dc:creator>spnball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=447</guid>
		<description><![CDATA[This is protected content. Please Login or Register for access.
]]></description>
			<content:encoded><![CDATA[<br/><div id="wp-private-box"><b>This is protected content. Please <a href="http://www.memoball.info/wp-login.php">Login</a> or <a href="http://www.memoball.info/wp-register.php">Register</a> for access.</b></div><br/><!--/protected--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/02/70-web-application-%e0%b8%97%e0%b8%b5%e0%b9%88%e0%b8%99%e0%b9%88%e0%b8%b2%e0%b8%aa%e0%b8%99%e0%b9%83%e0%b8%88/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thinkpad mouse x200si trackpoint</title>
		<link>http://www.memoball.info/02/thinkpad-mouse-x200si-trackpoint/</link>
		<comments>http://www.memoball.info/02/thinkpad-mouse-x200si-trackpoint/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 07:48:17 +0000</pubDate>
		<dc:creator>spnball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=444</guid>
		<description><![CDATA[setup การใช้ thinkpad ครับ http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint

This is protected content. Please Login or Register for access.
]]></description>
			<content:encoded><![CDATA[<p>setup การใช้ thinkpad ครับ <a href="http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint">http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint</a><br />
<span id="more-444"></span><br />
<br/><div id="wp-private-box"><b>This is protected content. Please <a href="http://www.memoball.info/wp-login.php">Login</a> or <a href="http://www.memoball.info/wp-register.php">Register</a> for access.</b></div><br/><!--/protected--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/02/thinkpad-mouse-x200si-trackpoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java-script ใน css</title>
		<link>http://www.memoball.info/02/java-script-%e0%b9%83%e0%b8%99-css/</link>
		<comments>http://www.memoball.info/02/java-script-%e0%b9%83%e0%b8%99-css/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 12:40:58 +0000</pubDate>
		<dc:creator>spnball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=442</guid>
		<description><![CDATA[ท่านสามารถใส java-script ไว้สำหรับทำการแก้ bug ของ ie6 ซึ่งไม่สามารถแสดงผลได้อย่างถูกต้อง โดยการใส่ expression ดังตั่วอย่าง

#container{
	width: expression(document.body.clientWidth &#62; 1100)? "1100px" : "auto";
	/* For web browsers supporting it */
	max-width: 1100px;
}

]]></description>
			<content:encoded><![CDATA[<p>ท่านสามารถใส java-script ไว้สำหรับทำการแก้ bug ของ ie6 ซึ่งไม่สามารถแสดงผลได้อย่างถูกต้อง โดยการใส่ expression ดังตั่วอย่าง</p>
<pre>
#container{
	width: expression(document.body.clientWidth &gt; 1100)? "1100px" : "auto";
	/* For web browsers supporting it */
	max-width: 1100px;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/02/java-script-%e0%b9%83%e0%b8%99-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ThinkFinger</title>
		<link>http://www.memoball.info/02/thinkfinger/</link>
		<comments>http://www.memoball.info/02/thinkfinger/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 13:56:31 +0000</pubDate>
		<dc:creator>spnball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=438</guid>
		<description><![CDATA[Thinkpad Finger-print for Ubuntu
เพิ่งได้ thinkpad X200si มาใช้ครับ ก็เลยหาวิธีลง Finger-print สำหรับ Ubuntu ครับ
จึงเอา link มาฝากกันครับ https://wiki.ubuntu.com/ThinkFinger

This is protected content. Please Login or Register for access.
(ขอเก็บเนื้อหาไว้สำหรับใช้ส่วนตัว ตามลิขสิทธิ์ครับ) กด link เพื่อไปดูได้เลยครับ
]]></description>
			<content:encoded><![CDATA[<h2>Thinkpad Finger-print for Ubuntu</h2>
<p>เพิ่งได้ thinkpad X200si มาใช้ครับ ก็เลยหาวิธีลง Finger-print สำหรับ Ubuntu ครับ<br />
จึงเอา link มาฝากกันครับ <a href="https://wiki.ubuntu.com/ThinkFinger">https://wiki.ubuntu.com/ThinkFinger</a><br />
<span id="more-438"></span><br />
<br/><div id="wp-private-box"><b>This is protected content. Please <a href="http://www.memoball.info/wp-login.php">Login</a> or <a href="http://www.memoball.info/wp-register.php">Register</a> for access.</b></div><br/><!--/protected--><br />
(ขอเก็บเนื้อหาไว้สำหรับใช้ส่วนตัว ตามลิขสิทธิ์ครับ) กด link เพื่อไปดูได้เลยครับ</p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/02/thinkfinger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>วาดภาพบน HTML5</title>
		<link>http://www.memoball.info/02/%e0%b8%a7%e0%b8%b2%e0%b8%94%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%9a%e0%b8%99-html5/</link>
		<comments>http://www.memoball.info/02/%e0%b8%a7%e0%b8%b2%e0%b8%94%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%9a%e0%b8%99-html5/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 00:09:25 +0000</pubDate>
		<dc:creator>spnball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=436</guid>
		<description><![CDATA[ถ้าคุณอยากมีโปรแกรมวาดภาพซักตัวบนเวป โดยที่คุณไม่ต้องใช้ flash คุณสามารถลองใช้ http://mugtug.com/sketchpad/ ตัวนี้ได้เลยครับ
]]></description>
			<content:encoded><![CDATA[<p>ถ้าคุณอยากมีโปรแกรมวาดภาพซักตัวบนเวป โดยที่คุณไม่ต้องใช้ flash คุณสามารถลองใช้<a href="http://mugtug.com/sketchpad/"> http://mugtug.com/sketchpad/</a> ตัวนี้ได้เลยครับ</p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/02/%e0%b8%a7%e0%b8%b2%e0%b8%94%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%9a%e0%b8%99-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>รูปในเวปผมหายไปไหน</title>
		<link>http://www.memoball.info/02/%e0%b8%a3%e0%b8%b9%e0%b8%9b%e0%b9%83%e0%b8%99%e0%b9%80%e0%b8%a7%e0%b8%9b%e0%b8%9c%e0%b8%a1%e0%b8%ab%e0%b8%b2%e0%b8%a2%e0%b9%84%e0%b8%9b%e0%b9%84%e0%b8%ab%e0%b8%99/</link>
		<comments>http://www.memoball.info/02/%e0%b8%a3%e0%b8%b9%e0%b8%9b%e0%b9%83%e0%b8%99%e0%b9%80%e0%b8%a7%e0%b8%9b%e0%b8%9c%e0%b8%a1%e0%b8%ab%e0%b8%b2%e0%b8%a2%e0%b9%84%e0%b8%9b%e0%b9%84%e0%b8%ab%e0%b8%99/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 00:33:59 +0000</pubDate>
		<dc:creator>spnball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=432</guid>
		<description><![CDATA[เมื่อหลายวันก่อนผมทำการแก้ไขเวปเซอร์วิช ซึ่งเป็น web-apllication ตัวหนึ่งที่ผมดูและอยู่ ปรากฏว่ารูปที่เป็นส่วนประกอบของผมหายไปอย่างลึกลับเมื่อผู้ใช้งานทั่วไปเข้าไปใช้ ซึ่งในเบื้องต้น ผมใช้ ubuntu+firefox ไม่เกิดข้อผิดพลาดใดๆ ในกรณีดังกล่าว จะเป็นเฉพาะ HTTP over SSL (HTTPS) 
สาเหตุ
สาเหตุก็เป็นเพราะว่า รูปผมมันเป็น http แต่เวปมันเป็น https บราวเซอร์จะไม่ยอมโหลดรูปให้ ปัญหาดังกล่าวจะเป็นเกือบทุกบราวเซอร์ โดยบางเครื่องอาจมีการถามก่อนว่าจะโหลดหรือไม่ ตามแต่ผู้ใช้งานจะเป็นผู้ตั้งไว้ แต่จุดที่สังเกตได้ง่ายๆ คือด้านมุมขวาล่าง จะมีรูปแม่กุญแจอยู่ ถ้าเป็นกรณีนี่มีการโหลด http บนเวป https จะมีรูปเครื่องหมายตกใจสีแดงปรากฎอยู่บนรูปแม่กุญแจนั้น
วิธีแก้ไข
วิธีแก้ไขที่ดีที่สุดน่าจะอยู่ที่ตัวผู้เขียนเวปเอง โดยทำการกำหนด link ต่างๆ ในหน้าเวปของเราให้เป็น https ซะ
]]></description>
			<content:encoded><![CDATA[<p>เมื่อหลายวันก่อนผมทำการแก้ไขเวปเซอร์วิช ซึ่งเป็น web-apllication ตัวหนึ่งที่ผมดูและอยู่ ปรากฏว่ารูปที่เป็นส่วนประกอบของผมหายไปอย่างลึกลับเมื่อผู้ใช้งานทั่วไปเข้าไปใช้ ซึ่งในเบื้องต้น ผมใช้ ubuntu+firefox ไม่เกิดข้อผิดพลาดใดๆ ในกรณีดังกล่าว จะเป็นเฉพาะ HTTP over SSL (HTTPS) <span id="more-432"></span></p>
<h2>สาเหตุ</h2>
<p>สาเหตุก็เป็นเพราะว่า รูปผมมันเป็น http แต่เวปมันเป็น https บราวเซอร์จะไม่ยอมโหลดรูปให้ ปัญหาดังกล่าวจะเป็นเกือบทุกบราวเซอร์ โดยบางเครื่องอาจมีการถามก่อนว่าจะโหลดหรือไม่ ตามแต่ผู้ใช้งานจะเป็นผู้ตั้งไว้ แต่จุดที่สังเกตได้ง่ายๆ คือด้านมุมขวาล่าง จะมีรูปแม่กุญแจอยู่ ถ้าเป็นกรณีนี่มีการโหลด http บนเวป https จะมีรูปเครื่องหมายตกใจสีแดงปรากฎอยู่บนรูปแม่กุญแจนั้น</p>
<h2>วิธีแก้ไข</h2>
<p>วิธีแก้ไขที่ดีที่สุดน่าจะอยู่ที่ตัวผู้เขียนเวปเอง โดยทำการกำหนด link ต่างๆ ในหน้าเวปของเราให้เป็น https ซะ</p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/02/%e0%b8%a3%e0%b8%b9%e0%b8%9b%e0%b9%83%e0%b8%99%e0%b9%80%e0%b8%a7%e0%b8%9b%e0%b8%9c%e0%b8%a1%e0%b8%ab%e0%b8%b2%e0%b8%a2%e0%b9%84%e0%b8%9b%e0%b9%84%e0%b8%ab%e0%b8%99/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Download file over SSL Error with Internet Explorer</title>
		<link>http://www.memoball.info/02/download-file-over-ssl-error-with-internet-explorer/</link>
		<comments>http://www.memoball.info/02/download-file-over-ssl-error-with-internet-explorer/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 00:20:14 +0000</pubDate>
		<dc:creator>spnball</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Application]]></category>
		<category><![CDATA[web bug]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=427</guid>
		<description><![CDATA[เมื่ออาทิตย์ก่อน ผมเจอปัญหาที่ทำอยู่ที่ทำงานครับ ซึ่งงานผมเป็น service ที่ทำงานอยู่บน SSL หรือพูดให้ฟังดูง่ายๆ คือ https นั้นเอง ปัญหาที่ผมกับผู้ใช้งานเซอร์วิชก็คือ ไม่สามารถดาวโหลดแฟ้มข้อมูลได้
ปัญหา
ไม่สามารถโหลดไฟล์ผ่าน SSL  โดยปัญหานี้พบกับเฉพาะ Internet Explorer 7 (IE7 โดย IE รุ่นอื่น ยังไม่ได้รับรายงานปัญหาดังกล่าว) ส่วนบราวเซอร์ตัวอื่นยังไม่พบปัญหาเช่นนี้ โดย error ที่พบ IE จะขึ้นมาที่ผู้ใช้ว่า &#8220;the file could not be written to the cache&#8221; ทำให้ไม่สามารถดาวโหลดไฟล์ได้
วิธีการแก้ไข
สามารถเลือกแก้ไขได้โดยวิธีใดวิธีหนึ่งดังนี้
สำหรับ server admin หรือ webmaster
ห้ามใส่ cache-control หรือ pragma: no-cache ลงใน header ของ http ในส่วนที่เป็น oct-stream หรือ file-download
สำหรับ client [...]]]></description>
			<content:encoded><![CDATA[<p>เมื่ออาทิตย์ก่อน ผมเจอปัญหาที่ทำอยู่ที่ทำงานครับ ซึ่งงานผมเป็น service ที่ทำงานอยู่บน SSL หรือพูดให้ฟังดูง่ายๆ คือ https นั้นเอง ปัญหาที่ผมกับผู้ใช้งานเซอร์วิชก็คือ ไม่สามารถดาวโหลดแฟ้มข้อมูลได้<span id="more-427"></span></p>
<h2>ปัญหา</h2>
<p>ไม่สามารถโหลดไฟล์ผ่าน SSL  โดยปัญหานี้พบกับเฉพาะ Internet Explorer 7 (IE7 โดย IE รุ่นอื่น ยังไม่ได้รับรายงานปัญหาดังกล่าว) ส่วนบราวเซอร์ตัวอื่นยังไม่พบปัญหาเช่นนี้ โดย error ที่พบ IE จะขึ้นมาที่ผู้ใช้ว่า <strong>&#8220;the file could not be written to the cache&#8221; </strong>ทำให้ไม่สามารถดาวโหลดไฟล์ได้</p>
<h2>วิธีการแก้ไข</h2>
<p>สามารถเลือกแก้ไขได้โดยวิธีใดวิธีหนึ่งดังนี้</p>
<h3>สำหรับ server admin หรือ webmaster</h3>
<p>ห้ามใส่ cache-control หรือ pragma: no-cache ลงใน header ของ http ในส่วนที่เป็น oct-stream หรือ file-download</p>
<h3>สำหรับ client (ผมยังไม่ได้ลองครับ)</h3>
<p>เข้าไป uncheck ตามลำดับดังนี้ IE Tools -&gt; Internet Options -&gt; Advanced -&gt; Security -&gt;<strong> Do not save encrypted<br />
pages to disk </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/02/download-file-over-ssl-error-with-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การเขียน makefile</title>
		<link>http://www.memoball.info/01/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%82%e0%b8%b5%e0%b8%a2%e0%b8%99-makefile/</link>
		<comments>http://www.memoball.info/01/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%82%e0%b8%b5%e0%b8%a2%e0%b8%99-makefile/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 03:56:53 +0000</pubDate>
		<dc:creator>spnball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=420</guid>
		<description><![CDATA[วันนี้ได้ทำการเขียน makefile ใหม่ให้มีประสิทธิ์ภาพมากขึ้น โดยการใช้ inference rules จึงไปค้นหาเวปมาได้เวปดีๆ คือ
http://www-cip.physik.uni-bonn.de/pool/infos/make/advanced.html 


Getting started with Makefiles: Advanced features

1. What are macros and why should I use them?
Think of programs that shall be used at different locations: CERN, DESY, SLAC, University of Bonn, &#8230; The C/C++ programs are highly portable (at least after some effort) but the names of the [...]]]></description>
			<content:encoded><![CDATA[<p>วันนี้ได้ทำการเขียน makefile ใหม่ให้มีประสิทธิ์ภาพมากขึ้น โดยการใช้ inference rules จึงไปค้นหาเวปมาได้เวปดีๆ คือ<br />
<a href="http://www-cip.physik.uni-bonn.de/pool/infos/make/advanced.html">http://www-cip.physik.uni-bonn.de/pool/infos/make/advanced.html</a> <span id="more-420"></span></p>
<h2>
<hr noshade="noshade" /></h2>
<h2><span style="font-family: Arial,Helvetica">Getting started with Makefiles: Advanced features</span></h2>
<hr noshade="noshade" />
<h2><span style="font-family: Arial,Helvetica">1. What are macros and why should I use them?</span></h2>
<p>Think of programs that shall be used at different locations: CERN, DESY, SLAC, University of Bonn, &#8230; The C/C++ programs are highly portable (at least after some effort) but the names of the programs used to compile them &#8211; as well as their arguments &#8211; may be very different. So it would be nice to once give the program name, the list of arguments, etc. and then only use symbolic names so that you can rapidly adjust to the local computing environment. Those symbolic names are called &#8220;macros&#8221;. Let&#8217;s recall<tt> <strong><a href="http://www-cip.physik.uni-bonn.de/pool/infos/make/Makefile5">Makefile5</a></strong>.</tt></p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>.IGNORE:</tt></strong><br />
<strong><tt>.SILENT:</tt></strong><strong><tt>mirror:    input.o mirror.o process.o output.o</tt></strong><br />
<strong><tt> g++ -o mirror input.o mirror.o process.o output.o</tt></strong></p>
<p><strong><tt>mirror.o:  mirror.cc</tt></strong><br />
<strong><tt> g++ -c -Wall mirror.cc</tt></strong></p>
<p><strong><tt>input.o:   input.cc</tt></strong><br />
<strong><tt> g++ -c -Wall input.cc</tt></strong></p>
<p><strong><tt>output.o:  output.cc</tt></strong><br />
<strong><tt> g++ -c -Wall output.cc</tt></strong></p>
<p><strong><tt>process.o: process.cc</tt></strong><br />
<strong><tt> g++ -c -Wall process.cc</tt></strong></p>
<p><strong><tt>clean:</tt></strong><br />
<strong><tt> rm -f *.o core</tt></strong></p>
<p><strong><tt>distclean:</tt></strong><br />
<strong><tt> make clean</tt></strong><br />
<strong><tt> rm -f mirror</tt></strong></p>
<p><strong><tt>again:</tt></strong><br />
<strong><tt> make distclean</tt></strong><br />
<strong><tt> make mirror</tt></strong></td>
</tr>
</tbody>
</table>
<p>All object files are made using <tt>g++</tt>. On other machines that may be<tt> cxx, cpp, </tt>or something the like. So let&#8217;s define a macro for the C++ compiler:</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>C++ = g++</tt></strong></td>
</tr>
</tbody>
</table>
<p>The command line options are also different for different compilers so it&#8217;s a good idea to have a macro for them:</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>C++-Flags = -c -Wall</tt></strong></td>
</tr>
</tbody>
</table>
<p>On some machines the command to remove files is<tt> rm </tt>(or<tt> rm -f), </tt>on others<tt> del, </tt>some use<tt> delete, </tt>some<tt> erase, </tt>and some even<tt> discard.</tt>So that&#8217;s another candidate for a macro:</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>RM = rm -f</tt></strong></td>
</tr>
</tbody>
</table>
<p>Even make may not always be called make (though I know of no system where this is the case):</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>MAKE = make</tt></strong></td>
</tr>
</tbody>
</table>
<p>In our example the linker is also g++. In general that need not be the case. So we define the following two macros:</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>LINKER       = g++</tt></strong><br />
<strong><tt>LINKER-FLAGS = -o</tt></strong></td>
</tr>
</tbody>
</table>
<p>The meaning of the following two macros is obvious:</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>OBJS   = input.o mirror.o process.o output.o</tt></strong><br />
<strong><tt>TARGET = mirror</tt></strong></td>
</tr>
</tbody>
</table>
<p>After these changes the present state of the Makefile is<tt> <strong><a href="http://www-cip.physik.uni-bonn.de/pool/infos/make/Makefile6">Makefile6</a></strong>:</tt></p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>C++          = g++</tt></strong><br />
<strong><tt>C++-FLAGS    = -c -Wall</tt></strong><br />
<strong><tt>LINKER       = g++</tt></strong><br />
<strong><tt>LINKER-FLAGS = -o</tt></strong><br />
<strong><tt>RM           = rm -f</tt></strong><br />
<strong><tt>MAKE         = make</tt></strong><br />
<strong><tt>OBJS         = input.o mirror.o process.o output.o</tt></strong><br />
<strong><tt>TARGET       = mirror</tt></strong><strong><tt>.IGNORE:</tt></strong><br />
<strong><tt>.SILENT:</tt></strong></p>
<p><strong><tt>$(TARGET): $(OBJS)</tt></strong><br />
<strong><tt> $(LINKER) $(LINKER-FLAGS) $(TARGET) $(OBJS)</tt></strong></p>
<p><strong><tt>mirror.o:  mirror.cc</tt></strong><br />
<strong><tt> $(C++) $(C++-FLAGS) mirror.cc</tt></strong></p>
<p><strong><tt>input.o:   input.cc</tt></strong><br />
<strong><tt> $(C++) $(C++-FLAGS) input.cc</tt></strong></p>
<p><strong><tt>output.o:  output.cc</tt></strong><br />
<strong><tt> $(C++) $(C++-FLAGS) output.cc</tt></strong></p>
<p><strong><tt>process.o: process.cc</tt></strong><br />
<strong><tt> $(C++) $(C++-FLAGS) process.cc</tt></strong></p>
<p><strong><tt>clean:</tt></strong><br />
<strong><tt> $(RM) *.o core</tt></strong></p>
<p><strong><tt>distclean:</tt></strong><br />
<strong><tt> $(MAKE) clean</tt></strong><br />
<strong><tt> $(RM) $(TARGET)</tt></strong></p>
<p><strong><tt>again:</tt></strong><br />
<strong><tt> $(MAKE) distclean</tt></strong><br />
<strong><tt> $(MAKE) $(TARGET)</tt></strong></td>
</tr>
</tbody>
</table>
<h2><strong><span style="font-family: Arial,Helvetica">2. What are inference rules and what are they good for?</span></strong></h2>
<p>If you have a close look at the rules to make<tt> mirror.o, input.o, output.o, </tt>and<tt> process.o</tt> you see that they are all the same:</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>&lt;filename&gt;.o: &lt;filename&gt;.cc</tt></strong><br />
<strong><tt> $(C++) $(C++-FLAGS) &lt;filename&gt;.cc</tt></strong></td>
</tr>
</tbody>
</table>
<p>To avoid all these lenthy entries in a Makefile there are inference rules: They describe the &#8217;standard procedure&#8217; of making files of type b from files of type a. In this case the rule to make an object file from a given C++ file is</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>.cc.o:</tt></strong><br />
<strong><tt> $(C++) $(C++-FLAGS) $&lt;</tt></strong></td>
</tr>
</tbody>
</table>
<p>or alternatively you could use</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>.cc.o:</tt></strong><br />
<strong><tt> $(C++) $(C++-FLAGS) $*.cc</tt></strong></td>
</tr>
</tbody>
</table>
<p>It&#8217;s easy to see what<tt> $&lt; </tt>and<tt> $* </tt>mean but I&#8217;ll come back to that in just a moment. First I will change the rule for making the target &#8216;mirror&#8217; so that it makes use of another strange-looking predefined macros:</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>$(TARGET): $(OBJS)</tt></strong><br />
<strong><tt> $(LINKER) $(LINKER-FLAGS) $@ $(OBJ)</tt></strong></td>
</tr>
</tbody>
</table>
<p>Now let&#8217;s have a look at the meaning of <tt>$*, $&lt;, </tt>and<tt> $@:</tt></p>
<p><strong><tt>$*</tt></strong> ist the current target without an extension (the base file name) with path. For example, in</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>input.o: input.cc</tt></strong><br />
<strong><tt> $(C++) $(C++-FLAGS) $*.cc</tt></strong></td>
</tr>
</tbody>
</table>
<p>the value of<strong><tt> $* </tt></strong>is <strong><tt>input</tt></strong>.<strong><tt> $* </tt></strong>is commonly used only in inference rules and command lines.</p>
<p><tt><strong>$@</strong> </tt>is the current target (including extension, if any). For example, in</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>mirror: $(OBJS)</tt></strong><br />
<strong><tt> $(LINKER) $(LINKER-FLAGS) $@ $(OBJS)</tt></strong></td>
</tr>
</tbody>
</table>
<p>the value of<tt> <strong>$@</strong> </tt>is<strong><tt> mirror</tt></strong>.</p>
<p><strong><tt>$&lt;</tt></strong> is a dependent file out-of date with the target file. For example,</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>.cc.o:</tt></strong><br />
<strong><tt> $(C++) $(C++-FLAGS) $*.cc</tt></strong></td>
</tr>
</tbody>
</table>
<p>Notice that <strong><tt>$&lt;</tt></strong>, in an inference rule such as <strong><tt>.cc.o</tt></strong>, is equivalent to <strong><tt>$*.cc</tt></strong> (as already mentioned).</p>
<p>Just to remind you: Your Makefile should now look like<tt> <strong><a href="http://www-cip.physik.uni-bonn.de/pool/infos/make/Makefile7">Makefile7</a></strong></tt>:</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>C++          = g++</tt></strong><br />
<strong><tt>C++-FLAGS    = -c -Wall</tt></strong><br />
<strong><tt>LINKER       = g++</tt></strong><br />
<strong><tt>LINKER-FLAGS = -o</tt></strong><br />
<strong><tt>RM           = rm -f</tt></strong><br />
<strong><tt>MAKE         = make</tt></strong><br />
<strong><tt>OBJS         = input.o mirror.o process.o output.o</tt></strong><br />
<strong><tt>TARGET       = mirror</tt></strong><strong><tt>.IGNORE:</tt></strong><br />
<strong><tt>.SILENT:</tt></strong></p>
<p><strong><tt>$(TARGET): $(OBJS)</tt></strong><br />
<strong><tt> $(LINKER) $(LINKER-FLAGS) $@ $(OBJS)</tt></strong></p>
<p><strong><tt>.cc.o:</tt></strong><br />
<strong><tt> $(C++) $(C++-FLAGS) $&lt;</tt></strong></p>
<p><strong><tt>clean:</tt></strong><br />
<strong><tt> $(RM) *.o core</tt></strong></p>
<p><strong><tt>distclean:</tt></strong><br />
<strong><tt> $(MAKE) clean</tt></strong><br />
<strong><tt> $(RM) $(TARGET)</tt></strong></p>
<p><strong><tt>again:</tt></strong><br />
<strong><tt> $(MAKE) distclean</tt></strong><br />
<strong><tt> $(MAKE) $(TARGET)</tt></strong></td>
</tr>
</tbody>
</table>
<h2><span style="font-family: Arial,Helvetica">3. Continuation lines</span></h2>
<p>If your project consists of a great number of files (or you need lots of options) you may wish to split lines. Another reason for splitting lines is increasing the readability of your Makefile (don&#8217;t underestimate that point!).  In<tt> <strong><a href="http://www-cip.physik.uni-bonn.de/pool/infos/make/Makefile7">Makefile7</a></strong> </tt>you could change the line reading</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>OBJS = input.o mirror.o process.o output.o</tt></strong></td>
</tr>
</tbody>
</table>
<p>to read</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>OBJS = input.o   \</tt></strong><br />
<strong><tt> mirror.o  \</tt></strong><br />
<strong><tt> process.o \</tt></strong><br />
<strong><tt> output.o</tt></strong></td>
</tr>
</tbody>
</table>
<h2><span style="font-family: Arial,Helvetica">4.  Comments</span></h2>
<p>You can also add comments to your Makefile like the ones in<tt> <strong><a href="http://www-cip.physik.uni-bonn.de/pool/infos/make/Makefile8">Makefile8</a></strong></tt>:</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>C++          = g++           # use GNU C++ compiler </tt></strong><br />
<strong><tt>C++-FLAGS    = -c -Wall      # warn all </tt></strong><br />
<strong><tt>LINKER       = g++           # use GNU C++ as linker </tt></strong><br />
<strong><tt>LINKER-FLAGS = -o            # flags for linker </tt></strong><br />
<strong><tt>RM           = rm -f         # how to remove files </tt></strong><br />
<strong><tt>MAKE         = make          # name of make utility </tt></strong><br />
<strong><tt># you cannot add comments after the continuation character! </tt></strong><br />
<strong><tt>OBJS         = input.o   \ </tt></strong><br />
<strong><tt> mirror.o  \ </tt></strong><br />
<strong><tt> process.o \ </tt></strong><br />
<strong><tt> output.o </tt></strong><br />
<strong><tt>TARGET       = mirror        # name of executable </tt></strong><strong><tt>.IGNORE:                     # ignore problems (as far as possible) </tt></strong><br />
<strong><tt>.SILENT:                     # don't echo commands executed </tt></strong></p>
<p><strong><tt>$(TARGET):  $(OBJS) </tt></strong><br />
<strong><tt> $(LINKER) $(LINKER-FLAGS) $@ $(OBJS) </tt></strong></p>
<p><strong><tt>.cc.o: </tt></strong><br />
<strong><tt> $(C++) $(C++-FLAGS) $&lt; </tt></strong></p>
<p><strong><tt># remove object files and core (if any) </tt></strong><br />
<strong><tt>clean: </tt></strong><br />
<strong><tt> $(RM) *.o core </tt></strong></p>
<p><strong><tt># remove object files, core dump, and executable (if any) </tt></strong><br />
<strong><tt>distclean: </tt></strong><br />
<strong><tt> $(MAKE) clean </tt></strong><br />
<strong><tt> $(RM) $(TARGET) </tt></strong></p>
<p><strong><tt># remove object files, core dump, and executable (if any) and </tt></strong><br />
<strong><tt># make them again. </tt></strong><br />
<strong><tt>again: </tt></strong><br />
<strong><tt> $(MAKE) distclean </tt></strong><br />
<strong><tt> $(MAKE) $(TARGET)</tt></strong></td>
</tr>
</tbody>
</table>
<h2><span style="font-family: Arial,Helvetica">5. The .SUFFIXES pseudo target</span></h2>
<p>make comes with a couple of predefined rules how to make certain files. To get rid of them simply use</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>.SUFFIXES:</tt></strong></td>
</tr>
</tbody>
</table>
<p>If you do that you have to list all suffixes that your Makefile does support. In the above case that would be</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>.SUFFIXES: .o .cc</tt></strong></td>
</tr>
</tbody>
</table>
<p>You can also use<strong><tt> .SUFFIXES </tt></strong>to add rules to the predefined ones (in precisely the same manner as in the example above).</p>
<h2><span style="font-family: Arial,Helvetica">6. Using environment variables</span></h2>
<p>You can use environment variables in the same way as macros (besides that they are defined outside the Makefile):</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>info:</tt></strong><br />
<strong><tt> echo $(USER)</tt></strong></td>
</tr>
</tbody>
</table>
<p>Surely this is not a very useful example. Finding more useful ones is left to the reader.  Now, your Makefile should look like<tt> <strong><a href="http://www-cip.physik.uni-bonn.de/pool/infos/make/Makefile9">Makefile9</a></strong></tt>:</p>
<table border="1" cellpadding="20" width="100%" bgcolor="#ffffbf">
<tbody>
<tr>
<td><strong><tt>C++          = g++           # use GNU C++ compiler</tt></strong><br />
<strong><tt>C++-FLAGS    = -c -Wall      # warn all</tt></strong><br />
<strong><tt>LINKER       = g++           # use GNU C++ as linker </tt></strong><br />
<strong><tt>LINKER-FLAGS = -o            # flags for linker</tt></strong><br />
<strong><tt>RM           = rm -f         # how to remove files</tt></strong><br />
<strong><tt>MAKE         = make          # name of make utility</tt></strong><br />
<strong><tt># you cannot add comments after the continuation character!</tt></strong><br />
<strong><tt>OBJS         = input.o   \</tt></strong><br />
<strong><tt> mirror.o  \</tt></strong><br />
<strong><tt> process.o \</tt></strong><br />
<strong><tt> output.o</tt></strong><br />
<strong><tt>TARGET       = mirror        # name of executable</tt></strong><strong><tt>.IGNORE:                     # ignore problems (as far as possible)</tt></strong><br />
<strong><tt>.SILENT:                     # don't echo commands executed</tt></strong><br />
<strong><tt>.SUFFIXES:                   # get rid of predefined rules</tt></strong><br />
<strong><tt>.SUFFIXES: .cc .o</tt></strong></p>
<p><strong><tt>$(TARGET): $(OBJS)</tt></strong><br />
<strong><tt> $(LINKER) $(LINKER-FLAGS) $@ $(OBJS)</tt></strong></p>
<p><strong><tt>.cc.o:</tt></strong><br />
<strong><tt> $(C++) $(C++-FLAGS) $&lt;</tt></strong></p>
<p><strong><tt># remove object files and core (if any)</tt></strong><br />
<strong><tt>clean:</tt></strong><br />
<strong><tt> $(RM) *.o core</tt></strong></p>
<p><strong><tt># remove object files, core dump, and executable (if any)</tt></strong><br />
<strong><tt>distclean:</tt></strong><br />
<strong><tt> $(MAKE) clean</tt></strong><br />
<strong><tt> $(RM) $(TARGET)</tt></strong></p>
<p><strong><tt># remove object files, core dump, and executable (if any) and</tt></strong><br />
<strong><tt># make them again.</tt></strong><br />
<strong><tt>again:</tt></strong><br />
<strong><tt> $(MAKE) distclean</tt></strong><br />
<strong><tt> $(MAKE) $(TARGET)</tt></strong></p>
<p><strong><tt># echo username</tt></strong><br />
<strong><tt>info:</tt></strong><br />
<strong><tt> echo User is: $(USER)</tt></strong></td>
</tr>
</tbody>
</table>
<hr noshade="noshade" />Last changed tuesday 6/2/1998</p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/01/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%82%e0%b8%b5%e0%b8%a2%e0%b8%99-makefile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ติดตั้ง (Install) Samba Server บน Ubuntu</title>
		<link>http://www.memoball.info/10/%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-install-samba-server-%e0%b8%9a%e0%b8%99-ubuntu/</link>
		<comments>http://www.memoball.info/10/%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-install-samba-server-%e0%b8%9a%e0%b8%99-ubuntu/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 17:46:45 +0000</pubDate>
		<dc:creator>spnball</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=416</guid>
		<description><![CDATA[นำความรู้เก่าที่การเปิดใช้งานระบบ file sharing บนวินโดว์ หรือ samba บนเครื่อง Ubuntu
วิธีทำ ก็ง่ายแสนง่าย  ดังนี้


จาก WikiBall


			
นำความรู้เก่าที่การเปิดใช้งานระบบ file sharing บนวินโดว์ หรือ samba บนเครื่อง Ubuntu





เนื้อหา


1 ติดตั้ง
2 Authentication

2.1 Config
2.2 Create a Samba User

2.2.1 สร้าง smb password
2.2.2 สร้าง smbusers file




3 สร้าง directory




 if (window.showTocToggle) { var tocShowText = "แสดง"; var tocHideText = "ซ่อน"; showTocToggle(); } 

  ติดตั้ง 
ก่อนอื่น ลง samba ก่อน


  [...]]]></description>
			<content:encoded><![CDATA[<p>นำความรู้เก่าที่การเปิดใช้งานระบบ file sharing บนวินโดว์ หรือ samba บนเครื่อง Ubuntu<br />
วิธีทำ ก็ง่ายแสนง่าย  ดังนี้<br />
<span id="more-416"></span></p>
<div id="bodyContent">
<h3 id="siteSub"><a href="http://wiki.memoball.info/index.php/Install_Samba_Server_%E0%B8%9A%E0%B8%99_Ubuntu">จาก WikiBall</a></h3>
<div id="contentSub"></div>
<div id="jump-to-nav"></div>
<p>			<!-- start content --></p>
<p>นำความรู้เก่าที่การเปิดใช้งานระบบ file sharing บนวินโดว์ หรือ samba บนเครื่อง Ubuntu
</p>
<table id="toc" class="toc" summary="เนื้อหา">
<tr>
<td>
<div id="toctitle">
<h2>เนื้อหา</h2>
</div>
<ul>
<li class="toclevel-1"><a href="./#.E0.B8.95.E0.B8.B4.E0.B8.94.E0.B8.95.E0.B8.B1.E0.B9.89.E0.B8.87" ref="toc"><span class="tocnumber">1</span> <span class="toctext">ติดตั้ง</span></a></li>
<li class="toclevel-1"><a href="./#Authentication" ref="toc"><span class="tocnumber">2</span> <span class="toctext">Authentication</span></a>
<ul>
<li class="toclevel-2"><a href="./#Config" ref="toc"><span class="tocnumber">2.1</span> <span class="toctext">Config</span></a></li>
<li class="toclevel-2"><a href="./#Create_a_Samba_User" ref="toc"><span class="tocnumber">2.2</span> <span class="toctext">Create a Samba User</span></a>
<ul>
<li class="toclevel-3"><a href="./#.E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_smb_password" ref="toc"><span class="tocnumber">2.2.1</span> <span class="toctext">สร้าง smb password</span></a></li>
<li class="toclevel-3"><a href="./#.E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_smbusers_file" ref="toc"><span class="tocnumber">2.2.2</span> <span class="toctext">สร้าง smbusers file</span></a></li>
</ul>
</li>
</ul>
</li>
<li class="toclevel-1"><a href="./#.E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_directory" ref="toc"><span class="tocnumber">3</span> <span class="toctext">สร้าง directory</span></a></li>
</ul>
</td>
</tr>
</table>
<p><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "แสดง"; var tocHideText = "ซ่อน"; showTocToggle(); } </script><br />
<a name=".E0.B8.95.E0.B8.B4.E0.B8.94.E0.B8.95.E0.B8.B1.E0.B9.89.E0.B8.87" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> ติดตั้ง </span></h2>
<p>ก่อนอื่น ลง samba ก่อน
</p>
<pre>
    sudo apt-get install samba smbfs
</pre>
<p><a name="Authentication" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> Authentication </span></h2>
<p><a name="Config" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> Config </span></h3>
<pre>    sudo vim /etc/samba/smb.conf
</pre>
<pre>
    ####### Authentication #######

    # “security = user” is always a good idea. This will require a Unix account
    # in this server for every user accessing the server. See
    # /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
    # in the samba-doc package for details.
   &nbsp;;  security = user
</pre>
<p>เอา comment ออก เพิ่มไปอีกบรรทัดนึง
</p>
<pre>
    security = user
    username map = /etc/samba/smbusers
</pre>
<p><a name="Create_a_Samba_User" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> Create a Samba User </span></h3>
<p><a name=".E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_smb_password" href="http://wiki.memoball.info/"></a><br />
<h4> <span class="mw-headline"> สร้าง smb password </span></h4>
<pre>
    sudo smbpasswd -a &lt;username&gt;</pre>
<p><a name=".E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_smbusers_file" href="http://wiki.memoball.info/"></a><br />
<h4> <span class="mw-headline"> สร้าง smbusers file </span></h4>
<pre>
    sudo vim /etc/samba/smbusers</pre>
<p>ถ้าต้องการใช้ username ให้เหมือนที่ใช้ username ของ Ubuntu
</p>
<pre>&lt;ubuntuusername&gt; = “&lt;samba username&gt;” </pre>
<p>หรือถ้าต้องการสร้าง username ขึ้นมาใหม่โดยไม่ผูกกับ OS
</p>
<pre>    &lt;username&gt; = “&lt;username&gt;”</pre>
<p><a name=".E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_directory" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> สร้าง directory </span></h2>
<pre> sudo vim smb.conf</pre>
<pre>
[dirname]
   comment = The ball's comment
   path = /path/to/share/file
   browseable = yes
   read only = no
   guest ok = no
   write list = root, &lt;username&gt;
</pre>
<p><!--<br />
NewPP limit report<br />
Preprocessor node count: 38/1000000<br />
Post-expand include size: 0/2097152 bytes<br />
Template argument size: 0/2097152 bytes<br />
Expensive parser function count: 0/100<br />
--></p>
<p><!-- Saved in parser cache with key memoball_wiki:pcache:idhash:74-0!1!0!!th!2!edit=0 and timestamp 20091009174633 --></p>
<div class="printfooter">
<h5>รับข้อมูลจาก (Reference) : </h5>
<p>จาก WikiBall : <a href="http://wiki.memoball.info/index.php/Install_Samba_Server_%E0%B8%9A%E0%B8%99_Ubuntu">http://wiki.memoball.info/index.php/Install_Samba_Server_บน_Ubuntu</a></div>
<div id='catlinks' class='catlinks'>
<div id="mw-normal-catlinks"><a href="http://wiki.memoball.info//index.php/%E0%B8%9E%E0%B8%B4%E0%B9%80%E0%B8%A8%E0%B8%A9:Categories" title="พิเศษ:Categories">หมวดหมู่</a>:&#32;<span dir='ltr'><a href="http://wiki.memoball.info//index.php?title=%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%AB%E0%B8%A1%E0%B8%B9%E0%B9%88:Ubuntu&amp;action=edit&amp;redlink=1" class="new" title="หมวดหมู่:Ubuntu (ยังไม่ได้สร้าง)">Ubuntu</a></span></div>
</div>
<p>			<!-- end content --></p>
<div class="visualClear"></div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/10/%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-install-samba-server-%e0%b8%9a%e0%b8%99-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การติดตั้ง SVN &amp; Trac ร่วมกับ Apache ใน Ubuntu</title>
		<link>http://www.memoball.info/10/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-svn-trac-%e0%b8%a3%e0%b9%88%e0%b8%a7%e0%b8%a1%e0%b8%81%e0%b8%b1%e0%b8%9a-apache-%e0%b9%83%e0%b8%99-ubun/</link>
		<comments>http://www.memoball.info/10/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-svn-trac-%e0%b8%a3%e0%b9%88%e0%b8%a7%e0%b8%a1%e0%b8%81%e0%b8%b1%e0%b8%9a-apache-%e0%b9%83%e0%b8%99-ubun/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 09:11:46 +0000</pubDate>
		<dc:creator>spnball</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trac]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=411</guid>
		<description><![CDATA[ช่วงนี้กำลังปรับปรุงระบบ SVN ใหม่อยู่ โดยจะให้การทำ authen ผ่าน .htaccess เดียวกันทั้ง SVN &#38; Trac
จึงได้นำ SVN และ Trac มาผูกรวมกับ Apache ซึ่งเป็นวิธีการติดตั้งที่ง่ายกว่า และสะดวกกว่าการติดตั้งแบบที่นำเสนอครั้งก่อน โดยอาศัย dav_svn กับ mods_python เข้ามาช่วย


จาก WikiBall


			




เนื้อหา


1 ติดตั้ง Program ใน Ubuntu

1.1 SVN + Apache
1.2 Trac + Apache


2 การสร้าง project

2.1 สร้าง repository
2.2 สร้าง Trac


3 Enable apache modules
4 Apache configure

4.1 configuration file สำหรับ trac
4.2 configuration file สำหรับ subversion
4.3 Enable site


5 [...]]]></description>
			<content:encoded><![CDATA[<p>ช่วงนี้กำลังปรับปรุงระบบ SVN ใหม่อยู่ โดยจะให้การทำ authen ผ่าน .htaccess เดียวกันทั้ง SVN &amp; Trac<br />
จึงได้นำ SVN และ Trac มาผูกรวมกับ Apache ซึ่งเป็นวิธีการติดตั้งที่ง่ายกว่า และสะดวกกว่า<a href="http://www.memoball.info/01/%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89-web-interface-%E0%B8%82%E0%B8%AD%E0%B8%87-trac/">การติดตั้งแบบที่นำเสนอครั้งก่อน</a> โดยอาศัย dav_svn กับ mods_python เข้ามาช่วย<br />
<span id="more-411"></span></p>
<div id="bodyContent">
<h3 id="siteSub"><a href="http://wiki.memoball.info/index.php/SVN%2BTrac%2Bapache2">จาก WikiBall</a></h3>
<div id="contentSub"></div>
<div id="jump-to-nav"></div>
<p>			<!-- start content --></p>
<table id="toc" class="toc" summary="เนื้อหา">
<tr>
<td>
<div id="toctitle">
<h2>เนื้อหา</h2>
</div>
<ul>
<li class="toclevel-1"><a href="./#.E0.B8.95.E0.B8.B4.E0.B8.94.E0.B8.95.E0.B8.B1.E0.B9.89.E0.B8.87_Program_.E0.B9.83.E0.B8.99_Ubuntu" ref="toc"><span class="tocnumber">1</span> <span class="toctext">ติดตั้ง Program ใน Ubuntu</span></a>
<ul>
<li class="toclevel-2"><a href="./#SVN_.2B_Apache" ref="toc"><span class="tocnumber">1.1</span> <span class="toctext">SVN + Apache</span></a></li>
<li class="toclevel-2"><a href="./#Trac_.2B_Apache" ref="toc"><span class="tocnumber">1.2</span> <span class="toctext">Trac + Apache</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="./#.E0.B8.81.E0.B8.B2.E0.B8.A3.E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_project" ref="toc"><span class="tocnumber">2</span> <span class="toctext">การสร้าง project</span></a>
<ul>
<li class="toclevel-2"><a href="./#.E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_repository" ref="toc"><span class="tocnumber">2.1</span> <span class="toctext">สร้าง repository</span></a></li>
<li class="toclevel-2"><a href="./#.E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_Trac" ref="toc"><span class="tocnumber">2.2</span> <span class="toctext">สร้าง Trac</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="./#Enable_apache_modules" ref="toc"><span class="tocnumber">3</span> <span class="toctext">Enable apache modules</span></a></li>
<li class="toclevel-1"><a href="./#Apache_configure" ref="toc"><span class="tocnumber">4</span> <span class="toctext">Apache configure</span></a>
<ul>
<li class="toclevel-2"><a href="./#configuration_file_.E0.B8.AA.E0.B8.B3.E0.B8.AB.E0.B8.A3.E0.B8.B1.E0.B8.9A_trac" ref="toc"><span class="tocnumber">4.1</span> <span class="toctext">configuration file สำหรับ trac</span></a></li>
<li class="toclevel-2"><a href="./#configuration_file_.E0.B8.AA.E0.B8.B3.E0.B8.AB.E0.B8.A3.E0.B8.B1.E0.B8.9A_subversion" ref="toc"><span class="tocnumber">4.2</span> <span class="toctext">configuration file สำหรับ subversion</span></a></li>
<li class="toclevel-2"><a href="./#Enable_site" ref="toc"><span class="tocnumber">4.3</span> <span class="toctext">Enable site</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="./#.E0.B8.A7.E0.B8.B4.E0.B8.98.E0.B8.B5.E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_.htaccess" ref="toc"><span class="tocnumber">5</span> <span class="toctext">วิธีสร้าง .htaccess</span></a></li>
<li class="toclevel-1"><a href="./#Restart_apache" ref="toc"><span class="tocnumber">6</span> <span class="toctext">Restart apache</span></a></li>
<li class="toclevel-1"><a href="./#.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" ref="toc"><span class="tocnumber">7</span> <span class="toctext">การใช้งาน</span></a></li>
</ul>
</td>
</tr>
</table>
<p><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "แสดง"; var tocHideText = "ซ่อน"; showTocToggle(); } </script><br />
<a name=".E0.B8.95.E0.B8.B4.E0.B8.94.E0.B8.95.E0.B8.B1.E0.B9.89.E0.B8.87_Program_.E0.B9.83.E0.B8.99_Ubuntu" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline">ติดตั้ง Program ใน Ubuntu</span></h2>
<p><a name="SVN_.2B_Apache" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> SVN + Apache </span></h3>
<p>ติดตั้ง apache
</p>
<pre>
$ sudo apt-get install apache2
</pre>
<p>ติดตั้ง svn
</p>
<pre>
$ sudo apt-get install subversion
</pre>
<p>ติดตั้งโมดูล svn ของ apache
</p>
<pre>
$ sudo apt-get install libapache2-svn
</pre>
<p><a name="Trac_.2B_Apache" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> Trac + Apache </span></h3>
<p>การติดตั้ง Trac จำเป็นต้องมี SVN อยู่ก่อนแล้ว<br />
จึงทำการติดตั้ง Trac ดังนี้<br />
ดาวโหลด trac มาใส่ไว้ในที่ไดที่หนึ่งอาจเป็น /home/user ก็ได้ หรืออาจให้ wget ดึงมาเลย
</p>
<pre>
wget http://ftp.edgewall.com/pub/trac/Trac-0.11.5.tar.gz
</pre>
<p>ระเบิดมัน
</p>
<pre>tar -xzf Trac-0.11.5.tar.gz</pre>
<p>ลง Python setup
</p>
<pre>$ sudo apt-get install python-setuptools</pre>
<p>เข้าไปที่ directory ดังกล่าว  Trac-0.11.5 แล้วทำการ install
</p>
<pre>$ sudo python ./setup.py install</pre>
<p><a name=".E0.B8.81.E0.B8.B2.E0.B8.A3.E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_project" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> การสร้าง project </span></h2>
<p><a name=".E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_repository" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> สร้าง repository </span></h3>
<p>ตัวอย่างการสร้าง
</p>
<pre>$ svnadmin create /var/svn/repository/example</pre>
<p>นำเข้า (import) project
</p>
<pre>$ svn import /path/to/projectexample file:///var/svn/repository/example/examplev1 -m&quot;initial import&quot; </pre>
<p><a name=".E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_Trac" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> สร้าง Trac </span></h3>
<p>การสร้าง project enviroment รันคำสั่ง
</p>
<pre>$ trac-admin /path/to/myproject initenv</pre>
<p>ดู option ต่างๆ ได้ที่ <a href="http://wiki.memoball.info//index.php/%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_trac" title="การใช้งาน trac">การใช้งาน trac</a>
</p>
<p><a name="Enable_apache_modules" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> Enable apache modules </span></h2>
<p>เราต้องทำการ enable apache modules โดยการทำ soft link ใน /etc/apache2/mods-enabled ไปยัง /etc/apache2/mods-available/
</p>
<pre>
$ cd /etc/apache2/mods-enabled
$ sudo ln -s ../mods-available/dav_svn.conf
$ sudo ln -s ../mods-available/dav_svn.load
$ sudo ln -s ../mods-available/mod_python.load
</pre>
<p><a name="Apache_configure" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> Apache configure </span></h2>
<p>หลังจากลงโปรแกรม แล้ว เราก็จะมากทำการ config เจ้าตัว apache ของเราให้สามารถทำงานได้กัน โดยก่อนอื่นต้องเข้าไปที่ /etc/apache2/sites-available/
</p>
<p><a name="configuration_file_.E0.B8.AA.E0.B8.B3.E0.B8.AB.E0.B8.A3.E0.B8.B1.E0.B8.9A_trac" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> configuration file สำหรับ trac </span></h3>
<p>สร้าง config file ใหม่
</p>
<pre>
$sudo vim trac
</pre>
<pre>
&lt;Location /uri/path/to/trac/project&gt;
        SetHandler mod_python
        PythonInterpreter main_interpreter
        PythonHandler trac.web.modpython_frontend
        PythonOption TracEnv /path/to/project/environment
        PythonOption TracUriRoot /uri/path/to/trac/project
&lt;/Location&gt;
</pre>
<p>ถ้าต้องการทำ authentication ผ่าน .htaccess ของ apache ให้เพิ่มโค้ดด้านล่าง ลงใน Location
</p>
<pre>
        AuthType Basic
        AuthName &quot;Project name&quot;
        AuthUserFile /path/to/.htaccess
        Require valid-user
</pre>
<p><a name="configuration_file_.E0.B8.AA.E0.B8.B3.E0.B8.AB.E0.B8.A3.E0.B8.B1.E0.B8.9A_subversion" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> configuration file สำหรับ subversion </span></h3>
<p>สร้าง config file ใหม่
</p>
<pre>
$sudo vim svn
</pre>
<pre>
&lt;Location /uri/path/to/svn/project&gt;
        DAV svn
        SVNPath /var/svn/repository/rddi/mailgoth/
&lt;/Location
</pre>
<p>ถ้าต้องการทำ authentication ผ่าน .htaccess ของ apache ให้เพิ่มโค้ดด้านล่าง ลงใน Location
</p>
<pre>
        AuthType Basic
        AuthName Foo
        AuthUserFile /var/svn/repository/rddi/mailgoth/.htaccess

        require valid-user
        Order deny,allow
</pre>
<p><a name="Enable_site" href="http://wiki.memoball.info/"></a><br />
<h3> <span class="mw-headline"> Enable site </span></h3>
<p>ทำการ Enable site
</p>
<pre>
$ cd /etc/apache2/sites-enabled/
$ sudo ln -s ../sites-available/svn 002-svn
$ sudo ln -s ../sites-available/trac 002-trac
</pre>
<p><a name=".E0.B8.A7.E0.B8.B4.E0.B8.98.E0.B8.B5.E0.B8.AA.E0.B8.A3.E0.B9.89.E0.B8.B2.E0.B8.87_.htaccess" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> วิธีสร้าง .htaccess </span></h2>
<pre>htpasswd -c .htaccess username</pre>
<p><a name="Restart_apache" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> Restart apache </span></h2>
<p>สั่ง restart apache
</p>
<pre> $ sudo apache2ctl restart</pre>
<p>ถ้าเข้าแล้วยังมี error อยู่ ให้ไปดูที่ /var/log/apache/error.log ว่ามี Error อะไรเกิดขึ้น
</p>
<p><a name=".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" href="http://wiki.memoball.info/"></a><br />
<h2> <span class="mw-headline"> การใช้งาน </span></h2>
<ul>
<li>เข้าใช้งาน Trac&nbsp;: http:/site.name/uri/path/to/trac/project
</li>
<li>เข้าใช้งาน SVN&nbsp;: http:/site.name/uri/path/to/svn/project
</li>
</ul>
<p><!--<br />
NewPP limit report<br />
Preprocessor node count: 75/1000000<br />
Post-expand include size: 0/2097152 bytes<br />
Template argument size: 0/2097152 bytes<br />
Expensive parser function count: 0/100<br />
--></p>
<p><!-- Saved in parser cache with key memoball_wiki:pcache:idhash:73-0!1!0!!th!2!edit=0 and timestamp 20091002091041 --></p>
<div class="printfooter">
<h5>รับข้อมูลจาก (Reference) : </h5>
<p>จาก WikiBall : <a href="http://wiki.memoball.info/index.php/SVN%2BTrac%2Bapache2">http://wiki.memoball.info/index.php/SVN+Trac+apache2</a></div>
<div id='catlinks' class='catlinks'>
<div id="mw-normal-catlinks"><a href="http://wiki.memoball.info//index.php/%E0%B8%9E%E0%B8%B4%E0%B9%80%E0%B8%A8%E0%B8%A9:Categories" title="พิเศษ:Categories">หมวดหมู่</a>:&#32;<span dir='ltr'><a href="http://wiki.memoball.info//index.php?title=%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%AB%E0%B8%A1%E0%B8%B9%E0%B9%88:SVN&amp;action=edit&amp;redlink=1" class="new" title="หมวดหมู่:SVN (ยังไม่ได้สร้าง)">SVN</a></span> | <span dir='ltr'><a href="http://wiki.memoball.info//index.php?title=%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%AB%E0%B8%A1%E0%B8%B9%E0%B9%88:Apache&amp;action=edit&amp;redlink=1" class="new" title="หมวดหมู่:Apache (ยังไม่ได้สร้าง)">Apache</a></span> | <span dir='ltr'><a href="http://wiki.memoball.info//index.php?title=%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%AB%E0%B8%A1%E0%B8%B9%E0%B9%88:Trac&amp;action=edit&amp;redlink=1" class="new" title="หมวดหมู่:Trac (ยังไม่ได้สร้าง)">Trac</a></span> | <span dir='ltr'><a href="http://wiki.memoball.info//index.php?title=%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%AB%E0%B8%A1%E0%B8%B9%E0%B9%88:Ubuntu&amp;action=edit&amp;redlink=1" class="new" title="หมวดหมู่:Ubuntu (ยังไม่ได้สร้าง)">Ubuntu</a></span></div>
</div>
<p>			<!-- end content --></p>
<div class="visualClear"></div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/10/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-svn-trac-%e0%b8%a3%e0%b9%88%e0%b8%a7%e0%b8%a1%e0%b8%81%e0%b8%b1%e0%b8%9a-apache-%e0%b9%83%e0%b8%99-ubun/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
