How-To: Install LightTPD 1.4.26 on Ubuntu 9.10
This tutorial will show you how easy is it to install LightTPD 1.4.26 + PHP 5.2.10 + MySQL 5.1.37 + phpMyAdmin 3.2.5 on Ubuntu 9.10. This should also work for any newer version in the future :-) So if you see newer version at the time you install this, don’t be alarmed this is good as long you don’t get any errors in the way. Do this in steps as shown in this tutorial and you should install it correctly.
Configure Ubuntu 9.10 Repository
Add the following two urls to your “Software Sources” under System > Administration menu and then click “Reload” button.
1 2 | deb http://ppa.launchpad.net/stbuehler/web-stable/ubuntu karmic main deb-src http://ppa.launchpad.net/stbuehler/web-stable/ubuntu karmic main |
NOTE: You will need to do the following command to proceed with all this bellow installations:
1 | sudo -i |
(and then type your root password).
Installing MySQL 5.1.37
Open your Terminal and run the following command to install MySQL 5.1.37
1 | aptitude install mysql-server mysql-client |
Ones it installed, it will ask you to set root password for your mysql database.
Install LightTPD 1.4.26
1 | aptitude install lighttpd |
Now open your browser and go to http://localhost/ to check if it installed correctly. If it did you should see default page for lighttpd web server.
Install PHP 5.2.10
1 | aptitude install php5-cgi |
Configure PHP
Open /etc/php5/cgi/php.ini file with gedit or nano.
1 | gedit /etc/php5/cgi/php.ini |
At the bottom of php.ini config file type the following line:
1 | cgi.fix_pathinfo = 1 |
Save the file and go back to terminal.
Enable FastCGI for LightTPD
1 | lighttpd-enable-mod fastcgi |
Restart LightTPD
1 | /etc/init.d/lighttpd force-reload |
or alternatively use the following article and create “service” function to restart your services easier: http://gravityfx.org/blog/2009/10/02/service-command-for-ubuntu/
If you already have this “service” function configured, you can simply run:
1 | service lighttpd force-reload |
Create and Test PHP file
In your /var/www/ directory create file info.php and add the following php code:
1 | <?php phpinfo(); ?> |
Then go to http://localhost/info.php and you should see php page now.
Getting MySQL Support in PHP
1 | aptitude install php5-mysql |
Install Other PHP Modules *recommended*
1 | aptitude install 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 |
Alternatively you can search for all php modules by running this command:
1 | aptitude search php5 |
Restart LightTPD
1 | /etc/init.d/lighttpd force-reload |
Then go to http://localhost/info.php and you should see php page now, and all the modules installed.
Install phpMyAdmin 3.2.5
Download phpMyAdmin from http://www.phpmyadmin.net/home_page/downloads.php the phpMyAdmin-3.2.5-english.zip should be good. Extract it in /var/www/ directory and rename it to phpMyAdmin. Then rename file config.sample.in.php to config.in.php then open it in gedit and find this line:
1 | $cfg['Servers'][$i]['auth_type'] = 'cookies'; |
change it to:
1 | $cfg['Servers'][$i]['auth_type'] = 'http'; |
Then simply go to http://localhost/phpMyAdmin/ and login with your root password that you set for your MySQL previously :-D
You are done, enjoy ;) I hope this helps some one.



