<?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>Martijn's C# Programming Blog &#187; eacellerator</title>
	<atom:link href="http://www.dijksterhuis.org/tag/eacellerator/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dijksterhuis.org</link>
	<description>Information, news about programming in C#</description>
	<lastBuildDate>Fri, 07 Aug 2009 21:26:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting up Ubuntu for Web development</title>
		<link>http://www.dijksterhuis.org/setting-up-ubuntu-for-web-development/</link>
		<comments>http://www.dijksterhuis.org/setting-up-ubuntu-for-web-development/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 02:56:22 +0000</pubDate>
		<dc:creator>Martijn</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[eacellerator]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=308</guid>
		<description><![CDATA[One of the pleasures of setting up a new machine for development is always the feeling of having a “clean” machine without a myriad of test projects and things under development laying around the place. This article is distilled from my notes as I installed Apache2, MySQL &#038; PHP5 on my new machine. And of [...]<p>This is a post from <a href="http://www.dijksterhuis.org">Martijn's C# Coding Blog</a>. </p>
]]></description>
			<content:encoded><![CDATA[<p><em>One of the pleasures of setting up a new machine for development is always the feeling of having a “clean” machine without a myriad of test projects and things under development laying around the place. This article is distilled from my notes as I installed Apache2, MySQL &#038; PHP5 on my new machine. And of course I tuned PHP5 by compiling and installing eaccelerator.</em></p>
<p><strong>Installing Apache2 , MySQL Server and PHP5</strong></p>
<p>The above has become so easy under Ubuntu that its quite unbelievable. With just a few lines of typing you too can have a full LAMP (Linux, Apache, MySQL &#038; PHP) system. There is no need for the hours previously spend on hunting for dependencies to download and compile. </p>
<blockquote><p>sudo apt-get install apache2<br />
sudo apt-get install mysql-server<br />
sudo apt-get install php5 php5-mysql php5-cli php5-dev<br />
php -v</p></blockquote>
<p>As a bonus: I also installed my favorite HTML editor:  BlueFish</p>
<blockquote><p>sudo apt-get install bluefish</p></blockquote>
<p>And that is it really &#8212; everything works from here on. If you would like to get a bit more juice out of PHP5 you can also add the following: </p>
<p><strong>Configure PHP5 with eaccelerator</strong></p>
<p>PHP is a great language for building websites but it can be quite slow at times. Each time a script is run PHP needs to compile it and then execute it. You can gain speed by using a cache such as eaccelerator. This stores the compiled scripts in both memory and on disk so that frequently called scripts run much faster. </p>
<p>The following steps compile and install eacelerator 0.9.5.3, you can check for a newer version on the <a href="http://eaccelerator.net/">eacellerator website</a>.</p>
<blockquote><p>
sudo apt-get install build-essential<br />
cd /tmp<br />
wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2<br />
bzip2 -cd eaccelerator-0.9.5.3.tar.bz2 | tar xf -<br />
 cd eaccelerator-0.9.5.3<br />
/usr/bin/phpize<br />
./configure<br />
make<br />
sudo make install
</p></blockquote>
<p>After the above you should now have a file named eaccelerator.so in  directory/usr/lib/php5/20060613+lfs/  (or whatever directory was printed when you did ‘make install’).</p>
<p>Now you need to configure php to include the eacelerator module on startup by editing the relevant php.ini file: </p>
<blockquote><p>sudo gedit /etc/php5/apache2/php.ini</p></blockquote>
<p>Add the following lines to the php.ini file: </p>
<blockquote><p>
; Installing the ZEND extension<br />
zend_extension=&#8221;/usr/lib/php5/20060613+lfs/eaccelerator.so&#8221;<br />
eaccelerator.shm_size=&#8221;0&#8243;<br />
eaccelerator.cache_dir=&#8221;/var/local/eaccelerator&#8221;<br />
eaccelerator.enable=&#8221;1&#8243;<br />
eaccelerator.optimizer=&#8221;1&#8243;<br />
eaccelerator.check_mtime=&#8221;1&#8243;<br />
eaccelerator.debug=&#8221;0&#8243;<br />
eaccelerator.shm_only=&#8221;0&#8243;<br />
eaccelerator.compress=&#8221;1&#8243;<br />
eaccelerator.compress_level=&#8221;9&#8243;<br />
eaccelerator.allowed_admin_path=&#8221;/var/www/apache2-default/control.php&#8221;</p></blockquote>
<p>Finally we need to create the cache directory used by eaccelerator to store the compiled scripts: </p>
<blockquote><p>cd /var/local<br />
sudo mkdir eaccelerator<br />
sudo chown root:www-data /var/local/eaccelerator/<br />
sudo chmod u=rwx,g=rwx,o= /var/local/eaccelerator/
</p></blockquote>
<p>Restart Apache2 and see if it loads correctly:</p>
<blockquote><p>sudo apache2ctl configtest<br />
sudo apache2ctl graceful </p></blockquote>
<p><strong>Test the PHP5 installation</strong></p>
<p>Create a small file in “/var/www/” to test your PHP5 installation</p>
<blockquote><p>sudo gedit /var/www/php5.php </p></blockquote>
<p>And add the following in this file: </p>
<blockquote><p><?php phpinfo(); ?></p></blockquote>
<p>Now load http://localhost/php5.html to see if your system is correctly configured. If eaccelerator is properly configured it should also be listed here. </p>
<p>This is a post from <a href="http://www.dijksterhuis.org">Martijn's C# Coding Blog</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dijksterhuis.org/setting-up-ubuntu-for-web-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
