<?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>Technically Personal! &#187; Ubuntu</title> <atom:link href="http://techpp.com/category/ubuntu/feed/" rel="self" type="application/rss+xml" /><link>http://techpp.com</link> <description>Tips,tricks,News,Reviews,Tutorials on-Firefox,Web 2.0,Online TV,Online tools,Gadgets and more</description> <lastBuildDate>Sat, 31 Jul 2010 19:39:53 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>How to Install Lighttpd with PHP5 and MySQL on Ubuntu 9.10</title><link>http://techpp.com/2010/01/09/how-to-install-lighttpd-with-php5-and-mysql-on-ubuntu-9-10/</link> <comments>http://techpp.com/2010/01/09/how-to-install-lighttpd-with-php5-and-mysql-on-ubuntu-9-10/#comments</comments> <pubDate>Sat, 09 Jan 2010 18:59:40 +0000</pubDate> <dc:creator>Anurag Upadhaya</dc:creator> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[install lighttpd]]></category> <category><![CDATA[install lighttpd ubuntu]]></category> <category><![CDATA[karmic koala]]></category> <category><![CDATA[lightpd]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[linux configuration]]></category> <category><![CDATA[localhost]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[php5]]></category> <category><![CDATA[ubuntu 9.10]]></category> <category><![CDATA[ubuntu tips]]></category> <category><![CDATA[ubuntu tutorials]]></category> <category><![CDATA[web server]]></category><guid isPermaLink="false">http://techpp.com/?p=8690</guid> <description><![CDATA[Lighttpd is a secure web server, which is faster when compared to Apache. We will show here how you can install Lighttpd on an Ubuntu 9.10 server with PHP5 support (through FastCGI) and MySQL support.<b>Related posts:<ol><li><a href='http://techpp.com/2010/01/11/install-microsoft-iis-server-on-windows-7-how-to/' rel='bookmark' title='Permanent Link: Install Microsoft IIS Server on Windows 7 [How To]'>Install Microsoft IIS Server on Windows 7 [How To]</a></li><li><a href='http://techpp.com/2009/02/13/ultimate-collection-ubuntu-themes-visual-styles-for-windows-xp-vista/' rel='bookmark' title='Permanent Link: Ultimate Collection of Ubuntu Themes for Windows'>Ultimate Collection of Ubuntu Themes for Windows</a></li><li><a href='http://techpp.com/2009/12/28/ylmf-os-ubuntu-hacked-to-look-just-like-windows-xp/' rel='bookmark' title='Permanent Link: Ylmf OS!: Ubuntu Hacked to Look Just Like Windows XP'>Ylmf OS!: Ubuntu Hacked to Look Just Like Windows XP</a></li><li><a href='http://techpp.com/2009/10/20/download-windows-7-xp-mode-usage-guide/' rel='bookmark' title='Permanent Link: Download and Install Windows 7 XP Mode + Usage Guide'>Download and Install Windows 7 XP Mode + Usage Guide</a></li><li><a href='http://techpp.com/2010/06/21/how-to-install-ios-4-on-your-iphone-or-ipod-touch/' rel='bookmark' title='Permanent Link: [How to] Install iOS 4 on Your iPhone or iPod Touch'>[How to] Install iOS 4 on Your iPhone or iPod Touch</a></li></ol></b>]]></description> <content:encoded><![CDATA[<p><a href="http://cdn.techpp.com/wp-content/uploads/2010/01/installing-lighttpd-on-fedora-and-ubuntu-2.png"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class="alignleft" src="http://cdn.techpp.com/wp-content/uploads/2010/01/installing-lighttpd-on-fedora-and-ubuntu-2.png" alt="lighttpd-ubuntu" title="How to Install Lighttpd with PHP5 and MySQL on Ubuntu 9.10" /></a></p><p>Lighttpd is a secure web server, which is faster when compared to Apache. We will show here <strong>how you can install Lighttpd on an Ubuntu 9.10 server with PHP5 support</strong> (through FastCGI) and MySQL support.</p><p>In this tutorial we have used hostname as <em>server1.example.com</em> with the IP address <em>192.168.0.100</em>. They maybe different for you.</p><p>The first thing you need to do is to login as root. You can login as root in Ubuntu Linux by typing in the terminal:</p><p><code>sudo su</code></p><h3>Installing MySQL 5:</h3><p>In the terminal type:</p><p><code>aptitude install mysql-server mysql-client</code></p><p>You will be asked to provide a password for MySQL user &#8220;<strong>root</strong>&#8220;. The same password will be valid for the user <em>root@localhost</em> as well as <em>root@server1.example.com .</em></p><h3>Installing Lighttpd on Ubuntu 9.10:</h3><p>Lighttpd is already available as a pre-configured package in Ubuntu 9.10, so we can install it through terminal very easily. Type in the terminal:</p><p><code>aptitude install lighttpd</code></p><p>Now open your web browser and type <em>http://192.168.0.100</em>, and you should see the Lighttpd placeholder page:</p><p style="text-align: center;"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="attachment wp-att-8692  aligncenter" src="http://cdn.techpp.com/wp-content/uploads/2010/01/image1.png" alt="image1 How to Install Lighttpd with PHP5 and MySQL on Ubuntu 9.10" width="550" height="399" title="How to Install Lighttpd with PHP5 and MySQL on Ubuntu 9.10" /></p><p>The default document folder of Lighttpd for user <strong>root</strong> is <em>/var/www/</em> on Ubuntu, and the configuration file is <em>/etc/lighttpd/lighttpd.conf</em>. Additional configurations are stored in files which are situated in the <em>/etc/lighttpd/conf-available/</em> directory.</p><h3>Installing PHP5</h3><p>To enable PHP5 in Lighttpd, you will have to  modify the configuration file <em>/etc/php5/cgi/php.ini. </em>To edit it, type in the terminal:</p><p><code>vi /etc/php5/cgi/php.ini</code></p><p>Scroll down to the end of this file and add this line at the end of file:</p><p><code>cgi.fix_pathinfo = 1</code></p><p>To enable the FastCGI configuration (which is stored in <em>/etc/lighttpd/conf-available/10-fastcgi.conf</em>), run the following command:</p><p><code>lighttpd-enable-mod fastcgi</code></p><p>To reload the server for changes to take place, type in the terminal:</p><p><code>/etc/init.d/lighttpd force-reload</code></p><h3>Installing MySQL 5 support:</h3><p>To get MySQL support in PHP, we can install the <em>php5-mysql</em> package. But it is a good idea to install some other PHP5 modules together with MySQL as well, as you might need them for your applications. You can search for available PHP5 modules by typing in the terminal:</p><p><code>aptitude search php5</code></p><p>Based on some of the packages that you select, you can install them with MySQL by typing in the terminal:</p><p><code>aptitude install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json</code></p><p>Now, again restart Lighttpd by typing:</p><p><code>/etc/init.d/lighttpd restart</code></p><h3>Testing your web server and PHP:</h3><p>The document root for the default web server is <em>/var/www</em>. We will now create a small PHP file (<em>info.php</em>) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version.</p><p>To create this file, type in the terminal:</p><p><code>vi /var/www/info.php</code></p><p>Now type this code into this file:</p><pre>&lt;?php
phpinfo();
?&gt;</pre><p>Save the file and close the terminal.</p><p>Now we call this file in a browser by typing  <em>http://192.168.0.100/info.php</em></p><p style="text-align: center;"><em><img style=' display: block; margin-right: auto; margin-left: auto;'  class="attachment wp-att-8695  aligncenter" src="http://cdn.techpp.com/wp-content/uploads/2010/01/image2.png" alt="image2 How to Install Lighttpd with PHP5 and MySQL on Ubuntu 9.10" width="550" height="399" title="How to Install Lighttpd with PHP5 and MySQL on Ubuntu 9.10" /></em></p><p>As you see in the screenshot, PHP5 is working fine, and it is working through FastCGI, as shown in the <em>Server API</em> line. If you scroll further down, you will see all modules that are already enabled in PHP5.Now, your web server is ready for working.</p><p>Hope this tutorial helps  you in setting up a light and fast as well as a faster web server in Ubuntu 9.10. For more such tutorials, keep hooked onto TechPP.</p><p><b>Related posts:<ol><li><a href='http://techpp.com/2010/01/11/install-microsoft-iis-server-on-windows-7-how-to/' rel='bookmark' title='Permanent Link: Install Microsoft IIS Server on Windows 7 [How To]'>Install Microsoft IIS Server on Windows 7 [How To]</a></li><li><a href='http://techpp.com/2009/02/13/ultimate-collection-ubuntu-themes-visual-styles-for-windows-xp-vista/' rel='bookmark' title='Permanent Link: Ultimate Collection of Ubuntu Themes for Windows'>Ultimate Collection of Ubuntu Themes for Windows</a></li><li><a href='http://techpp.com/2009/12/28/ylmf-os-ubuntu-hacked-to-look-just-like-windows-xp/' rel='bookmark' title='Permanent Link: Ylmf OS!: Ubuntu Hacked to Look Just Like Windows XP'>Ylmf OS!: Ubuntu Hacked to Look Just Like Windows XP</a></li><li><a href='http://techpp.com/2009/10/20/download-windows-7-xp-mode-usage-guide/' rel='bookmark' title='Permanent Link: Download and Install Windows 7 XP Mode + Usage Guide'>Download and Install Windows 7 XP Mode + Usage Guide</a></li><li><a href='http://techpp.com/2010/06/21/how-to-install-ios-4-on-your-iphone-or-ipod-touch/' rel='bookmark' title='Permanent Link: [How to] Install iOS 4 on Your iPhone or iPod Touch'>[How to] Install iOS 4 on Your iPhone or iPod Touch</a></li></ol></b></p><hr /><p><small>© Raju PP for <a href="http://techpp.com">Technically Personal!</a>, 2010. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please <a href="http://techpp.com/contact">contact us</a>, so we can take legal action immediately. If you are on Twitter you can follow me <a href="http://twitter.com/rajupp">@rajupp</a>! | <a href="http://techpp.com/2010/01/09/how-to-install-lighttpd-with-php5-and-mysql-on-ubuntu-9-10/">Permalink</a> | <br/> </small></p>]]></content:encoded> <wfw:commentRss>http://techpp.com/2010/01/09/how-to-install-lighttpd-with-php5-and-mysql-on-ubuntu-9-10/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 8/22 queries in 0.008 seconds using disk
Object Caching 591/614 objects using disk
Content Delivery Network via cdn.techpp.com

Served from: techpp.com @ 2010-08-01 00:42:15 -->