<?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>JOMYUT.NET</title>
	<atom:link href="http://www.jomyut.net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jomyut.net</link>
	<description>Software Engineering Blog</description>
	<lastBuildDate>Sat, 29 Oct 2011 17:42:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Microsoft Outlook 2010 with Microsoft Online Service</title>
		<link>http://www.jomyut.net/2011/10/microsoft-outlook-2010-with-microsoft-online-service.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=microsoft-outlook-2010-with-microsoft-online-service</link>
		<comments>http://www.jomyut.net/2011/10/microsoft-outlook-2010-with-microsoft-online-service.html#comments</comments>
		<pubDate>Sat, 29 Oct 2011 17:42:12 +0000</pubDate>
		<dc:creator>Scalopus+</dc:creator>
		
		<guid isPermaLink="false">http://www.jomyut.net/?p=196</guid>
		<description><![CDATA[For a moment that I search for the way to add the Microsoft Exchange ,which provided by Microsoft Online Service, manually add to the Microsoft Outlook 2010. This issue is occurs because the current Microsoft Online Service Single Sign-on client that install beside a client is not support for the Microsoft Outlook 2010 yet. Finally, I [...]]]></description>
			<content:encoded><![CDATA[<p>For a moment that I search for the way to add the Microsoft Exchange ,which provided by Microsoft Online Service, manually add to the Microsoft Outlook 2010. This issue is occurs because the current Microsoft Online Service Single Sign-on client that install beside a client is not support for the Microsoft Outlook 2010 yet.</p>
<p>Finally, I found the solution from <a href="http://www.homelandsecureit.com/blog/2010/08/microsoft-business-productivity-online-suite-and-your-outlook-work-well-together-saas-bpos-ms/">here</a>. The way is that</p>
<ol>
<li>Login to your Microsoft Office Outlook Web Access that your company provided<br />
May be <a href="https://red003.mail.apac.microsoftonline.com/owa" target="_blank">https://red003.mail.apac.microsoftonline.com/owa</a> or<br />
<a href="https://red002.mail.emea.microsoftonline.com/owa" target="_blank">https://red002.mail.emea.microsoftonline.com/owa</a> or<br />
<a href="https://red001.mail.microsoftonline.com/owa" target="_blank">https://red001.mail.microsoftonline.com/owa</a> that is up on your region. (<a href="http://www.microsoft.com/online/help/en-us/helphowto/c0a1a4b9-111f-4bd4-8fab-8147344cd278.htm">Information found here</a>)</li>
<li>After you logged-in, Goto Options &gt; About. Here, you will found the information that will use in the future<br />
Looking for the Line<br />
<em>[Noted as B]</em><strong> Outlook Web Access host name</strong>: red003.mail.apac.microsoftonline.com<br />
<em>[Noted as A]</em><strong> Mailbox server name</strong>: SAMPLENAME.red003.local</li>
<li>Now, close your Microsoft Outlook 2010</li>
<li>Go to Control Panel &gt; E-Mail Account &gt; Add New Email Account<br />
Select <span style="text-decoration: underline;">Microsoft Exchange or compatible service</span><br />
Add <em>(A)</em> to the Server<br />
Type your username (Your full email address) to the username<br />
Go to Connection tab &gt; <span style="text-decoration: underline;">Select Connect to Microsoft Exchange using HTTP</span><br />
In the URL, use information from <em>(B)<br />
</em>Add information as below<br />
<a href="http://www.jomyut.net/uploads/2011/10/Office2010withMicrosoftOnlineService.png"><img class="alignnone size-thumbnail wp-image-197" title="Office2010withMicrosoftOnlineService" src="http://www.jomyut.net/uploads/2011/10/Office2010withMicrosoftOnlineService-400x353.png" alt="" width="400" height="353" /></a></li>
<li>If everything correct, when you click Check Name, you will see a dialog to input your username and password</li>
</ol>
<div>Hope that it will help you.</div>
<div>For <span style="text-decoration: underline;">Android</span> user, you just use account as Exchange ActiveSync, not need to put domain name. Put the server<em> (B)</em> and full email account, that all. <em>(A)</em> is not required to input in any form in the Android phone.</div>
<div>Keyword: BPOS, Business Productivity Online Suite, Microsoft Online Service, Microsoft Outlook 2010, Single Sign-on</div>
]]></content:encoded>
			<wfw:commentRss>http://www.jomyut.net/2011/10/microsoft-outlook-2010-with-microsoft-online-service.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion: Summary Useful Subversion Command</title>
		<link>http://www.jomyut.net/2011/06/subversion-summary-in-working-copy-changes.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=subversion-summary-in-working-copy-changes</link>
		<comments>http://www.jomyut.net/2011/06/subversion-summary-in-working-copy-changes.html#comments</comments>
		<pubDate>Sat, 25 Jun 2011 16:43:47 +0000</pubDate>
		<dc:creator>Scalopus+</dc:creator>
				<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.jomyut.net/?p=160</guid>
		<description><![CDATA[To commit the code, or sometimes that we would like to summarize which files we changes and what we change, we can use the following command to generate the difference between file in the repository and the working copy of ALL file. Notes In this command will show only the exists files which got changed. [...]]]></description>
			<content:encoded><![CDATA[<h3><span class="Apple-style-span" style="font-size: 13px; font-weight: normal;">To commit the code, or sometimes that we would like to summarize which files we changes and what we change, we can use the following command to generate the difference between file in the repository and the working copy of ALL file.</span></h3>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Summary the changes in Working Directory</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw2">svn</span> status<span class="sy0">|</span><span class="kw2">sed</span> <span class="re5">-e</span> <span class="st_h">'/^\M/!d; s/^\M//'</span> <span class="sy0">|</span> <span class="kw2">xargs</span> <span class="kw2">svn</span> <span class="kw2">diff</span></div></div></div>
<p><strong>Notes</strong></p>
<p>In this command will show only the exists files which got changed. for the new file which just add to current working copy will not show up.</p>
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Subversion: View Subversion Repository Log filtering by Username</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw2">svn</span> log <span class="sy0">|</span> <span class="kw2">sed</span> <span class="re5">-n</span> <span class="st_h">'/USERNAME/,/-----$/ p'</span></div></div></div>
<p>To see the user commit in the Subversion repository.</p>
<div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Subversion: View the Change of each file in the details.</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw2">svn</span> log <span class="re5">-v</span> <span class="re5">-q</span> <span class="sy0">&lt;</span>Filename<span class="sy0">/</span>Directory<span class="sy0">&gt;</span></div></div></div>
<p>This command will help to filtering the view when we want to know the change of each file. Normally it will not show what it is changed. It possible that the file just move, or have a new properties but the contents have not change. So, this command will help to know the last change of each file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jomyut.net/2011/06/subversion-summary-in-working-copy-changes.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DirectAdmin with Amazon AMI 32/64 Bits</title>
		<link>http://www.jomyut.net/2011/04/directadmin-with-amazon-ami-3264-bits.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=directadmin-with-amazon-ami-3264-bits</link>
		<comments>http://www.jomyut.net/2011/04/directadmin-with-amazon-ami-3264-bits.html#comments</comments>
		<pubDate>Tue, 19 Apr 2011 06:02:17 +0000</pubDate>
		<dc:creator>Scalopus+</dc:creator>
				<category><![CDATA[In the Cloud]]></category>

		<guid isPermaLink="false">http://www.jomyut.net/?p=147</guid>
		<description><![CDATA[This is guideline extend from previous general guideline to focus on the Amazon AMI 64 bits which based on CentOS/RHEL library. Instance Configuration on Tested Basic 32-bits Amazon Linux AMI 2011.02.1 Beta (AMI Id: ami-6ef08e3c) DirectAdmin License (CentOS 5 - 32 Bits) Micro instance 1 Elastic IP Address Pre-installation Now, continue with general guideline here.]]></description>
			<content:encoded><![CDATA[<p>This is guideline extend from previous general guideline to focus on the Amazon AMI 64 bits which based on CentOS/RHEL library.</p>
<p>Instance Configuration on Tested</p>
<ul>
<li>Basic 32-bits Amazon Linux AMI 2011.02.1 Beta (AMI Id: ami-6ef08e3c)</li>
<li>DirectAdmin License (CentOS 5 - 32 Bits)</li>
<li>Micro instance</li>
<li>1 Elastic IP Address</li>
</ul>
<p><strong>Pre-installation</strong></p>
<div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#pre-installed"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#pre-installed"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">Pre-installation command in Amazon AMI</a></td><td align="right"><a href="#pre-installed" onClick="javascript:wpsh_code(4)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#pre-installed" onClick="javascript:wpsh_print(4)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;">yum <span class="kw2">install</span> <span class="kw2">gcc</span> gcc-c++ <span class="kw2">flex</span> <span class="kw2">bison</span> <span class="kw2">make</span> <span class="kw3">bind</span> bind-libs bind-utils openssl openssl-devel <span class="kw2">perl</span> quota <span class="kw2">patch</span> <span class="kw2">screen</span><br />
<span class="co0"># Make a symbolic link of missing library for DirectAdmin binary file (WARNING: This is may not the correct way)</span><br />
<span class="kw2">ln</span> <span class="re5">-s</span> <span class="sy0">/</span>usr<span class="sy0">/</span>lib<span class="sy0">/</span>libcrypto.so <span class="sy0">/</span>usr<span class="sy0">/</span>lib<span class="sy0">/</span>libcrypto.so.6<br />
<span class="kw2">ln</span> <span class="re5">-s</span> <span class="sy0">/</span>usr<span class="sy0">/</span>lib<span class="sy0">/</span>libssl.so <span class="sy0">/</span>usr<span class="sy0">/</span>lib<span class="sy0">/</span>libssl.so.6</div></div></div>
<p>Now, continue with <a href="http://www.jomyut.net/2011/04/directadmin-in-the-amazon-ec2.html">general guideline here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jomyut.net/2011/04/directadmin-with-amazon-ami-3264-bits.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sed patterns &#8211; Streaming Editor Patterns</title>
		<link>http://www.jomyut.net/2011/04/sed-patterns-streaming-editor-patterns.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sed-patterns-streaming-editor-patterns</link>
		<comments>http://www.jomyut.net/2011/04/sed-patterns-streaming-editor-patterns.html#comments</comments>
		<pubDate>Fri, 15 Apr 2011 17:56:40 +0000</pubDate>
		<dc:creator>Scalopus+</dc:creator>
				<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://www.jomyut.net/?p=136</guid>
		<description><![CDATA[Patterns to change Serial number of DNS record DB sample of matched pattern,]]></description>
			<content:encoded><![CDATA[<p><strong>Patterns to change Serial number of DNS record DB</strong></p>
<div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Patterns to change Serial number of DNS record DB</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="co0"># sed command</span><br />
<span class="co0"># Looking for 10 digits of Date</span><br />
<span class="co0"># Replace All matched with 2011041501</span><br />
<span class="co0"># All file that end with .db</span><br />
<span class="kw2">sed</span> <span class="re5">-i</span> <span class="st_h">'s/201[0-9]\{7\}/2011041501/g'</span> <span class="sy0">*</span>.db</div></div></div>
<p>sample of matched pattern,</p>
<div id="wpshdo_6" class="wp-synhighlighter-outer"><div id="wpshdt_6" class="wp-synhighlighter-collapsed"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_6"></a><a id="wpshat_6" class="wp-synhighlighter-title" href="#codesyntax_6"  onClick="javascript:wpsh_toggleBlock(6)" title="Click to show/hide code block">cloud.mywebsite.in.th.db</a></td><td align="right"><a href="#codesyntax_6" onClick="javascript:wpsh_code(6)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_6" onClick="javascript:wpsh_print(6)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_6" class="wp-synhighlighter-inner" style="display: none;"><div class="text" style="font-family:monospace;">$TTL 14400<br />
@ &nbsp; &nbsp; &nbsp; IN &nbsp; &nbsp; &nbsp;SOA &nbsp; &nbsp; cloud.mywebsite.in.th. &nbsp; &nbsp; &nbsp;hostmaster.jomyut.net. (<br />
<span class="xtra ln-xtra">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2011041500<br /></span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 14400<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3600<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1209600<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 86400 )</div></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.jomyut.net/2011/04/sed-patterns-streaming-editor-patterns.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop DirectAdmin Instance on Amazon EC2</title>
		<link>http://www.jomyut.net/2011/04/stop-directadmin-instance-on-amazon-ec2.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=stop-directadmin-instance-on-amazon-ec2</link>
		<comments>http://www.jomyut.net/2011/04/stop-directadmin-instance-on-amazon-ec2.html#comments</comments>
		<pubDate>Fri, 15 Apr 2011 05:23:09 +0000</pubDate>
		<dc:creator>Scalopus+</dc:creator>
				<category><![CDATA[In the Cloud]]></category>

		<guid isPermaLink="false">http://www.jomyut.net/?p=133</guid>
		<description><![CDATA[This is things that you have to aware when you have to do something with a DirectAdmin instance. Stop DirectAdmin instance Private IP Address will be change when start the instance Symbolic link in /tmp must rebinding. Software that licensing by IP Address Software that licensing by MAC Address Use AWS console to rebind Elastic IP [...]]]></description>
			<content:encoded><![CDATA[<p>This is things that you have to aware when you have to do something with a DirectAdmin instance.</p>
<p>Stop DirectAdmin instance</p>
<ul>
<li>Private IP Address will be change when start the instance</li>
<li>Symbolic link in /tmp must rebinding.</li>
<li>Software that licensing by IP Address</li>
<li>Software that licensing by MAC Address</li>
<li>Use AWS console to rebind Elastic IP address back to the instance</li>
</ul>
<p>Warm Reboot DirectAdmin instance</p>
<ul>
<li>Running by `init 6`</li>
<li>Private IP is not changed.</li>
<li>local storage still mount to the volumn (ex. /mnt).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jomyut.net/2011/04/stop-directadmin-instance-on-amazon-ec2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limitation of DirectAdmin on Amazon EC2</title>
		<link>http://www.jomyut.net/2011/04/limitation-of-directadmin-on-amazon-ec2.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=limitation-of-directadmin-on-amazon-ec2</link>
		<comments>http://www.jomyut.net/2011/04/limitation-of-directadmin-on-amazon-ec2.html#comments</comments>
		<pubDate>Thu, 14 Apr 2011 00:51:01 +0000</pubDate>
		<dc:creator>Scalopus+</dc:creator>
				<category><![CDATA[In the Cloud]]></category>
		<category><![CDATA[AmazonEC2]]></category>
		<category><![CDATA[directadmin]]></category>

		<guid isPermaLink="false">http://www.jomyut.net/?p=129</guid>
		<description><![CDATA[This is some limitation of DirectAdmin when deploy in Amazon EC2. Experience with outbound packet from DirectAdmin. Every features that needs outbound connection in DirectAdmin will not work. This is because the DirectAdmin configuration will automatically use interfaces in DirectAdmin configuration (also present as DirectAdmin License). The known functions that not working properly such as [...]]]></description>
			<content:encoded><![CDATA[<p>This is some limitation of DirectAdmin when deploy in Amazon EC2.</p>
<p>Experience with outbound packet from DirectAdmin. Every features that needs outbound connection in DirectAdmin will not work. This is because the DirectAdmin configuration will automatically use interfaces in DirectAdmin configuration (also present as DirectAdmin License). The known functions that not working properly such as</p>
<ul>
<li>Automatic grab the license<br />
<span style="text-decoration: underline;">Workaround</span>: You have to use<span style="color: #008000;"> /usr/local/directadmin/scripts/getLicense.sh </span>to manually grab your license.</li>
<li>Auto DirectAdmin Update<br />
<span style="text-decoration: underline;">Workaround</span>: You have to use <span style="color: #008000;">/usr/local/directadmin/scripts/getDA.sh</span> to manually upgrade your DirectAdmin.</li>
<li>Multi Server for DNS Service<br />
<span style="text-decoration: underline;">Workaround</span>: None</li>
</ul>
<p>You cannot bind more than 1 ip address to each instance. You can have only 1 IP Address each instance.</p>
<ul>
<li>You cannot specific IP address to specific domain name. (Because you have only 1 IP Address).</li>
<li>You cannot use SSL with specific IP Address. You may use Shared SSL as normally.</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jomyut.net/2011/04/limitation-of-directadmin-on-amazon-ec2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DirectAdmin in the Amazon EC2</title>
		<link>http://www.jomyut.net/2011/04/directadmin-in-the-amazon-ec2.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=directadmin-in-the-amazon-ec2</link>
		<comments>http://www.jomyut.net/2011/04/directadmin-in-the-amazon-ec2.html#comments</comments>
		<pubDate>Tue, 12 Apr 2011 12:38:51 +0000</pubDate>
		<dc:creator>Scalopus+</dc:creator>
				<category><![CDATA[In the Cloud]]></category>
		<category><![CDATA[AmazonEC2]]></category>
		<category><![CDATA[directadmin]]></category>

		<guid isPermaLink="false">http://www.jomyut.net/?p=120</guid>
		<description><![CDATA[Everything is now pointing to the cloud, how about Shared web hosting service? Nowadays, Cloud computing had been talking wildly in the topic of IaaS (Infrastructure as a service) which reduce costs in the machines resources and maintenance costs. This tutorial provide guideline to make Shared web hosting service based on Amazon EC2. Assume that you [...]]]></description>
			<content:encoded><![CDATA[<p>Everything is now pointing to the cloud, how about Shared web hosting service? Nowadays, Cloud computing had been talking wildly in the topic of IaaS (Infrastructure as a service) which reduce costs in the machines resources and maintenance costs. This tutorial provide guideline to make Shared web hosting service based on Amazon EC2.</p>
<p>Assume that you already have Amazon AWS account. (If not, create one)</p>
<h3>Reserve one of the Elastic IP address</h3>
<p>In the most first step, you should reserved one elastic ip address. This ip address use to request for DirectAdmin license. You may wait for DirectAdmin license confirmation before continue in next step to save your EC2 instance costs.</p>
<h3>Setup Security Group</h3>
<p>Now, it is turn that you going to Amazon AWS Management Console, you have enable some ports to make your instance access from the Outside. You must add <span style="color: #800000;">DNS, 21 (FTP), 2222, SSH, SMTP, SMTPS, IMAP, IMAPS, HTTP, HTTPS</span> to your instance security policy. 2222 is known as DirectAdmin control panel default port.</p>
<h3>Create Amazon EC2 Instance</h3>
<p>When create an Amazon EC2 instance, I preferred to use <span style="text-decoration: underline;">Large</span> -- an instance type. that take you benefits from high-memory and compute units. If you willing to use small or tiny, you will experience with very slow during compile step. You may use Large instance and then change to Tiny/Small later when system has completed installation and it is ready to be use.</p>
<blockquote><p>Preferred : Large Amazon EC2 Instance</p></blockquote>
<p>in the <a href="http://blog.unixy.net/2009/06/running-directadmin-on-amazon-ec2-linux-solved/" target="_blank">reference topic</a>, they use CentOS x64. I have use Ubuntu 10.04 LTS x86 and it work well.</p>
<h3>Running Amazon Instance</h3>
<p>Once you created, run it and login to your instance. If you use Ubuntu 10.04 LTS x86 AMI from Amazon Community, you must use 'ubuntu' as username, and use authorized key when you created the instance. Now is step-by-step to install DirectAdmin</p>
<ul>
<li>Following DirectAdmin <a href="http://help.directadmin.com/item.php?id=354" target="_blank">Pre-requirement guideline</a> to install package that required by DirectAdmin. You also following the DirectAdmin installation guide here.</li>
</ul>
<div id="wpshdo_7" class="wp-synhighlighter-outer"><div id="wpshdt_7" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#pre-installed"></a><a id="wpshat_7" class="wp-synhighlighter-title" href="#pre-installed"  onClick="javascript:wpsh_toggleBlock(7)" title="Click to show/hide code block">Pre-installation command in RHEL/CentOS</a></td><td align="right"><a href="#pre-installed" onClick="javascript:wpsh_code(7)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#pre-installed" onClick="javascript:wpsh_print(7)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_7" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;">yum <span class="kw2">install</span> <span class="kw2">gcc</span> gcc-c++ <span class="kw2">flex</span> <span class="kw2">bison</span> <span class="kw2">make</span> <span class="kw3">bind</span> bind-libs bind-utils openssl openssl-devel <span class="kw2">perl</span> quota</div></div></div>
<div id="wpshdo_8" class="wp-synhighlighter-outer"><div id="wpshdt_8" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#pre-installed2"></a><a id="wpshat_8" class="wp-synhighlighter-title" href="#pre-installed2"  onClick="javascript:wpsh_toggleBlock(8)" title="Click to show/hide code block">Pre-installation command in Ubuntu/Debian</a></td><td align="right"><a href="#pre-installed2" onClick="javascript:wpsh_code(8)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#pre-installed2" onClick="javascript:wpsh_print(8)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_8" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw2">apt-get</span> <span class="kw2">install</span> <span class="kw2">gcc</span> <span class="kw2">g++</span> <span class="kw2">make</span> <span class="kw2">flex</span> <span class="kw2">bison</span> openssl libssl-dev <span class="kw2">perl</span> perl-base perl-modules libperl-dev libaio1 libaio-dev</div></div></div>
<ul>
<li>Get setup script from DirectAdmin<br />
<div id="wpshdo_9" class="wp-synhighlighter-outer"><div id="wpshdt_9" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_9"></a><a id="wpshat_9" class="wp-synhighlighter-title" href="#codesyntax_9"  onClick="javascript:wpsh_toggleBlock(9)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_9" onClick="javascript:wpsh_code(9)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_9" onClick="javascript:wpsh_print(9)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_9" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw2">wget</span> http:<span class="sy0">//</span>www.directadmin.com<span class="sy0">/</span>setup.sh </div></div></div></li>
<li>Remove bind-address from setup.sh script. Make it go though private interface (but it will be elastic IP address show up at DirectAdmin Licensing)<br />
<div id="wpshdo_10" class="wp-synhighlighter-outer"><div id="wpshdt_10" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_10"></a><a id="wpshat_10" class="wp-synhighlighter-title" href="#codesyntax_10"  onClick="javascript:wpsh_toggleBlock(10)" title="Click to show/hide code block">Shell command - Replace IP Address with empty characters</a></td><td align="right"><a href="#codesyntax_10" onClick="javascript:wpsh_code(10)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_10" onClick="javascript:wpsh_print(10)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_10" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw2">sed</span> <span class="re5">-i</span> <span class="st_h">'s/--bind-address=\$IP//;'</span> setup.sh</div></div></div></li>
<li>Attached Elastic IP Address to the instance interface<br />
<div id="wpshdo_11" class="wp-synhighlighter-outer"><div id="wpshdt_11" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_11"></a><a id="wpshat_11" class="wp-synhighlighter-title" href="#codesyntax_11"  onClick="javascript:wpsh_toggleBlock(11)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_11" onClick="javascript:wpsh_code(11)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_11" onClick="javascript:wpsh_print(11)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_11" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw2">ifconfig</span> eth0:0 inet <span class="re1">$YOUR_IP_ADDRESS_HERE</span> netmask 255.255.255.255 up</div></div></div></li>
<li>Running screen command to protect installation step from connection lost of your machine. this command will make Installation script running even you lost connection. (When you login back to the system can get back the previous session)<br />
<div id="wpshdo_12" class="wp-synhighlighter-outer"><div id="wpshdt_12" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_12"></a><a id="wpshat_12" class="wp-synhighlighter-title" href="#codesyntax_12"  onClick="javascript:wpsh_toggleBlock(12)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_12" onClick="javascript:wpsh_code(12)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_12" onClick="javascript:wpsh_print(12)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_12" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw2">screen</span> </div></div></div></li>
<li>Open the second terminal, We need to running one script parallel with installation process</li>
<li><strong>You may Replace this step with the next one</strong><br />
In the second terminal, be sure that you are root privilege and running following command<br />
<div id="wpshdo_13" class="wp-synhighlighter-outer"><div id="wpshdt_13" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_13"></a><a id="wpshat_13" class="wp-synhighlighter-title" href="#codesyntax_13"  onClick="javascript:wpsh_toggleBlock(13)" title="Click to show/hide code block">Shell command (Replace this code with the next one)</a></td><td align="right"><a href="#codesyntax_13" onClick="javascript:wpsh_code(13)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_13" onClick="javascript:wpsh_print(13)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_13" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw3">cd</span> <span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>directadmin<span class="sy0">/</span>scripts; <span class="kw1">while</span> <span class="br0">&#91;</span> <span class="kw2">true</span> <span class="br0">&#93;</span>; <span class="kw1">do</span> <span class="kw2">sed</span> <span class="re5">-i</span> <span class="st_h">'s/--bind-address=\$IP//; s/--bind-address=\${3}//;'</span> <span class="sy0">*</span>.sh <span class="sy0">&gt;</span> <span class="sy0">/</span>dev<span class="sy0">/</span>null <span class="sy0">&gt;</span> 2<span class="sy0">&amp;&gt;</span><span class="nu0">1</span>; <span class="kw2">sleep</span> <span class="nu0">1</span>; <span class="kw1">done</span></div></div></div><br />
This script will be execute itself in infinite loop. You just terminate when installation completed. This is because when you run setup script, it will be download some of setup script that inside have --bind-address paramter which make you cannot retrieve the destination.</li>
<li><strong>This step have replaced the previous one</strong>.<br />
<div id="wpshdo_14" class="wp-synhighlighter-outer"><div id="wpshdt_14" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_14"></a><a id="wpshat_14" class="wp-synhighlighter-title" href="#codesyntax_14"  onClick="javascript:wpsh_toggleBlock(14)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_14" onClick="javascript:wpsh_code(14)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_14" onClick="javascript:wpsh_print(14)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_14" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw2">sed</span> <span class="re5">-i</span> <span class="st_h">'s/tar xzf update.tar.gz/tar xzf update.tar.gz\n[JOMYUT]/'</span> setup.sh<br />
<span class="kw2">sed</span> <span class="re5">-i</span> <span class="st_h">'s/\[JOMYUT\]/sh fix-binding.sh/'</span> setup.sh<br />
<span class="kw3">echo</span> <span class="st0">&quot;cd /usr/local/directadmin/scripts/&quot;</span> <span class="sy0">&gt;</span> fix-binding.sh<br />
<span class="kw3">echo</span> <span class="st0">&quot;sed -i 's/--bind-address=\\<span class="es1">\$</span>IP//; s/--bind-address=\\<span class="es1">\$</span>{3}//;' *.sh&quot;</span> <span class="sy0">&gt;&gt;</span> fix-binding.sh<br />
<span class="kw2">chmod</span> <span class="nu0">755</span> fix-binding.sh</div></div></div></li>
<li>Back to the first terminal, running setup script<br />
<div id="wpshdo_15" class="wp-synhighlighter-outer"><div id="wpshdt_15" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_15"></a><a id="wpshat_15" class="wp-synhighlighter-title" href="#codesyntax_15"  onClick="javascript:wpsh_toggleBlock(15)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_15" onClick="javascript:wpsh_code(15)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_15" onClick="javascript:wpsh_print(15)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_15" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;">.<span class="sy0">/</span>setup.sh <span class="re1">$CLIENT_ID</span> <span class="re1">$LICENSE_ID</span> <span class="re1">$YOUR_HOSTNAME</span> eth0:0 <span class="re1">$ELASTIC_IP</span></div></div></div><br />
<span style="text-decoration: underline;">Replace</span> $CLIENT_ID with your client id received in DirectAdmin license<br />
<span style="text-decoration: underline;">Replace</span> $LICENSE_ID with your license id received in DirectAdmin license<br />
<span style="text-decoration: underline;">Replace</span> $YOUR_HOSTNAME with your hostname of this machine that you want<br />
<span style="text-decoration: underline;">Replace</span> $ELASTIC_IP with your elastic ip that you binding to current instance</li>
<li></li>
</ul>
<h3>Finalize Step</h3>
<p>After completed the installation, you have to add ec2-user or ssh user back into /etc/ssh/sshd_config file. this is because DirectAdmin installation have change it. Just put your username in the last line. otherwise, the next time you will not able access SSH by your username. However, if you forget this step, you may use Administrator username that DirectAdmin provide on the final setup screen.</p>
<p>You may reconfigure the PHP temporary file path, PHP session path to the local storage. This configuration will help you save costs from EBS I/O but remembered that any data in local storage will be lost when stop the instance. So, remember to use it as temporary file only.</p>
<h3>Boot script</h3>
<ul>
<li>If you customize the machine such as PHP tmp path, PHP session path, you have to make a script that make temporary folder in local storage everytime that restart the instance. Any data in local storage will be lost when stop the instance. if you use `init 6` to restart your instance, data will still in your local storage.</li>
<li>Wake up your License Ethernet connection when restart machine Set up your IP address in the /etc/interfaces to make it binding when startup the instance<br />
<div id="wpshdo_16" class="wp-synhighlighter-outer"><div id="wpshdt_16" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_16"></a><a id="wpshat_16" class="wp-synhighlighter-title" href="#codesyntax_16"  onClick="javascript:wpsh_toggleBlock(16)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_16" onClick="javascript:wpsh_code(16)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_16" onClick="javascript:wpsh_print(16)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_16" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw3">cd</span> <span class="sy0">/</span>etc<span class="sy0">/</span>network<br />
<span class="kw3">echo</span> <span class="st0">&quot;auto eth0:0&quot;</span> <span class="sy0">&gt;&gt;</span> interfaces<br />
<span class="kw3">echo</span> <span class="st0">&quot;iface eth0:0 inet static&quot;</span> <span class="sy0">&gt;&gt;</span> interfaces<br />
<span class="kw3">echo</span> <span class="st0">&quot;address <span class="es2">$YOUR_ELASTIC_IP</span>&quot;</span> <span class="sy0">&gt;&gt;</span> interfaces<br />
<span class="kw3">echo</span> <span class="st0">&quot;netmask 255.255.255.255&quot;</span> <span class="sy0">&gt;&gt;</span> interfaces</div></div></div></li>
<li></li>
</ul>
<h3>Test Running</h3>
<p>Now, reboot! Hurey!, you may test your control panel after restart the instance, try login to your Control Panel.</p>
<h3>Change Apache Template</h3>
<p>At the time I wrote this guideline, Amazon can have only 1 Elastic IP per instance. Any incoming package will sent to internal ip address. This make a problem with default Apache config which handle each IP address in its configuration. So, we change /etc/httpd/conf/ips.conf to be global address instead of per IP address.</p>
<div id="wpshdo_17" class="wp-synhighlighter-outer"><div id="wpshdt_17" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_17"></a><a id="wpshat_17" class="wp-synhighlighter-title" href="#codesyntax_17"  onClick="javascript:wpsh_toggleBlock(17)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_17" onClick="javascript:wpsh_code(17)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_17" onClick="javascript:wpsh_print(17)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_17" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw2">sed</span> <span class="re5">-i</span> <span class="st_h">'s/\s.*:/ \*:/'</span> <span class="sy0">/</span>etc<span class="sy0">/</span>httpd<span class="sy0">/</span>conf<span class="sy0">/</span>ips.conf</div></div></div>
<p>However, in any users created, it will also use IP address, so, we have to change httpd template where is in /usr/local/directadmin/data/templates/</p>
<div id="wpshdo_18" class="wp-synhighlighter-outer"><div id="wpshdt_18" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_18"></a><a id="wpshat_18" class="wp-synhighlighter-title" href="#codesyntax_18"  onClick="javascript:wpsh_toggleBlock(18)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_18" onClick="javascript:wpsh_code(18)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_18" onClick="javascript:wpsh_print(18)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_18" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw3">cd</span> <span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>directadmin<span class="sy0">/</span>data<span class="sy0">/</span>templates<span class="sy0">/</span><br />
<span class="kw2">find</span> . <span class="re5">-name</span> <span class="st0">&quot;*virtual_host*&quot;</span> <span class="re5">-exec</span> <span class="kw2">sed</span> <span class="re5">-i</span> <span class="st_h">'s/|IP|/\*/'</span> <span class="st_h">'{}'</span> \;<br />
<span class="kw2">find</span> . <span class="re5">-name</span> <span class="st0">&quot;*virtual_host*&quot;</span> <span class="re5">-exec</span> <span class="kw2">sed</span> <span class="re5">-i</span> <span class="st_h">'s/|MULTI_IP|//'</span> <span class="st_h">'{}'</span> \;</div></div></div>
<p>The above command will replace all IP address in every apache template to be global (*). and remove |MULTI_IP| because you cannot use this features.</p>
<p>Now, try to create new user account and test.</p>
<h3>Watch Out</h3>
<p>the directory /usr/local/directadmin/data/templates/ will be replaced when get DirectAdmin update. you should backup whole directory and replace back after update your DirectAdmin.</p>
<p>Done.</p>
<p><span style="color: #008000;">[Update on 20 Apr 2011]</span> setup.sh - add enhancement for detect update.tar.gz extraction.<br />
TODO: /templates/custom in the last section<br />
TODO: Add full EC2 management script to the entry</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jomyut.net/2011/04/directadmin-in-the-amazon-ec2.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Install PHP 5.2/5.3 in the same machine</title>
		<link>http://www.jomyut.net/2011/04/install-php-5-25-3-in-the-same-machine.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=install-php-5-25-3-in-the-same-machine</link>
		<comments>http://www.jomyut.net/2011/04/install-php-5-25-3-in-the-same-machine.html#comments</comments>
		<pubDate>Mon, 11 Apr 2011 06:38:15 +0000</pubDate>
		<dc:creator>Scalopus+</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[custombuild]]></category>
		<category><![CDATA[directadmin]]></category>

		<guid isPermaLink="false">http://www.jomyut.net/?p=99</guid>
		<description><![CDATA[This is solution for DirectAdmin machine owner who would like to use both version of PHP5 in their system. First, you may see reference topic here and here. To install both PHP versions with custombuild, you are require to trick the DirectAdmin with PHP6 configuration because DirectAdmin itself doesn't support both PHP5 working at the same [...]]]></description>
			<content:encoded><![CDATA[<p>This is solution for <span style="text-decoration: underline;">DirectAdmin machine owner</span> who would like to use both version of PHP5 in their system. First, you may see reference topic <a href="http://www.directadmin.com/forum/showthread.php?t=39017">here</a> and <a href="http://www.directadmin.com/forum/showthread.php?t=35175&amp;mode=linear">here</a>. To install both PHP versions with custombuild, you are require to trick the DirectAdmin with PHP6 configuration because DirectAdmin itself doesn't support both PHP5 working at the same time.</p>
<h3>One solution to choice</h3>
<p>In the solution I provided, I make PHP5.3 as default compiler running as CLI. and PHP 5.2 can be optional used with .htaccess level configuration. (running by suPHP)</p>
<ol>
<li>Change the custombuild build script to version 1.2<br />
<div id="wpshdo_19" class="wp-synhighlighter-outer"><div id="wpshdt_19" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_19"></a><a id="wpshat_19" class="wp-synhighlighter-title" href="#codesyntax_19"  onClick="javascript:wpsh_toggleBlock(19)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_19" onClick="javascript:wpsh_code(19)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_19" onClick="javascript:wpsh_print(19)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_19" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw3">cd</span> <span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>directadmin<span class="sy0">/</span>custombuild<span class="sy0">/</span><br />
.<span class="sy0">/</span>build <span class="kw1">set</span> custombuild <span class="nu0">1.2</span></div></div></div></li>
<li>Change automatic download new versions.txt to be No.<br />
<div id="wpshdo_20" class="wp-synhighlighter-outer"><div id="wpshdt_20" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_20"></a><a id="wpshat_20" class="wp-synhighlighter-title" href="#codesyntax_20"  onClick="javascript:wpsh_toggleBlock(20)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_20" onClick="javascript:wpsh_code(20)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_20" onClick="javascript:wpsh_print(20)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_20" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;">.<span class="sy0">/</span>build <span class="kw1">set</span> autover no</div></div></div>Later, explained.</li>
<li>Build update and copy PHP5 configuration to PHP6 custombuild path<br />
<div id="wpshdo_21" class="wp-synhighlighter-outer"><div id="wpshdt_21" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_21"></a><a id="wpshat_21" class="wp-synhighlighter-title" href="#codesyntax_21"  onClick="javascript:wpsh_toggleBlock(21)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_21" onClick="javascript:wpsh_code(21)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_21" onClick="javascript:wpsh_print(21)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_21" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;">.<span class="sy0">/</span>build update<br />
<span class="kw2">mkdir</span> <span class="re5">-p</span> custom<span class="sy0">/</span>suphp<br />
<span class="kw2">cp</span> <span class="re5">-pf</span> configure<span class="sy0">/</span>suphp<span class="sy0">/</span>configure.php5 custom<span class="sy0">/</span>suphp<span class="sy0">/</span>configure.php6</div></div></div></li>
<li>For me, I implement PHP5.3 running as CLI and PHP5.2 as CGI by suPHP. This is difference from referenced topic<br />
<div id="wpshdo_22" class="wp-synhighlighter-outer"><div id="wpshdt_22" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_22"></a><a id="wpshat_22" class="wp-synhighlighter-title" href="#codesyntax_22"  onClick="javascript:wpsh_toggleBlock(22)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_22" onClick="javascript:wpsh_code(22)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_22" onClick="javascript:wpsh_print(22)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_22" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw2">perl</span> <span class="re5">-pi</span> <span class="re5">-e</span> <span class="st_h">'s/php5\:/phprep\:/'</span> versions.txt<br />
<span class="kw2">perl</span> <span class="re5">-pi</span> <span class="re5">-e</span> <span class="st_h">'s/php6/php5/'</span> versions.txt<br />
<span class="kw2">perl</span> <span class="re5">-pi</span> <span class="re5">-e</span> <span class="st_h">'s/phprep/php6/'</span> versions.txt</div></div></div></li>
<li>Set build options<br />
<div id="wpshdo_23" class="wp-synhighlighter-outer"><div id="wpshdt_23" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_23"></a><a id="wpshat_23" class="wp-synhighlighter-title" href="#codesyntax_23"  onClick="javascript:wpsh_toggleBlock(23)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_23" onClick="javascript:wpsh_code(23)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_23" onClick="javascript:wpsh_print(23)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_23" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;">.<span class="sy0">/</span>build <span class="kw1">set</span> php5_ver 5.3<br />
.<span class="sy0">/</span>build <span class="kw1">set</span> php6_cgi <span class="kw2">yes</span><br />
.<span class="sy0">/</span>build <span class="kw1">set</span> php6_cli no<br />
.<span class="sy0">/</span>build <span class="kw1">set</span> php5_cgi no<br />
.<span class="sy0">/</span>build <span class="kw1">set</span> php5_cli <span class="kw2">yes</span></div></div></div><br />
Note that php6 is a configuration for PHP 5.2 and PHP5 is a configuration for PHP 5.3 and running as default engine.</li>
<li>Build both PHP versions.<br />
<div id="wpshdo_24" class="wp-synhighlighter-outer"><div id="wpshdt_24" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_24"></a><a id="wpshat_24" class="wp-synhighlighter-title" href="#codesyntax_24"  onClick="javascript:wpsh_toggleBlock(24)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_24" onClick="javascript:wpsh_code(24)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_24" onClick="javascript:wpsh_print(24)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_24" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;">.<span class="sy0">/</span>build php n</div></div></div></li>
<li> Change path of the PHP 5.2 package</li>
</ol>
<p>Now, below is a configuration for PHP 5.2 based website. you have to put these code in .htaccess to root of public_html directory</p>
<div id="wpshdo_25" class="wp-synhighlighter-outer"><div id="wpshdt_25" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_25"></a><a id="wpshat_25" class="wp-synhighlighter-title" href="#codesyntax_25"  onClick="javascript:wpsh_toggleBlock(25)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_25" onClick="javascript:wpsh_code(25)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_25" onClick="javascript:wpsh_print(25)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_25" class="wp-synhighlighter-inner" style="display: block;"><div class="apache" style="font-family:monospace;">&lt;<span class="kw3">FilesMatch</span> <span class="st0">&quot;<span class="es0">\.</span>php$&quot;</span>&gt;<br />
<span class="kw1">AddHandler</span> x-httpd-php6 .php<br />
&lt;/<span class="kw3">FilesMatch</span>&gt;</div></div></div>
<p>if you don't like to use x-httpd-php6, you may change to x-httpd-php52 or somewhat you want. but you have to config below files</p>
<pre dir="ltr"><div id="wpshdo_26" class="wp-synhighlighter-outer"><div id="wpshdt_26" class="wp-synhighlighter-expanded"><table class="titleblock" border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_26"></a><a id="wpshat_26" class="wp-synhighlighter-title" href="#codesyntax_26"  onClick="javascript:wpsh_toggleBlock(26)" title="Click to show/hide code block">Shell command</a></td><td align="right"><a href="#codesyntax_26" onClick="javascript:wpsh_code(26)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/code.png" /></a>&nbsp;<a href="#codesyntax_26" onClick="javascript:wpsh_print(26)" title="Print code"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/printer.png" /></a>&nbsp;<a href="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.jomyut.net/wp-content/plugins/wp-synhighlight/themes/jomyut/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_26" class="wp-synhighlighter-inner" style="display: block;"><div class="bash" style="font-family:monospace;"><span class="kw2">perl</span> <span class="re5">-pi</span> <span class="re5">-e</span> <span class="st_h">'s/x-httpd-php6/x-httpd-php52/'</span> <span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>suphp<span class="sy0">/</span>etc<span class="sy0">/</span>suphp.conf<br />
<span class="kw2">perl</span> <span class="re5">-pi</span> <span class="re5">-e</span> <span class="st_h">'s/x-httpd-php6/x-httpd-php52/'</span> <span class="sy0">/</span>etc<span class="sy0">/</span>httpd<span class="sy0">/</span>conf<span class="sy0">/</span>extra<span class="sy0">/</span>httpd-suphp.conf</div></div></div></pre>
<p>Now, you can use website with PHP 5.2 and PHP 5.3 upon .htaccess configuration.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jomyut.net/2011/04/install-php-5-25-3-in-the-same-machine.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Netbean : Selected PHPUnit (version ?.?.?) is too old</title>
		<link>http://www.jomyut.net/2010/12/netbean-selected-phpunit-version-is-too-old.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=netbean-selected-phpunit-version-is-too-old</link>
		<comments>http://www.jomyut.net/2010/12/netbean-selected-phpunit-version-is-too-old.html#comments</comments>
		<pubDate>Wed, 15 Dec 2010 13:32:04 +0000</pubDate>
		<dc:creator>Scalopus+</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[netbean]]></category>
		<category><![CDATA[phpunit]]></category>

		<guid isPermaLink="false">http://www.jomyut.net/?p=77</guid>
		<description><![CDATA[If you experience with error message from Netbean "Selected PHPUnit (version ?.?.?) is too old, upgrade it if possible". you may set your PHP configuration file incorrected. Try add Windows Environment variables PHPRC - Specific location of your PHP configuration file. PATH - add Path of your PHP execution file. Try command line at your [...]]]></description>
			<content:encoded><![CDATA[<p>If you experience with error message from Netbean "Selected PHPUnit (version ?.?.?) is too old, upgrade it if possible". you may set your PHP configuration file incorrected.</p>
<div id="attachment_78" class="wp-caption alignnone" style="width: 410px"><a href="http://www.jomyut.net/uploads/2010/12/phpunit.png"><img class="size-thumbnail wp-image-78" title="Netbean - PHPUnit Setting" src="http://www.jomyut.net/uploads/2010/12/phpunit-400x270.png" alt="" width="400" height="270" /></a><p class="wp-caption-text">Configure the PHPUnit in Netbean 6.9.1</p></div>
<p>Try add Windows Environment variables</p>
<ul>
<li><strong>PHPRC</strong> - Specific location of your PHP configuration file.</li>
<li><strong>PATH</strong> - add Path of your PHP execution file.</li>
</ul>
<p>Try command line at your PHP binary directory</p>
<p>&gt; phpunit</p>
<p>Verify that you MUST see manual page of phpunit command, otherwise, I may experience with your PEAR download problem. Try re-install them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jomyut.net/2010/12/netbean-selected-phpunit-version-is-too-old.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPUnit + Selenium = Code Coverage Report</title>
		<link>http://www.jomyut.net/2010/11/phpunit-selenium-code-coverage-report.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=phpunit-selenium-code-coverage-report</link>
		<comments>http://www.jomyut.net/2010/11/phpunit-selenium-code-coverage-report.html#comments</comments>
		<pubDate>Tue, 16 Nov 2010 10:31:31 +0000</pubDate>
		<dc:creator>Scalopus+</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[codecoverage]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[yiiframework]]></category>

		<guid isPermaLink="false">http://www.jomyut.net/?p=73</guid>
		<description><![CDATA[โดยปกติ PHPUnit ซึ่งใช้ทำ Unit test นั้น จะไม่สามารถทำการทดสอบผ่านเว็บบราวเซอร์ตรงๆได้ ดังนั้น ถ้าหากใช้รูปแบบการพัฒนาโปรแกรมแบบ MVC อาจจะทำการทดสอบได้เฉพาะ Model เท่านั้น หากจะทดสอบ View / Control ต้องใช้เครื่องมือคือ Selenium ในการทำการทดสอบผ่านหน้าเว็บบราวเซอร์ ดังนั้น ถ้าเราต้องการสร้าง Code Coverage Report ขึ้นมา จะต้องทำผ่าน Selenium Interface ด้วย. ผมได้เขียน Guideline ในการสร้าง Code Coverage Report กับ Yii Framework ไว้ที่ Yii Framework Forum ครับ รายละเอียดสามารถตามอ่านได้ตามลิงค์ เครื่องมือที่ผมใช้พัฒนา PHP ประกอบด้วย Apache 2 Windows 7 Netbeans 6.9.1 พร้อมกับ [...]]]></description>
			<content:encoded><![CDATA[<p>โดยปกติ PHPUnit ซึ่งใช้ทำ Unit test นั้น จะไม่สามารถทำการทดสอบผ่านเว็บบราวเซอร์ตรงๆได้ ดังนั้น ถ้าหากใช้รูปแบบการพัฒนาโปรแกรมแบบ MVC อาจจะทำการทดสอบได้เฉพาะ Model เท่านั้น หากจะทดสอบ View / Control ต้องใช้เครื่องมือคือ Selenium ในการทำการทดสอบผ่านหน้าเว็บบราวเซอร์</p>
<p>ดังนั้น ถ้าเราต้องการสร้าง <strong><span style="color: #3366ff;">Code Coverage Report</span></strong> ขึ้นมา จะต้องทำผ่าน Selenium Interface ด้วย. ผมได้เขียน Guideline ในการสร้าง Code Coverage Report กับ Yii Framework ไว้ที่ <a href="http://www.yiiframework.com/forum/index.php?/topic/13210-installation-guideline-to-make-code-coverage-report-with-yii/page__p__64752#entry64752">Yii Framework Forum</a> ครับ รายละเอียดสามารถตามอ่านได้ตามลิงค์</p>
<p>เครื่องมือที่ผมใช้พัฒนา PHP ประกอบด้วย</p>
<ul>
<li>Apache 2</li>
<li>Windows 7</li>
<li>Netbeans 6.9.1 พร้อมกับ Selenium Plugin</li>
<li>PHP 5.3 กับ XDebug module</li>
<li>PEAR/PHPUnit</li>
</ul>
<p>จริงๆ แล้วใน Netbeans website มี <a href="http://www.phpunit.de/manual/current/en/selenium.html">Tutorial</a> อยู่เช่นกัน แต่ว่า ในส่วนนี้ ผมจะแนะนำสำหรับคนที่ทำเวอร์ชวลโฮส ที่มีเว็บไซต์หลายๆเว็บไซต์ภายในเครื่อง. แนะนำให้ทำเฉพาะเครื่องสำหรับ Development เท่านั้น สำหรับ Production server จะทำให้ช้าลงมาก ไม่แนะนำ</p>
<p>ก่อนอื่น ทำการแก้ไขไฟล์ ดังรายละเอียดด้านล่างนี้</p>
<p><strong>File</strong>: %PEAR_Directory%/PHPUnit/Extensions/SeleniumTestCase/prepend.php</p>
<blockquote>
<pre>// $GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'] = FALSE;
$GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'] = $_SERVER["DOCUMENT_ROOT"] ;</pre>
</blockquote>
<p><strong>File</strong>: %PEAR_Directory%/PHPUnit/Extensions/SeleniumTestCase/phpunit_coverage.php</p>
<blockquote>
<pre>//$GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'] = getcwd();
$GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'] = $_SERVER["DOCUMENT_ROOT"] ;</pre>
</blockquote>
<p><strong>File</strong>: php.ini (ไฟล์ Configuration ของ PHP)</p>
<blockquote>
<pre>; Automatically add files before PHP document.
auto_prepend_file = "D:\Service\var\scripts\PHPUnit\Extensions\SeleniumTestCase\prepend.php"

; Automatically add files after PHP document.
auto_append_file = "D:\Service\var\scripts\PHPUnit\Extensions\SeleniumTestCase\append.php"</pre>
</blockquote>
<p><strong>File</strong>: httpd.conf (ไฟล์ Configuration ของ Apache2)</p>
<blockquote>
<pre>&lt;Directory "D:/Service/var/scripts"&gt;
  Options FollowSymLinks Indexes
  Allow from all
  Order allow,deny
  AllowOverride All
&lt;/Directory&gt;</pre>
</blockquote>
<p>ขั้นตอนต่อไป เป็นขั้นตอนสำหรับทำให้ไดเรกทอรี่ดังกล่าว สามารถใช้ได้ในเว็บไซต์ใดๆ ที่อยู่ในเครื่อง</p>
<p><strong>File</strong>: httpd.conf (ไฟล์ Configuration ของ Apache2)</p>
<blockquote>
<pre># LoadModule alias_module modules/mod_alias.so
LoadModule alias_module modules/mod_alias.so</pre>
<pre>
<pre>&lt;IfModule alias_module&gt;
#  ScriptAlias /cgi-bin/ "E:/Service/Process/Apache2.2/cgi-bin/"
        Alias /selenium-phpunit/ "D:/Service/var/scripts/PHPUnit/Extensions/SeleniumTestCase/"
&lt;/IfModule&gt;</pre>
</pre>
</blockquote>
<p>ต่อมาขั้นตอนสำคัญ อย่าลืม Restart Apache 2 service</p>
<p>ต่อจากนี้เป็นขั้นตอนเพิ่มเติมสำหรับ Yii Framework</p>
<p><strong>File</strong>: %YiiFramework%/protected/test/WebTest.php</p>
<blockquote>
<pre>// Add this to class
protected $coverageScriptUrl = 'http://your.localhost./selenium-phpunit/phpunit_coverage.php';</pre>
</blockquote>
<p>จากนั้นอย่าลืมตรวจสอบไฟล์ phpunit.xml ให้ทำการสร้าง Code Coverage report เมื่อมีการทำการทดสอบ</p>
<p><strong>File</strong>: %YiiFramework%/protected/test/phpunit.xml</p>
<blockquote>
<pre>&lt;logging&gt;
&lt;log type="coverage-html" target="%YiiFramework%\protected\tests\coverage" charset="UTF-8" yui="true" highlight="true" lowUpperBound="35" highLowerBound="70" /&gt;
&lt;/logging&gt;</pre>
</blockquote>
<p>เสร็จครับ หมดแล้ว หลังจากนั้น เริ่มใช้งานได้เลย</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jomyut.net/2010/11/phpunit-selenium-code-coverage-report.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

