<?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>STORY of AODDY. &#187; Ubuntu</title>
	<atom:link href="http://www.aoddy.com/category/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aoddy.com</link>
	<description>If you lose yourself, you lose everything. -- Michael Scofield</description>
	<lastBuildDate>Mon, 01 Aug 2011 14:32:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>SSH a guest server in VirtualBox by port-forwarding.</title>
		<link>http://www.aoddy.com/2011/08/01/ssh-a-guest-server-in-virtualbox-by-port-forwarding/</link>
		<comments>http://www.aoddy.com/2011/08/01/ssh-a-guest-server-in-virtualbox-by-port-forwarding/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 14:32:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.aoddy.com/?p=1345</guid>
		<description><![CDATA[Come back to Ubuntu server on VirtualBox again&#8230; Last week, I joined a training of &#8216;Internet GIS Technology and Web Map Server Development&#8217; .. So this week I really need to install some software in my server. Normally, I have &#8230; <a href="http://www.aoddy.com/2011/08/01/ssh-a-guest-server-in-virtualbox-by-port-forwarding/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Come back to Ubuntu server on VirtualBox again&#8230; Last week, I joined a training of &#8216;Internet GIS Technology and Web Map Server Development&#8217; .. So this week I really need to install some software in my server.</p>
<p>Normally, I have installed the VirtualBox in my laptop.. So today, I just download a Ubuntu OS and install it!!</p>
<p>I tried to use a Ubuntu desktop 11.04 first but it was very slow (lacking).. then I decided to re-install Ubuntu OS again by using server version .. Yes, it was better.. !!! ..</p>
<p>I don&#8217;t know why it is very slow.. I dedicated 1.5GB of memory .. You know, I&#8217;m very impressive the Ubuntu version 9.10.. anyway, the change is normal!!</p>
<p><span id="more-1345"></span></p>
<p><img class="aligncenter" title="Ubuntu" src="http://www.ubuntu.com/sites/www.ubuntu.com/files/active/natty/09-slideshow-welcome.jpg" alt="" width="447" height="351" />OK, just come back to main objective of this article&#8230;I NEED TO SSH to my guest server. But I can&#8217;t because the the type of network interface is NAT..</p>
<p>Finally I got a solution for this problem by using port-forwarding on VirtualBox feature.</p>
<p>First you need to install OpenSSH on your server.</p>
<blockquote><p>$ sudo apt-get install ssh</p></blockquote>
<p>Second, go to the network interface.</p>
<p><a href="http://www.aoddy.com/wp-content/uploads/2011/08/network_interface_virtualbox.jpg"><img class="size-full wp-image-1346 aligncenter" title="network_interface_virtualbox" src="http://www.aoddy.com/wp-content/uploads/2011/08/network_interface_virtualbox.jpg" alt="" width="600" height="521" /></a>Then click on &#8220;Network Adapters&#8230;&#8221; and fill name of rule, protocol &#8230; Please see in below picture.</p>
<p><a href="http://www.aoddy.com/wp-content/uploads/2011/08/network_interface_virtualbox2.jpg"><img class="size-full wp-image-1347 aligncenter" title="network_interface_virtualbox2" src="http://www.aoddy.com/wp-content/uploads/2011/08/network_interface_virtualbox2.jpg" alt="" width="600" height="608" /></a>Then ssh to the guest server via IP 127.0.0.1 port 22 &#8230;</p>
<p><a href="http://www.aoddy.com/wp-content/uploads/2011/08/network_interface_virtualbox3.jpg"><img class="size-full wp-image-1348 aligncenter" title="network_interface_virtualbox3" src="http://www.aoddy.com/wp-content/uploads/2011/08/network_interface_virtualbox3.jpg" alt="" width="563" height="497" /></a>Just try to connect your server again!!!</p>
<p><img class="alignnone size-full wp-image-1349" title="network_interface_virtualbox4" src="http://www.aoddy.com/wp-content/uploads/2011/08/network_interface_virtualbox4.jpg" alt="" width="600" height="504" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aoddy.com/2011/08/01/ssh-a-guest-server-in-virtualbox-by-port-forwarding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การติดตั้ง gtkmm ให้ใช้งานร่วมกับ Eclipse CDT</title>
		<link>http://www.aoddy.com/2010/05/19/how-to-install-gtkmm-with-eclipse-cdt/</link>
		<comments>http://www.aoddy.com/2010/05/19/how-to-install-gtkmm-with-eclipse-cdt/#comments</comments>
		<pubDate>Tue, 18 May 2010 20:25:41 +0000</pubDate>
		<dc:creator>aoddy</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://www.aoddy.com/?p=1066</guid>
		<description><![CDATA[หลังจากคราวก่อนนู้น ได้ทำการติดตั้ง CDT plugin บน Eclipse เพื่อที่จะอยากเขียน C/C++ ได้บน Eclipse มาวันนี้ความต้องการก็ยังไม่จบ คือเวลาเราเขียนโปรแกรมด้วย C++ เนี้ย output ที่ได้มันออกเป็นแค่ตัวหนังสือบน Console ใน Eclipse มันเลยทำให้รู้สึกขัดหูขัดตายังไงพิกล..ทำให้เกิดอารมณ์ไม่อยากเขียนโปรแกรมได้เหมือนกัน .. ว่าแล้วก็ลองหาดูว่าบนภาษา C/C++ เวลาที่เค้าพัฒนาโปรแกรมพวก GUI เค้าใช้ทำอะไรทำ ผลปรากฏว่า ก็มาป๊ะเจ้า gtkmm พอเลื่อนมาดู Feature ก็เข้าทางพอดี Full internationalisation with UTF8. (อ่ะแน่นอน support ภาษาไทย) Cross-platform: &#8230; <a href="http://www.aoddy.com/2010/05/19/how-to-install-gtkmm-with-eclipse-cdt/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="CDT logo" src="http://www.eclipse.org/cdt/images/CDT2.png" alt="" width="224" height="192" />หลังจาก<a href="http://www.aoddy.com/2010/03/28/install-eclipse-and-cc-development-tool-on-ubuntu-9-10/" target="_blank">คราวก่อนนู้น</a> ได้ทำการติดตั้ง CDT plugin บน Eclipse เพื่อที่จะอยากเขียน C/C++ ได้บน Eclipse มาวันนี้ความต้องการก็ยังไม่จบ คือเวลาเราเขียนโปรแกรมด้วย C++ เนี้ย output ที่ได้มันออกเป็นแค่ตัวหนังสือบน Console ใน Eclipse มันเลยทำให้รู้สึกขัดหูขัดตายังไงพิกล..ทำให้เกิดอารมณ์ไม่อยากเขียนโปรแกรมได้เหมือนกัน .. ว่าแล้วก็ลองหาดูว่าบนภาษา C/C++ เวลาที่เค้าพัฒนาโปรแกรมพวก GUI เค้าใช้ทำอะไรทำ ผลปรากฏว่า ก็มาป๊ะเจ้า <a href="http://www.gtkmm.org/" target="_blank">gtkmm</a> พอเลื่อนมาดู Feature ก็เข้าทางพอดี</p>
<p><span id="more-1066"></span></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "7396784224";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<ul>
<li>Full internationalisation with UTF8. (อ่ะแน่นอน support ภาษาไทย)</li>
<li>Cross-platform: Linux (gcc), FreeBSD (gcc), NetBSD (gcc), Solaris (gcc, Forte), Win32 (gcc, MSVC++ .Net 2003, 2005, 2008), MacOS X (gcc), others (เขียนทีเดียว..เสียวได้หลายครั้ง)</li>
</ul>
<p>กลับมาที่การติดตั้งเพื่อใช้งาน</p>
<p>1. ลง gtkmm ก่อน</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">sudo apt-get install libgtkmm-2.4-dev</pre></div></div>

<p>2. ต้องทำการ Add directory ที่อยู่ของ Gtkmm เข้าไปยัง Eclipse โดย directory ที่ต้อง Add เพิ่มมีดังนี้ gtkmm, glibmm และ gdkmm ซึ่งวิธี Add ก็ให้ไปที่</p>
<p>Eclipse -&gt; Project -&gt; Properties -&gt; C/C++ Build -&gt; Setting -&gt; GCC C++ Compiler -&gt; Directories</p>
<p>หลังจากนั้นก็ คลิกปุ่ม + (Add) โดย Directory ทั้ง 3 จะอยู่ที่ /usr/include</p>
<p style="text-align: left;">
<div class="wp-caption aligncenter" style="width: 569px"><a href="http://1.bp.blogspot.com/_sQJ1m4QDkME/R1MjPvw5B7I/AAAAAAAAAJY/ZzOx4-7EKDY/s1600-R/Schermata-Properties+for+ggredit+.png"><img class="  " src="http://1.bp.blogspot.com/_sQJ1m4QDkME/R1MjPvw5B7I/AAAAAAAAAJY/ZzOx4-7EKDY/s1600-R/Schermata-Properties+for+ggredit+.png" alt="" width="559" height="424" /></a><p class="wp-caption-text">Picture from : kapo-cpp.blogspot.com</p></div>
<p>3. ยังไม่ต้องออกจากหน้าในข้อ 2 (อย่าลืม Apply) ให้กระโดดไปที่ Miscellaneous ด้านซ้ายจะมีช่อง Other flags ให้กรอกเพิ่ม</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">`pkg-config --cflags gtkmm-2.4`</pre></div></div>

<p style="text-align: left;">
<div class="wp-caption aligncenter" style="width: 540px"><a href="http://1.bp.blogspot.com/_sQJ1m4QDkME/RdboAL6wFzI/AAAAAAAAABg/6vi78bQYuTQ/s1600/Schermata-Properties%2Bfor%2BGtkmmEclipseDemo-compiler.png"><img class="   " src="http://1.bp.blogspot.com/_sQJ1m4QDkME/RdboAL6wFzI/AAAAAAAAABg/6vi78bQYuTQ/s1600/Schermata-Properties%2Bfor%2BGtkmmEclipseDemo-compiler.png" alt="" width="530" height="608" /></a><p class="wp-caption-text">Picture from : kapo-cpp.blogspot.com</p></div>
<p>4. ทำเหมือนข้อ 3 แต่ไปที่ GCC C++ Linker / Miscellaneous มันจะมีชื่อ Linker flags ให้กรอก เหมือนในข้อ 3</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">`pkg-config --cflags gtkmm-2.4`</pre></div></div>

<p style="text-align: center;">
<div class="wp-caption aligncenter" style="width: 573px"><a href="http://2.bp.blogspot.com/_sQJ1m4QDkME/Rdbo3b6wF0I/AAAAAAAAABo/u_MH65ck4tI/s1600/Schermata-Properties%2Bfor%2BGtkmmEclipseDemo-linker.png"><img class="  " src="http://2.bp.blogspot.com/_sQJ1m4QDkME/Rdbo3b6wF0I/AAAAAAAAABo/u_MH65ck4tI/s1600/Schermata-Properties%2Bfor%2BGtkmmEclipseDemo-linker.png" alt="" width="563" height="645" /></a><p class="wp-caption-text">Picture from : kapo-cpp.blogspot.com</p></div>
<p>5. หลังจากก็ลองตัวอย่างกันครับ..ให้ไป Copy code จาก <a href="http://library.gnome.org/devel/gtkmm-tutorial/unstable/sec-helloworld.html.en" target="_blank">เว็บนี้</a> แล้วลอง Run ดูครับ..ได้แน่นอน</p>
<p>6. ผลลัพธ์ที่ได้</p>
<p><a href="http://www.aoddy.com/wp-content/uploads/2010/05/gtkmmexample.jpg"><img class="aligncenter size-full wp-image-1073" title="gtkmmexample" src="http://www.aoddy.com/wp-content/uploads/2010/05/gtkmmexample.jpg" alt="" width="469" height="327" /></a></p>
<p>Original link</p>
<ol>
<li><a href="http://kapo-cpp.blogspot.com/2007/12/let-eclipsecdt-autocomplete-your-gtkmm.html" target="_blank">http://kapo-cpp.blogspot.com/2007/12/let-eclipsecdt-autocomplete-your-gtkmm.html</a></li>
<li><a href="http://kapo-cpp.blogspot.com/2007/02/gtkmm-and-eclipse.html" target="_blank">http://kapo-cpp.blogspot.com/2007/02/gtkmm-and-eclipse.html</a></li>
</ol>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "0202375480";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aoddy.com/2010/05/19/how-to-install-gtkmm-with-eclipse-cdt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to increase the resolution of Ubuntu 9.10 on virtualbox.</title>
		<link>http://www.aoddy.com/2010/03/24/how-to-increase-the-resolution-of-ubuntu-9-10-on-virtualbox/</link>
		<comments>http://www.aoddy.com/2010/03/24/how-to-increase-the-resolution-of-ubuntu-9-10-on-virtualbox/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 23:12:27 +0000</pubDate>
		<dc:creator>aoddy</dc:creator>
				<category><![CDATA[Shell scripts]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.aoddy.com/?p=993</guid>
		<description><![CDATA[Since I changed my OS on my laptop from Ubuntu to Windows7 (6-7 months ago), today I come back to use it again via VirtualBox and I still find some problem on Ubuntu. Anyway, the problem must make me stronger. &#8230; <a href="http://www.aoddy.com/2010/03/24/how-to-increase-the-resolution-of-ubuntu-9-10-on-virtualbox/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Ubuntu" src="http://www.thevarguy.com/wp-content/uploads/2009/06/ubuntu-logo.jpg" alt="Ubuntu" width="180" height="173" />Since I changed my OS on my laptop from Ubuntu to Windows7 (6-7 months ago), today I come back to use it again via VirtualBox and I still find some problem on Ubuntu. <img src='http://www.aoddy.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Anyway, the problem must make me stronger.</p>
<p>I use Ubuntu9.10, I&#8217;m very surprise why I cannot find /etc/X11/xorg.conf. Normally, user can edit the resolution by editing some part in this file. There is always at least one solution to solve the problem. Of cause, Google can help&#8230;</p>
<p><span id="more-993"></span>From this link : <a href="http://ubuntuforums.org/showthread.php?p=8595940">http://ubuntuforums.org/showthread.php?p=8595940</a></p>
<p>I need to change resolution on Ubuntu from something to 1280&#215;800, what I do?</p>
<p>1. Check display device in Ubuntu by</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ xrandr
Screen 0: minimum 64 x 64, current 1280 x 800, maximum 32000 x 32000
VBOX1 connected 1280x800+0+0 0mm x 0mm
   1360x768       59.8
   1152x864       60.0
   1024x768       60.0
   800x600        60.3
   640x480        59.9</pre></div></div>

<p>2. Then type :</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ sudo cvt 1280 800
# 1280x800 59.81 Hz (CVT 1.02MA) hsync: 49.70 kHz; pclk: 83.50 MHz
Modeline &quot;1280x800_60.00&quot;   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync</pre></div></div>

<p>3. Create a new mode :</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ sudo xrandr --newmode &quot;1280x800_60.00&quot;   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync</pre></div></div>

<p>4. Add new mode:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ sudo xrandr --addmode VBOX1 1280x800_60.00</pre></div></div>

<p>5. Enable new mode:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ sudo xrandr --output VBOX1 --mode 1280x800_60.00</pre></div></div>

<p>6. Ohh my god, you need to put command from number 3 &#8211; 5 into script.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ sudo vi /usr/local/bin/increase_resolution.sh
#!/bin/bash
xrandr --newmode &quot;1280x800_60.00&quot;   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync
xrandr --addmode VBOX1 1280x800_60.00
xrandr --output VBOX1 --mode 1280x800_60.00</pre></div></div>

<p>7. Put this script into start up script:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ sudo vi /usr/local.rc
:
:
# By default this script does nothing.
&nbsp;
/usr/local/bin/increase_resolution.sh
&nbsp;
exit 0</pre></div></div>

<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">&lt;title&gt; Your Webpage title can be mentioned here&lt;/title&gt; &lt;meta name=&#8221;keywords&#8221; CONTENT=&#8221;Your comma-separated keywords are entered here&#8221;&gt; &lt;meta name=&#8221;description&#8221; CONTENT=&#8221;Enter website description here&#8221;&gt;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.aoddy.com/2010/03/24/how-to-increase-the-resolution-of-ubuntu-9-10-on-virtualbox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My keyboard are not mapped correctly on VMWare server.</title>
		<link>http://www.aoddy.com/2009/03/06/my-keyboard-are-not-mapped-correctly-on-vmware-server/</link>
		<comments>http://www.aoddy.com/2009/03/06/my-keyboard-are-not-mapped-correctly-on-vmware-server/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 13:42:13 +0000</pubDate>
		<dc:creator>aoddy</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.aoddy.com/?p=453</guid>
		<description><![CDATA[After I installed the VMWare server 1.0.8 complete. I have found a problem in my keyboard such as I could not use up/down/right/left arrow keys. So I tried to searh a solution for solve this problem. Sure I found !!! &#8230; <a href="http://www.aoddy.com/2009/03/06/my-keyboard-are-not-mapped-correctly-on-vmware-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.aoddy.com/wp-content/uploads/2009/01/vmware.gif"><img vspace="5" hspace="5" align="left" src="http://www.aoddy.com/wp-content/uploads/2009/01/vmware.gif" alt="" /></a>After I installed the VMWare server 1.0.8 complete. I have found a problem in my keyboard such as I could not use up/down/right/left arrow keys. So I tried to searh a solution for solve this problem. Sure I found !!! Everything is in the Google.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span id="more-453"></span></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "7396784224";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>1. Add this line into /etc/vmware/config at last line.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">xkeymap.nokeycodeMap = true</pre></td></tr></table></div>

<p>2. Restart VMWare service.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo /etc/init.d/vmware restart</pre></td></tr></table></div>

<p><script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "0202375480";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aoddy.com/2009/03/06/my-keyboard-are-not-mapped-correctly-on-vmware-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to start a script by root permission at boot time on Ubuntu server 8.10.</title>
		<link>http://www.aoddy.com/2009/03/02/how-to-start-a-script-by-root-permission-at-boot-time-on-ubuntu-server-810/</link>
		<comments>http://www.aoddy.com/2009/03/02/how-to-start-a-script-by-root-permission-at-boot-time-on-ubuntu-server-810/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 03:58:04 +0000</pubDate>
		<dc:creator>aoddy</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Shell scripts]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://www.aoddy.com/?p=437</guid>
		<description><![CDATA[Today my Opmanger server is down, I start it again but my service doesn&#8217;t start by automatic at boot time. So I need to start it by root permission at startup time. And this is my solution. 1. Write your &#8230; <a href="http://www.aoddy.com/2009/03/02/how-to-start-a-script-by-root-permission-at-boot-time-on-ubuntu-server-810/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today my Opmanger server is down, I start it again but my service doesn&#8217;t start by automatic at boot time. So I need to start it by root permission at startup time. And this is my solution.</p>
<p>1. Write your script for start a service</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">#!/bin/bash
echo &amp;quot;Start my service!!!&amp;quot;;
cd /path/of/my/script/
./run_my_script.sh</pre></div></div>

<p><span id="more-437"></span><script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "7396784224";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>2. Change a permission file to execute</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ cd /path/of/my/script/
$ sudo chmod +x run_my_script.sh</pre></div></div>

<p>3. Create a symbolic link file into /etc/init.d/</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ sudo ln -s /path/of/my/script/run_my_script.sh /etc/init.d/run_my_script.sh</pre></div></div>

<p>4. Add this script into start up time</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ sudo update-rc.d run_my_script.sh defaults
update-rc.d: warning: /etc/init.d/run_my_script.sh missing LSB style header
 Adding system startup for /etc/init.d/run_my_script.sh ...
   /etc/rc0.d/K20run_my_script.sh -&amp;gt; ../init.d/run_my_script.sh
   /etc/rc1.d/K20run_my_script.sh -&amp;gt; ../init.d/run_my_script.sh
   /etc/rc6.d/K20run_my_script.sh -&amp;gt; ../init.d/run_my_script.sh
   /etc/rc2.d/S20run_my_script.sh -&amp;gt; ../init.d/run_my_script.sh
   /etc/rc3.d/S20run_my_script.sh -&amp;gt; ../init.d/run_my_script.sh
   /etc/rc4.d/S20run_my_script.sh -&amp;gt; ../init.d/run_my_script.sh
   /etc/rc5.d/S20run_my_script.sh -&amp;gt; ../init.d/run_my_script.sh</pre></div></div>

<p>5. Test by restart your server and check this process by ps -ef | grep run_my_script.sh</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ ps -ef | grep run_my_script.sh</pre></div></div>

<p><script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "0202375480";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>Thanks for original : <a href="http://www.ubuntu-howto.info/howto/how-to-execute-a-command-program-or-script-at-startup-init-mini-howto">http://www.ubuntu-howto.info/howto/how-to-execute-a-command-program-or-script-at-startup-init-mini-howto</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aoddy.com/2009/03/02/how-to-start-a-script-by-root-permission-at-boot-time-on-ubuntu-server-810/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to install VMWare server on Ubuntu server 8.10.</title>
		<link>http://www.aoddy.com/2009/01/31/how-to-install-vmware-server-on-ubuntu-server-810/</link>
		<comments>http://www.aoddy.com/2009/01/31/how-to-install-vmware-server-on-ubuntu-server-810/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 05:31:39 +0000</pubDate>
		<dc:creator>aoddy</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.aoddy.com/?p=401</guid>
		<description><![CDATA[After I spent a lot of time to install VMWare ESXi on my server, I found problem about ESXi could not install on my disk RAID#1. Many people found this problem to : http://communities.vmware.com/message/1142404 So if you would like to &#8230; <a href="http://www.aoddy.com/2009/01/31/how-to-install-vmware-server-on-ubuntu-server-810/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img width="187" vspace="5" hspace="5" height="72" align="left" src="http://www.aoddy.com/wp-content/uploads/2009/01/vmware.gif" alt="vmware" title="vmware" class="alignleft size-full wp-image-402" />After I spent a lot of time to install VMWare ESXi on my server, I found problem about ESXi could not install on my disk RAID#1. Many people found this problem to : <br />
<a href="http://communities.vmware.com/message/1142404">http://communities.vmware.com/message/1142404</a></p>
<p>So if you would like to install VMWare ESXi into your server, you should check your hardware which is supported by VMWare ESXi from this link before :<br />
<a href="http://www.vm-help.com/esx/esx3i/Hardware_support.php">http://www.vm-help.com/esx/esx3i/Hardware_support.php</a></p>
<p>I hope, it will support my server sooner .</p>
<p>Anyway, I came back to my original solution that is installation the VMWare server.</p>
<p><span id="more-401"></span><script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "7396784224";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>After I installed an Ubuntu Server 8.10 completely, I would like to install a VMWare server on this server. And I found original solution from</p>
<p><a href="http://kuparinen.org/martti/comp/ubuntu/en/server.html">http://kuparinen.org/martti/comp/ubuntu/en/server.html</a></p>
<p>These are my steps :</p>
<ol>
<li><span id="1233379381668S" style="display: none;">&nbsp;</span><span id="1233379375889S" style="display: none;">&nbsp;</span>Install some importance software.

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># sudo apt-get install openssh-client
# sudo apt-get install wget
# sudo apt-get install chkrootkit rkhunter
# sudo chkrootkit
# rkhunter --checkall</pre></div></div>

</li>
<li>Download the VMWare server from <a href="http://www.vmware.com/download/server/">http://www.vmware.com/download/server/</a></li>
<li>Download the VMWare-Update from <a href="http://www.insecure.ws/warehouse/vmware-update-2.6.27-5.5.7-2.tar.gz" target="_blank">http://www.insecure.ws/<wbr></wbr>warehouse/<span class="nfakPe">vmware</span>-update-2.6.<wbr></wbr>27-5.5.7-2.tar.gz</a> by wget command 

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># wget -c http://www.insecure.ws/warehouse/vmware-update-2.6.27-5.5.7-2.tar.gz</pre></div></div>

</li>
<li>Install the VMWare server

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># sudo aptitude install xinetd
# sudo aptitude install build-essential
# sudo aptitude install linux-headers-`uname -r`
# sudo aptitude install libx11-6 libx11-dev libxtst6 xlibs-dev libxrender-dev
# tar xvfz VMware-server-1.0.X-XXXX.tar.gz
# cd vmware-server-distrib
# sudo ./vmware-install.pl</pre></div></div>

</li>
<li>If you cannot compile module, you can compile by vmware-update

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># tar xvfz vmware-update-2.6.27-5.5.7-2.tar.gz
# cd vmware-update; 
# sudo ./runme.pl</pre></div></div>

</li>
</ol>
<p>&nbsp;If you find some problem about installation, please read this <a href="http://www.aoddy.com/2007/10/15/%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-vmware-server-%E0%B8%9A%E0%B8%99-ubuntu-704/">post</a> before.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "0202375480";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aoddy.com/2009/01/31/how-to-install-vmware-server-on-ubuntu-server-810/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to install trac service on Ubuntu for multiple projects using Mod_Python.</title>
		<link>http://www.aoddy.com/2008/10/17/how-to-install-trac-service-on-ubuntu-for-multiple-projects-using-mod_python/</link>
		<comments>http://www.aoddy.com/2008/10/17/how-to-install-trac-service-on-ubuntu-for-multiple-projects-using-mod_python/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 16:25:21 +0000</pubDate>
		<dc:creator>aoddy</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://www.aoddy.com/?p=228</guid>
		<description><![CDATA[Previously I have installed a DNS service on my Ubuntu server. Today I would like to install a Trac service which supports for multiple projects using Mod_Python on Apache. Condition : I would like to use sub-domain for trac service &#8230; <a href="http://www.aoddy.com/2008/10/17/how-to-install-trac-service-on-ubuntu-for-multiple-projects-using-mod_python/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="How to install DNS server on Ubuntu 8.04.1." href="http://www.aoddy.com/2008/10/11/how-to-install-dns-server-on-ubuntu-8041/" target="_blank"><img class="alignleft" style="margin: 5px;" title="Trac Integrated SCM &amp; Project management" src="http://www.edgewall.org/gfx/trac_logo.png" alt="Trac Logo" width="214" height="61" />Previously</a> I have installed a DNS service on my Ubuntu server. Today I would like to install a Trac service which supports for multiple projects using Mod_Python on Apache.</p>
<p><span style="text-decoration: underline;"><strong><br />
</strong></span></p>
<p><span style="text-decoration: underline;"><strong>Condition :</strong></span></p>
<ol>
<li>I would like to use sub-domain for trac service that is trac.aoddy.com</li>
<li>Trac service can support multiple projects such as trac.aoddy.com/Project1, trac.aoddy.com/Project2</li>
<li>Trac service supports SVN service too.</li>
</ol>
<p><span id="more-228"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "7396784224";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
<span style="text-decoration: underline;"><strong>Softwares :<br />
</strong></span></p>
<ol>
<li>enscript</li>
<li>libapache2-mod-python</li>
<li>python-docutils</li>
<li>trac</li>
<li>db4.3-util</li>
<li>libapache2-svn</li>
<li>subversion-tools</li>
</ol>
<p>You can install software by</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo apt-get install enscript libapache2-mod-python python-docutils trac db4.3-util libapache2-svn subversion-tools</pre></td></tr></table></div>

<p><span style="text-decoration: underline;"><strong>Install &amp; Configurations :</strong></span></p>
<ol>
<li>Create SVN directory such as :

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo mkdir /svn</pre></td></tr></table></div>

</li>
<li>Set SVN directory to repository.

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo svnadmin create /svn</pre></td></tr></table></div>

</li>
<li>Create a user account so as to security policy.

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo htpasswd 2 -cm /etc/apach2/dav_svn.passwd YOUR-ACCOUNT</pre></td></tr></table></div>

</li>
<li>Create TRAC directory such as :

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo mkdir /trac</pre></td></tr></table></div>

</li>
<li>Change owner of TRAC directory to www-data :

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo chown -R www-data:www-data /trac</pre></td></tr></table></div>

</li>
<li>Create a configuration file of TRAC in apache

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo vi /etc/apache2/site-available/trac.aoddy.com
&lt;VirtualHost * &gt;
ServerName trac.aoddy.com
DocumentRoot /trac
&lt;Location /&gt;
SetHandler mod_python
PythonInterpreter main_interpreter
PythonOption TracEnvParentDir /var/lib/trac
PythonOption TracUriRoot /
&lt;/Location&gt;
&lt;LocationMatch &quot;/[^/]+/login&quot;&gt;
AuthType Basic
AuthName &quot;Trac&quot;
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
&lt;/LocationMatch&gt;
Alias /svn /svn
&lt;Location /svn/&gt;
DAV svn
SVNParentPath /svn
SVNListParentPath On
AuthType Basic
AuthName &quot;Subversion Repository&quot;
AuthUserFile /etc/apache2/dav_svn.passwd
AuthzSVNAccessFile /etc/apache2/authz_svn.access
Require valid-user
&lt;/Location&gt;
ErrorLog /var/log/apache2/trac.aoddy.com/error.log
CustomLog /var/log/apache2/trac.aoddy.com/access.log common
&lt;/VirtualHost&gt;</pre></td></tr></table></div>

</li>
<li>Create a directory for keep error log.

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo mkdir -p /var/log/apache2/trac.aoddy.com/</pre></td></tr></table></div>

</li>
<li>Add this site into apache service.

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo a2ensite trac.aoddy.com
$ sudo /etc/init.d/apach2 restart</pre></td></tr></table></div>

</li>
<li>Sometime you need to re-configure in this file, I recommend you should use these commands.

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo a2dissite trac.aoddy.com
$ sudo a2ensite trac.aoddy.com
$ sudo /etc/init.d/apach2 restart</pre></td></tr></table></div>

</li>
<li>Test by open an URL http://trac.aoddy.com/</li>
</ol>
<p><span style="text-decoration: underline;"><strong>Create SVN</strong></span></p>
<p>You can use this script for create a SVN environment.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">#!/bin/bash
PROJECTNAME=$1
mkdir -p /tmp/${PROJECTNAME}/branches /tmp/${PROJECTNAME}/tags/ /tmp/${PROJECTNAME}/trunks
svnadmin create /svn/${PROJECTNAME}
svn import /tmp/${PROJECTNAME} file:///svn/${PROJECTNAME} -m &quot;initial import&quot;
sudo rm -rf /tmp/${PROJECTNAME}</pre></td></tr></table></div>

<p>Don&#8217;t remember to change mode of this script to execute file and run this script by root permission.</p>
<p><span style="text-decoration: underline;"><strong>Create TRAC </strong></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo trac-admin /trac/YOUR-PROJECT-NAME initenv</pre></td></tr></table></div>

<p>After you run this command you should find some question about your project</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">the project name (YOUR-PROJECT-NAME)
use the default database connection string (sqlite:db/trac.db)
the path to svn repository (/svn/YOUR-PROJECT-NAME)
use the default Trac templates directory (/usr/share/trac/templates)</pre></td></tr></table></div>

<p>Change permission of this project so as to support apache service</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo chown -R www-data /trac/YOUR-PROJECT-NAME</pre></td></tr></table></div>

<p>Woowww, you should find your new project on trac service at http://trac.aoddy.com/YOUR-PROJECT-NAME<br />
<script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "7396784224";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aoddy.com/2008/10/17/how-to-install-trac-service-on-ubuntu-for-multiple-projects-using-mod_python/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to check a version of your package in your ubuntu.</title>
		<link>http://www.aoddy.com/2008/10/10/how-to-check-a-version-of-your-package-in-your-ubuntu/</link>
		<comments>http://www.aoddy.com/2008/10/10/how-to-check-a-version-of-your-package-in-your-ubuntu/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 08:44:10 +0000</pubDate>
		<dc:creator>aoddy</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.aoddy.com/?p=211</guid>
		<description><![CDATA[I would like to check my package in my Ubuntu desktop. After I searched in google, I found this command : aptitude show NAME-OF-PACKAGE It&#8217;s very easy. Perfect !! 555]]></description>
			<content:encoded><![CDATA[<p>I would like to check my package in my Ubuntu desktop. After I searched in google, I found this command :</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">aptitude show NAME-OF-PACKAGE</pre></div></div>

<p>It&#8217;s very easy.</p>
<p>Perfect !! <img src='http://www.aoddy.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  555<br />
<span id="more-211"></span></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "7396784224";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aoddy.com/2008/10/10/how-to-check-a-version-of-your-package-in-your-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix MAC Address with IP Address on DHCP server.</title>
		<link>http://www.aoddy.com/2008/09/21/how-to-fix-mac-address-with-ip-address-on-dhcp-server/</link>
		<comments>http://www.aoddy.com/2008/09/21/how-to-fix-mac-address-with-ip-address-on-dhcp-server/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 17:42:01 +0000</pubDate>
		<dc:creator>aoddy</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[dhcp]]></category>

		<guid isPermaLink="false">http://www.aoddy.com/?p=194</guid>
		<description><![CDATA[Today, I would like to monitor my internet network bandwidth. When my internet network is slow I often have questions from my boss &#8220;Why my internet network is slow, who are using a lot of internet bandwidth?&#8221;. I cannot answer &#8230; <a href="http://www.aoddy.com/2008/09/21/how-to-fix-mac-address-with-ip-address-on-dhcp-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="DHCP Session" src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/28/DHCP_session_en.svg/200px-DHCP_session_en.svg.png" alt="" width="180" height="234" />Today, I would like to monitor my internet network bandwidth. When my internet network is slow I often have questions from my boss &#8220;Why my internet network is slow, who are using a lot of internet bandwidth?&#8221;. I cannot answer these questions because I don&#8217;t have informations of current network status.</p>
<p>First step, I think I should know which IP Address is using a lot of internet bandwidth and second step I should know who is owner that IP Address.</p>
<p>The answer of the first step , I will use <a title="NTOP " href="http://www.ntop.org/" target="_blank">ntop</a> software to answer this question. For the second step, I will fix all MAC Address of Laptop&#8217;s wireless card with IP Address on a DHCP Server. And this is my solutions :</p>
<p><span id="more-194"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "7396784224";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
1. Get a MAC Address from Client&#8217;s laptop such as  A1:B2:C3:A1:B2:C3</p>
<p>2. Add the MAC Address into the file /etc/dhcpd.conf such as</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">ddns-update-style interim
ignore client-updates
&nbsp;
subnet 192.168.1.0 netmask 255.255.255.0 {
&nbsp;
   # The range of IP addresses the server
   # will issue to DHCP enabled PC clients
   # booting up on the network
&nbsp;
   range 192.168.1.201 192.168.1.220;
&nbsp;
   # Set the amount of time in seconds that
   # a client may keep the IP address
&nbsp;
   default-lease-time 86400;
   max-lease-time 86400;
&nbsp;
   # Set the default gateway to be used by
   # the PC clients
&nbsp;
   option routers 192.168.1.1;
   # Don't forward DHCP requests from this
   # NIC interface to any other NIC
   # interfaces
&nbsp;
   option ip-forwarding off;
&nbsp;
   # Set the broadcast address and subnet mask
   # to be used by the DHCP clients
&nbsp;
   option broadcast-address 192.168.1.255;
   option subnet-mask 255.255.255.0;
&nbsp;
   # Set the NTP server to be used by the
   # DHCP clients
&nbsp;
   option ntp-servers 192.168.1.100;
&nbsp;
   # Set the DNS server to be used by the
   # DHCP clients
&nbsp;
   option domain-name-servers 192.168.1.100;
&nbsp;
   # If you specify a WINS server for your Windows clients,
   # you need to include the following option in the dhcpd.conf file:
&nbsp;
   option netbios-name-servers 192.168.1.100;
&nbsp;
   # You can also assign specific IP addresses based on the clients'
   # ethernet MAC address as follows (Host's name is &quot;laser-printer&quot;:
&nbsp;
   host user-one {
      hardware ethernet A1:B2:C3:A1:B2:C3;
      fixed-address 192.168.1.222;
   }
}
#
# List an unused interface here
#
subnet 192.168.2.0 netmask 255.255.255.0 {
}</pre></div></div>

<p>3. Check your configuration file is correct :</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># /usr/sbin/dhcpd -t -cf /etc/dhcpd.conf</pre></div></div>

<p>4. Restart your DHCP Service :</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># service dhcpd restart</pre></div></div>

<p>5. Set DHCP relay in your CISCO switch points to your DHCP Server (Assume your IP Address of DHCP Server is 192.168.1.201)</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ conf t
$ conf t &gt; interface vlan 10
$ conf t &gt; ip address 192.168.1.1 255.255.255.0
$ conf t &gt; no ip directed-broadcast
$ conf t &gt; ip helper-address 192.168.1.201
$ conf t &gt; end</pre></div></div>

<p>6. You can check all IP Addresses which receive from DHCP Server in file /var/lib/dhcp/dhcpd.leases<br />
<script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "7396784224";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
<strong>References :</strong><br />
1. http://www.redhatmagazine.com/2008/08/05/linux-dhcp-server-static-ips-are-gone-in-60-seconds/<br />
2. http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch08_:_Configuring_the_DHCP_Server<br />
3. http://www.cisco.com/en/US/tech/tk648/tk361/technologies_tech_note09186a00800f0804.shtml</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aoddy.com/2008/09/21/how-to-fix-mac-address-with-ip-address-on-dhcp-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to connect to VMWare virtual machines by a VNC Client.</title>
		<link>http://www.aoddy.com/2008/09/18/how-to-connect-to-vmware-virtual-machines-by-a-vnc-client/</link>
		<comments>http://www.aoddy.com/2008/09/18/how-to-connect-to-vmware-virtual-machines-by-a-vnc-client/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 11:38:49 +0000</pubDate>
		<dc:creator>aoddy</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[vnc]]></category>

		<guid isPermaLink="false">http://www.aoddy.com/?p=188</guid>
		<description><![CDATA[พอดีไปเจอมา ใน Slide ของ Kevin Gehrke เกี่ยวกับการทำให้ เราสามารถ Remote ไปที่เครื่อง VMWare virtual machines ที่ถูกใช้งาน บน VMWare Server. Topology Detail จากรูป ผมก็จะมี Host Server อยู่ 1 ตัวมี IP Address เป็น 192.168.0.2 และมี Guest อีกหนึ่ง Server มี IP Address เป็น 192.168.0.3 โดย &#8230; <a href="http://www.aoddy.com/2008/09/18/how-to-connect-to-vmware-virtual-machines-by-a-vnc-client/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>พอดีไปเจอมา ใน Slide ของ Kevin Gehrke เกี่ยวกับการทำให้ เราสามารถ Remote ไปที่เครื่อง VMWare virtual machines ที่ถูกใช้งาน บน VMWare Server.</p>
<p><strong> Topology</strong></p>
<p><a href="http://www.aoddy.com/wp-content/uploads/2008/09/vmware-topology.jpeg"><img class="alignnone size-medium wp-image-190" title="vmware-topology" src="http://www.aoddy.com/wp-content/uploads/2008/09/vmware-topology-300x220.jpg" alt="" width="300" height="220" /></a></p>
<p><span id="more-188"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "7396784224";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
<strong>Detail</strong><br />
จากรูป ผมก็จะมี Host Server อยู่ 1 ตัวมี IP Address เป็น 192.168.0.2 และมี Guest อีกหนึ่ง Server มี IP Address เป็น 192.168.0.3 โดย Interface ใน Guest จะทำเป็น Bridge Interface กับเครื่อง Host Server</p>
<p><strong>จุดประสงค์<br />
</strong>ผมต้องการ ที่จะ Remote ไปยังเครื่อง Guest (192.168.0.3) ผ่านทาง VNC ที่อยู่บน Host Server (192.168.0.2)</p>
<p><strong>การ Config</strong><br />
1. แก้ไขให้ Guest virtual machine ยอมให้ใช้งาน ผ่าน VCN โดยเพิ่ม คำสั่งด้านล่างเข้าไปที่ไฟล์คอนฟิกของเครื่อง Guest (.vmx)</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">:
RemoteDisplay.vnc.enabled = TRUE
:</pre></div></div>

<p>2. ก็ยังคงแก้ไขที่ไฟล์เดิมของ Guest (.vmx) โดยเราต้องการที่จะบอกว่าเวลาคุณจะ Remote เข้ามา คุณต้องใช้ Port หมายเลขใด แล้วเวลา vncviewer เข้ามาจะใช้ Password ใด..เพื่อเข้ามาใช้งาน ก็แค่เพิ่ม 2 บรรทัด นี้เข้าไป</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">:
RemoteDisplay.vnc.port = “5901”
RemoteDisplay.vnc.password = “Your-Password”</pre></div></div>

<p><strong>การ Remote เข้ามาด้วย vncviewer</strong><br />
โดยใช้คำสั่งดังนี้ (อันนี้ที่เครื่อง Client นะครับ)</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ vncviewer 192.168.0.2:1</pre></div></div>

<p><strong>ข้อสังเกต<br />
</strong> เวลาเรา vncviewer เข้ามาจะใช้ IP ผ่าน 192.168.0.2 ซึ่งเป็นเครื่อง VMware Server นะครับ<strong></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aoddy.com/2008/09/18/how-to-connect-to-vmware-virtual-machines-by-a-vnc-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

