<?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>Christian Krahn &#187; Tutorial</title>
	<atom:link href="http://www.krahn.org/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.krahn.org</link>
	<description>Using: PHP, Python, JS, MySQL, Perl, Google API&#039;s ; BLOGGING ABOUT: everything related to Web Development</description>
	<lastBuildDate>Sun, 22 Aug 2010 18:29:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Installing Ubuntu 10.04 Lucid Lynx for PHP development</title>
		<link>http://www.krahn.org/2010/06/installing-ubuntu-10-04-lucid-lynx-for-php-development/</link>
		<comments>http://www.krahn.org/2010/06/installing-ubuntu-10-04-lucid-lynx-for-php-development/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 14:24:07 +0000</pubDate>
		<dc:creator>ckrahn</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Lucid Lynx]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.krahn.org/?p=139</guid>
		<description><![CDATA[Last year I have written a small how-to for installing an Ubuntu 9.04 work environment as virtualbox environment (though it also works for native systems). Recently I have updated this guide to 10.04 as kind of check list to get a working environment to develop PHP/MySQL applications. Installation of System First of all you have [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-160" src="http://englishblog.ckrahn.de/files/2010/06/Lucid-Lynx.png" alt="Lucid-Lynx" width="140" height="120" />Last year I have written a small how-to for installing an Ubuntu 9.04 work environment as virtualbox environment (though it also works for native systems). Recently I have updated this guide to 10.04 as kind of check list to get a working environment to develop PHP/MySQL applications.</p>
<p><span id="more-139"></span></p>
<p><strong>Installation of System</strong></p>
<p>First of all you have install from scratch, which means putting the CD-Rom in your drive or create a VirtualBox and use the ISO file as mount. Then just follow the menu to install Ubuntu.</p>
<p><strong>After basic installation</strong></p>
<p>Start by opening a console window and become superuser:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #660033;">-i</span></pre></td></tr></table></div>

<p>After that update your package list and upgrade all packages with available updates:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> upgrade</pre></td></tr></table></div>

<p>In case you are using a VirtualBox environment, you have to restart the system and boot up again. After that open a console again and get superuser rights:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #660033;">-i</span></pre></td></tr></table></div>

<p>Then you should install VirtualBox Guest Extensions:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>cdrom
.<span style="color: #000000; font-weight: bold;">/</span>VBoxLinuxAdditions-x86.run</pre></td></tr></table></div>

<p><strong>Installation of LAMP environment</strong></p>
<p>To test your code base you need a working webserver environment with PHP and MySQL Client / Server. If you want to use a separate MySQL Server for your databases then you can skip installing the MySQL Server.</p>
<p>First we start with <span style="text-decoration: underline">Apache2</span>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apache2 apache2-threaded-dev
a2enmod ssl
a2enmod rewrite
a2enmod include</pre></td></tr></table></div>

<p><em>a2enmod</em> is used to activate apache2 modules like mod_ssl, mod_rewrite and mod_include.</p>
<p>To use php5-curl later, you need to install curl first:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> curl</pre></td></tr></table></div>

<p>Now it&#8217;s time for <span style="text-decoration: underline">PHP5</span>:</p>
<p>First we install some (more or less) necessary PHP5 packages (including imagemagick):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5 php5-cli php5-dev php-pear
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> imagemagick
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-gd php5-mcrypt php5-imagick php5-curl php5-xmlrpc php5-xsl php5-mhash</pre></td></tr></table></div>

<p>The <em>php5-dev</em> package contains phpize which is necessary for installing and compiling PEAR/PECL extensions for PHP.</p>
<p>Since you might want to use PEAR packages, an upgrade of the channels and already installed packges is advised:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pear channel-update pear.php.net
pear upgrade-all</pre></td></tr></table></div>

<p>Some recommended PEAR packages include:</p>
<p>Template Engines:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pear <span style="color: #c20cb9; font-weight: bold;">install</span> HTML_QuickForm HTML_Common HTML_Template_Sigma</pre></td></tr></table></div>

<p>PHP-Unit:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pear channel-discover pear.phpunit.de
pear remote-list <span style="color: #660033;">-c</span> phpunit
pear <span style="color: #c20cb9; font-weight: bold;">install</span> phpunit<span style="color: #000000; font-weight: bold;">/</span>PHPUnit
pear channel-discover components.ez.no
pear <span style="color: #c20cb9; font-weight: bold;">install</span> phpunit<span style="color: #000000; font-weight: bold;">/</span>phpcpd</pre></td></tr></table></div>

<p>Now the <span style="text-decoration: underline">MySQL</span> part:</p>
<p>You can either use standard MySQL/MySQLi or PDO. Since PHP 5.1 PDO comes preinstalled. To install everything just do the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mysql-client mysql-server libmysqlclient15-dev
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mysql-query-browser mysql-admin
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-mysql</pre></td></tr></table></div>

<p>Those packages include MySQL Query Browser and MySQL Administrator which are quite handy tools to manage MySQL databases and tables.</p>
<p>For debugging your code (e.g. from the Eclipse environment) you have to install XDebug:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-xdebug</pre></td></tr></table></div>

<p>As a default configuration you should put the following into <em>/etc/php5/conf.d/xdebug.ini</em>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">xdebug.profiler_enable_trigger = <span style="color: #000000;">1</span>
xdebug.profiler_enable=<span style="color: #000000;">0</span>
xdebug.profiler_output_dir = <span style="color: #000000; font-weight: bold;">/</span>tmp
xdebug.remote_enable=On
xdebug.remote_host=127.0.0.1
xdebug.remote_port=<span style="color: #000000;">9000</span>
xdebug.remote_handler=<span style="color: #ff0000;">&quot;dbgp&quot;</span>
xdebug.remote_log=<span style="color: #ff0000;">&quot;/tmp/xdebug.log&quot;</span></pre></td></tr></table></div>

<p>This enables you to use XDebug as profiler (by using the parameter XDEBUG_PROFILE=1 as GET/POST parameter when executing your website). It creates a cachegrind file to be analysed (e.g. with kCacheGrind, I will explain that in another tutorial).</p>
<p>At the end don&#8217;t forget to reload Apache2 before starting to work with your system:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">apache2ctl restart</pre></td></tr></table></div>

<p>Now the most important stuff is installed. You might want to install Subversion:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> subversion</pre></td></tr></table></div>

<p>but I will not go into details about using that here.</p>
<p><strong>Applications</strong></p>
<p>To use Eclipse, Aptana or Zend Studio (if you have a license) you need a Java Runtime Engine. Best is to install the default-jre:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> default-jre</pre></td></tr></table></div>

<p>Now you just need to download your favorite IDE (e.g. Eclipse) and you can start developing your applications. Some hints to do that:</p>
<ul>
<li>you can run your local webserver with your user account, just change it in <em>/etc/apache2/envvars</em></li>
<li>to use PEAR packages you need to uncomment the <strong>include_path</strong> part for linux based operating systems in <em>/etc/php5/apache2/php5.ini</em>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.krahn.org/2010/06/installing-ubuntu-10-04-lucid-lynx-for-php-development/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Updating T-Mobile G1 to Android 1.5</title>
		<link>http://www.krahn.org/2009/05/updating-t-mobile-g1-to-android-15/</link>
		<comments>http://www.krahn.org/2009/05/updating-t-mobile-g1-to-android-15/#comments</comments>
		<pubDate>Mon, 11 May 2009 18:35:28 +0000</pubDate>
		<dc:creator>ckrahn</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[G1]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.krahn.org/?p=9</guid>
		<description><![CDATA[The Update for Android to Version 1.5 is available to Download from Google. I recently updated my G1 to the new version sucessfully. Please remember that this is probably a European version of Android (don&#8217;t know for sure), so please be careful @ US guys. Here is the tutorial: Download the file and rename it [...]]]></description>
			<content:encoded><![CDATA[<p>The Update for Android to Version 1.5 is available to <a href="http://android.clients.google.com/updates/signed-CRB17-from-TMI-RC9-eu.17667e06.zip">Download</a> from Google. I recently updated my G1 to the new version sucessfully.  <strong>Please remember that this is probably a European version of Android (don&#8217;t know for sure), so please be careful @ US guys.</strong> Here is the tutorial:</p>
<blockquote><p><a href="http://android.clients.google.com/updates/signed-CRB17-from-TMI-RC9-eu.17667e06.zip">Download</a> the file and rename it to update.zip. Then put it in the root folder on your G1&#8242;s SD card. Then turn off your G1 completly. To start the service update press the key combination <strong>[Home]-[Quit]</strong>, and keep them pressed until a warning sign appears on the screen. Then press <strong>[Alt]-[S]</strong> to start the update. After installation the G1 reboots twice and then its completed. You have to have Android v1.1 to install the update.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.krahn.org/2009/05/updating-t-mobile-g1-to-android-15/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
