<?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>For the Developer &#187; development</title>
	<atom:link href="http://forthedeveloper.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://forthedeveloper.com</link>
	<description>By Developers, For Developers</description>
	<lastBuildDate>Tue, 20 Jul 2010 23:54:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Local Host Entries on OS X Snow Leopard</title>
		<link>http://forthedeveloper.com/2009/local-host-entries-snow-leopard/</link>
		<comments>http://forthedeveloper.com/2009/local-host-entries-snow-leopard/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 03:35:23 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=146</guid>
		<description><![CDATA[Today I wanted to setup local host entries on my MacBook. Searching around I found several articles about editing the /private/etc/hosts file to add local domains entries pointing back to my computer. I don&#8217;t know if it is something that changed with Leopard or Snow Leopard but it just wasn&#8217;t working for me. Even restarting [...]]]></description>
			<content:encoded><![CDATA[<p>Today I wanted to setup local host entries on my MacBook. Searching around I found several articles about editing the <code>/private/etc/hosts</code> file to add local domains entries pointing back to my computer. I don&#8217;t know if it is something that changed with Leopard or Snow Leopard but it just wasn&#8217;t working for me. Even restarting the computer was a no go.</p>
<p><span id="more-146"></span></p>
<h3>Using the dscl Utility</h3>
<p>With the wonder of Google searching and the <a href="http://www.andyjarrett.com/blog/index.php/2007/11/1/NetInfo-manager-and-HOST-file-in-Leopard/">generous comments</a> of others I found out about the <code>dscl</code> utility.</p>
<h4>Listing Host Entries</h4>
<p>To see what is listed for your hosts at any time just run this command:</p>
<blockquote><p><code>dscl localhost -readall /Local/Default/Hosts</code></p></blockquote>
<h4>Adding a New Entry</h4>
<p>In this example I am going to have the <code>snow.ftd</code> host point to my <code>127.0.0.1</code> IP address:</p>
<blockquote><p><code>sudo dscl localhost -create /Local/Default/Hosts/snow.ftd IPAddress 127.0.0.1</code></p></blockquote>
<p>You should now be able to <code>ping snow.ftd</code> and have it resolve to your local computer.</p>
<h4>Removing an Existing Entry</h4>
<p>If you decide you do not want an entry anymore just run this command to remove it:</p>
<blockquote><p><code>sudo dscl localhost -delete /Local/Default/Hosts/snow.ftd</code></p></blockquote>
<h4>Reading the BSD Flat File</h4>
<p>It was also noted that you can read the BSD flat file using this command:</p>
<blockquote><p><code>dscl localhost -readall /BSD/local/Hosts</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2009/local-host-entries-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ColdFusion Development using VirtualBox and Ubuntu 9.10</title>
		<link>http://forthedeveloper.com/2009/coldfusion-virtualbox-and-ubuntu/</link>
		<comments>http://forthedeveloper.com/2009/coldfusion-virtualbox-and-ubuntu/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 19:29:41 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=123</guid>
		<description><![CDATA[Here is how I setup a VirtualBox Virtual Machine (VM) running Ubuntu 9.10 Server edition for ColdFusion development on my MacBook Pro. Step 1: Download Needed Files The first step is to download all the files you will need. Since the downloads usually take some time we&#8217;ll get them out of the way first. For [...]]]></description>
			<content:encoded><![CDATA[<p>Here is how I setup a <a title="VirtualBox" href="http://www.virtualbox.org/">VirtualBox</a> Virtual Machine (VM) running <a title="Ubuntu" href="http://www.ubuntu.com/">Ubuntu 9.10</a> Server edition for <a title="Adobe ColdFusion" href="http://www.adobe.com/products/coldfusion/">ColdFusion</a> development on my MacBook Pro.</p>
<p><span id="more-123"></span></p>
<h3>Step 1: Download Needed Files</h3>
<p>The first step is to download all the files you will need. Since the downloads usually take some time we&#8217;ll get them out of the way first.</p>
<p>For my installation I wanted to get more familiar with the Server edition of Ubuntu and to require fewer resources. You should be able to do a similar installation with the Desktop edition.</p>
<ul>
<li><strong>Download VirtualBox</strong> &#8211; The <a title="VirtualBox Downloads" href="http://www.virtualbox.org/wiki/Downloads">official VirtualBox download page</a>.</li>
<li><strong>Download Ubuntu</strong> &#8211; To download the Server edition you will need to <a title="Ubuntu Download Mirrors" href="http://www.ubuntu.com/getubuntu/downloadmirrors#mirrors">find a mirror</a> that hosts the installer images. Once you find a mirror navigate to the 9.10 directory and find the download link for the <code>ubuntu-9.10-server-i386.iso</code> file.</li>
<li><strong>Download ColdFusion</strong> &#8211; The <a title="ColdFusion Edition Downloads" href="http://www.adobe.com/products/coldfusion/editions/">official Developer Edition Download</a> is available on the <a title="Adobe ColdFusion" href="http://www.adobe.com/products/coldfusion/">Adobe ColdFusion</a> page. Download the Linux 32 bit installer.</li>
</ul>
<h3>Step 2: Install VirtualBox</h3>
<p>Once you have downloaded all the files, run the VirtualBox installer.</p>
<p>If you would like to learn more about VirtualBox the installation comes with a user manual or you can download a pdf copy from their <a title="VirtualBox Downloads" href="http://www.virtualbox.org/wiki/Downloads">download page</a>.</p>
<h3>Step 3: Create an Ubuntu Virtual Machine</h3>
<p>Click the <code>New</code> icon in VirtualBox to start the wizard for adding a new VM.</p>
<ol>
<li>Click <code>Next</code> to start the wizard.</li>
<li>Enter <code>Ubuntu CF</code> for the <code>Name</code> of the VM.</li>
<li>Select <code>Linux</code> and <code>Ubuntu</code> in the <code>OS Type</code> drop downs.</li>
<li>Click <code>Next</code>.</li>
<li>Click <code>Next</code> to accept the default amount of RAM. (You can adjust if you want to&#8230;)</li>
<li>Click <code>Next</code> to create a new hard disk image to use for the VM.
<ol>
<li>Click <code>Next</code> to start the wizard .</li>
<li>Click <code>Next</code> to create a dynamically expanding storage.</li>
<li>Click <code>Next</code> to accept the default name and size.</li>
<li>Click <code>Finish</code> to accept the choices for the disk image.</li>
</ol>
</li>
<li>Click <code>Finish</code> to end the wizard.</li>
</ol>
<h3>Step 4: Install Ubuntu</h3>
<p>Now that there is a VM setup to hold the guest Ubuntu system we need to install Ubuntu on it.</p>
<p>In VirtualBox Double Click on the <code>Ubuntu CF</code> listed in the left column to start up the VM. Since this is the first time you are starting the VM it will bring a up a First Run Wizard to guide you in setting up the new VM.</p>
<ol>
<li>Click <code>Next</code> to start the wizard.</li>
<li>Change the <code>Media Source</code> to <code>Image File</code> and click the <code>Other...</code> icon.
<ol>
<li>Click the <code>Add</code> icon along the top.</li>
<li>Select the <code>ubuntu-9.10-server-i386.iso</code> file we downloaded earlier.</li>
<li>Click <code>Select</code> with the <code>ubuntu-9.10-server-i386.iso</code> item selected.</li>
</ol>
</li>
<li>Click <code>Next</code> to continue.</li>
<li>Click <code>Finish</code> to end the wizard.</li>
</ol>
<p>The VM should now startup and bring up the installation the Ubuntu. I&#8217;m not going to go into the details of installing Ubuntu here, so just continue with the next step once Ubuntu installation is complete. Also, since we are going to be using apache you may wish to have the setup create a LAMP server configuration when choosing features or you can install it manually afterwards.</p>
<h3>Step 5: Setup Guest Additions</h3>
<p>In order to have the Shared Folders work we will need to install the Guest Additions.</p>
<p>Before we install the Guest Additions we will need to install dkms:</p>
<pre style="padding-left: 30px; ">sudo apt-get install dkms</pre>
<p>To mount the Guest Additions disc image to the VM press <code>Command + D</code> or select <code>Devices &gt; Install Guest Additions...</code> from the VM menu. Then install the Guest Additions by running:</p>
<pre style="padding-left: 30px; ">cd /cdrom</pre>
<pre style="padding-left: 30px; ">sudo sh ./VBoxLinuxAdditions-x86.run</pre>
<h3>Step 6: Setup Shared Folders</h3>
<p>One of the goals when creating the virtual machine was to be able to edit the files natively but run them on the guest operating system that reflects the production environment.</p>
<p>With shared folders we are able to use a local directory as a share on the guest VM.</p>
<p>Before we add the shared folder we need to have a folder to share. For this example I&#8217;m using the directory I created at <code>/Users/randy/Documents/cf9/</code>.</p>
<p>With the VM powered off edit the <code>Settings</code> and select the <code>Shared Folder</code> icon.</p>
<ol>
<li>Click the <code>Add a new shared folder definition</code> icon on the right side.</li>
<li>Enter the <code>Folder Path</code> (<code>/Users/randy/Documents/cf9/</code>) or select <code>Other...</code> from the drop down and locate the directory.</li>
<li>Enter the name you would like the share to be referenced as in the <code>Folder Name</code> field. In this case I am going to call it <code>cf9</code>.</li>
</ol>
<p>Now that we have the shared folder available to the VM we want it to mount the share each time the VM starts. To do this we startup the Ubuntu VM and edit the <code>/etc/fstab</code> file and add the following line at the end of the file (note that you will need to change the username to match your user):</p>
<pre style="padding-left: 30px;"><code>cf9	/home/randy/Documents/cf9	vboxsf	uid=randy,gid=users	0	0</code></pre>
<p>You will also need to create a blank directory at <code>/home/randy/Documents/cf9</code> that the share will mount to.</p>
<p>The next time your VM is started it should have access to <code>/Users/randy/Documents/cf9</code> on the host machine at <code>/home/randy/Documents/cf9</code> on the guest machine.</p>
<h3>Step 7: Enable Port Forwarding</h3>
<p>To setup the port forwarding you will need to stop the VM. In the terminal run the following commands to setup the port forwarding. (Note that <code>"Ubuntu CF"</code> needs to match the name of the VM created above.)</p>
<pre style="padding-left: 30px;"><code>VBoxManage setextradata "Ubuntu CF" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/Protocol" TCP
VBoxManage setextradata "Ubuntu CF" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/GuestPort" 80
VBoxManage setextradata "Ubuntu CF" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/HostPort" 8580</code></pre>
<p>This will change the VM settings to have the guest port of <code>80</code> (which is the default apache port) of the guest forwarded to port <code>8580</code> on the host. Without this you would not be able to talk to the guest operating system.</p>
<h3>Step 8: Install ColdFusion</h3>
<p>Since we already downloaded the installer for ColdFusion we just need to get that file to the VM. Luckily we already setup a shared folder so if you move the installer to the <code>/Users/randy/Documents/cf9/</code> directory it will be available in the VM.</p>
<p>To run the ColdFusion installer:</p>
<pre style="padding-left: 30px; "><code>cd /home/randy/Documents/cf9/</code></pre>
<pre style="padding-left: 30px; "><code>chmod +x ColdFusion_9_WWE_linux.bin</code></pre>
<pre style="padding-left: 30px; "><code>sudo ./ColdFusion_9_WWE_linux.bin</code></pre>
<p>This should start the installer. During the installation, apache should be configured to run with ColdFusion.</p>
<h3>Step 9: Test Environment</h3>
<p>To test that the development environment is working correctly you should be able to place an <code>index.cfm</code> file in your <code>/Users/randy/Documents/cf9/</code> directory. Make sure that you place some CFML in the file to test that ColdFusion is doing it&#8217;s thing. Then visit <a href="http://localhost:8580/">http://localhost:8580/</a> in a browser on your host to test out the new development environment!</p>
]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2009/coldfusion-virtualbox-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automate WordPress Upgrade on Grid Server</title>
		<link>http://forthedeveloper.com/2009/automate-wordpress-upgrade-on-grid-server/</link>
		<comments>http://forthedeveloper.com/2009/automate-wordpress-upgrade-on-grid-server/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 22:02:05 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[media temple]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[grid service]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=104</guid>
		<description><![CDATA[Many of the domains and sub-domains on my Media Temple Grid Service contain installations of WordPress. Since I don&#8217;t want to be bothered by a normal upgrades here is how I install WordPress in a way that allows for simple upgrades. This is not a completely automated solution, there is more that you could do [...]]]></description>
			<content:encoded><![CDATA[<p>Many of the domains and sub-domains on my Media Temple Grid Service contain installations of WordPress. Since I don&#8217;t want to be bothered by a normal upgrades here is how I install WordPress in a way that allows for simple upgrades.</p>
<p>This is not a completely automated solution, there is more that you could do to improve the process, but it should save a lot of the time normally spent updating WordPress.</p>
<p><span id="more-104"></span></p>
<p><em><strong>Note:</strong> the <a href="http://forthedeveloper.com/wp-content/uploads/2009/09/updateWP.zip">provided script</a> will only work if you do the WordPress install using subversion and in the domain/sub-domain&#8217;s <code>html/</code> directory.</em></p>
<h3>Installing WordPress</h3>
<p>Yes, there is a 1-click install for installing WordPress on the (gs), but I don&#8217;t use it. Here is how I install WordPress on a domain or sub-domain (ex: <code>blog.site.org</code>):</p>
<ol>
<li><span style="background-color: #ffffff;">Ensure that you have an <a href="http://kb.mediatemple.net/questions/906/Creating+an+alternate+domain" target="_blank">alternate domain</a> or <a href="http://kb.mediatemple.net/questions/99/Creating+a+subdomain" target="_blank">sub-domain</a> created that has an empty <code>html/</code> directory.</span></li>
<li><span style="background-color: #ffffff;">Find the latest tag listed in the <a href="http://svn.automattic.com/wordpress/tags/" target="_blank">WordPress repositor</a>y. (ex: 2.8.3)</span></li>
<li><span style="background-color: #ffffff;"><a href="http://kb.mediatemple.net/questions/16/Connecting+via+SSH+to+your+(gs)+Grid-Service" target="_blank">SSH into the (gs)</a> as the serveradmin.</span></li>
<li><span style="background-color: #ffffff;"><code>cd domains/blog.site.org/html</code></span></li>
<li><span style="background-color: #ffffff;"><code>svn checkout http://svn.automattic.com/wordpress/tags/2.8.3/ ./ --force</code></span></li>
</ol>
<p>Once the svn checkout is complete you should be able to visit the install page (ex: <code>blog.site.org/wp-admin/install.php</code>) and finish the installation of WordPress like normal.</p>
<p>I also suggest you take steps to <a href="http://codex.wordpress.org/Hardening_WordPress" target="_blank">harden your WordPress install</a>.</p>
<h3>Upgrading Many WordPress Installs at Once</h3>
<p>When you <a href="http://wordpress.org/development/" target="_blank">learn of a new version</a> of WordPress you can do the following to easily upgrade all of your installations at once.</p>
<ol>
<li><a href="http://kb.mediatemple.net/questions/16/Connecting+via+SSH+to+your+(gs)+Grid-Service" target="_blank">SSH into the (gs)</a> as the serveradmin.</li>
<li>You will need to upload the <a href="http://forthedeveloper.com/wp-content/uploads/2009/09/updateWP.zip">updateWP</a> bash script to your serveradmin home directory (<code>~/</code>) if it does not already exist.</li>
<li>Run the bash script with the new version number: <code>./updateWP.sh 2.8.4</code></li>
<li>The script will look at each of your domains to see if you have WordPress installed. If it finds WordPress it will switch to the new tag.</li>
<li>After all the installs are updated you can view the <code>updateWP.log</code> to see all of the installations that were completed. On some tags you may need to go to each of the <code>/wp-admin/</code> page and manually tell it to update the database. You can check if this is necessary by visiting one of your WordPress install&#8217;s <code>/wp-admin/</code> directory.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2009/automate-wordpress-upgrade-on-grid-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse 3.4 On Ubuntu 8.04.1</title>
		<link>http://forthedeveloper.com/2008/eclipse-3_4-on-ubuntu-8_04_1/</link>
		<comments>http://forthedeveloper.com/2008/eclipse-3_4-on-ubuntu-8_04_1/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 05:54:25 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=42</guid>
		<description><![CDATA[Something that really bugged me (and still does) about the ubuntu since I installed it is that eclipse is not even close to being the latest version in the package manager. That just seems really strange to me to have such and awesome and widely used IDE not supported in Ubuntu. Anyhow I am not [...]]]></description>
			<content:encoded><![CDATA[<p>Something that really bugged me (and still does) about the ubuntu since I installed it is that eclipse is not even close to being the latest version in the package manager. That just seems really strange to me to have such and awesome and widely used IDE not supported in Ubuntu. Anyhow I am not writing this post to just complain about Ubuntu&#8217;s quirks, I am writing to detail the steps that I took to get it setup and working on my Ubuntu 8.04.1 64 bit box.</p>
<p><span id="more-42"></span></p>
<h2>Using the Sun Java</h2>
<p>I started off by doing your standard Google search and came up with this page listed promently on the Ubuntu community site:</p>
<p><a href="https://help.ubuntu.com/community/EclipseIDE" target="_blank">https://help.ubuntu.com/community/EclipseIDE</a></p>
<p>I followed the instructions to get the Java 6 from Sun installed on the system. But I stopped after the install of Java 6 since my install is basically a download of eclipse it wasn&#8217;t going to have the /etc/eclipse/java_home that was described on the community page.</p>
<p>With a little more searching I came across <a href="http://jhcore.com/2008/06/26/eclipse-34-ganymede-on-ubuntu/" target="_blank">this page</a> which gave a brief description his installation. From his post I edited my ~/.bashrc file and added in the export JAVA_HOME=/usr/lib/jvm/java-6-sun/ so that my default JAVA_HOME would be the sun java.</p>
<h2>Getting Eclipse</h2>
<p>To get the latest eclipse distribution I went to the <a href="http://www.eclipse.org/downloads/" target="_blank">eclipse download page</a> and downloaded the eclipse classic, my preferred base distro. Once I had the file I extracted the eclipse directory. I&#8217;m not a linux guru and didn&#8217;t know the &#8216;best&#8217; place to put the eclipse directory so i put it in /opt/.</p>
<h2>Running Eclipse</h2>
<p>Once I had the application in the directory I decided to add it to my applications menu. I did so by right clicking on the &#8216;Applications&#8217; menu and selecting the &#8216;Edit Menus&#8217; option. From there I went into the Applications &gt; Programming menu on the left side and created a &#8216;New Item&#8217;. I chose the type of &#8216;Application&#8217; and a name of &#8216;Eclipse&#8217;. For the command I entered &#8216;/opt/eclipse/eclipse -vm /usr/lib/jvm/java-6-sun/bin/java&#8217; just to make sure that eclipse was being loaded with the correct jvm.</p>
<h2>Using Eclipse</h2>
<p>So far I have not had any problems with any of the plugins that I commonly use (CFEclipse, Subclipse, etc) that aren&#8217;t found on all system.</p>
<p>That&#8217;s what I did to get Eclipse 3.4 Ganymede running on Ubuntu 8.04.1 Hardy Heron, so enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2008/eclipse-3_4-on-ubuntu-8_04_1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
