19
Installing Lighttpd, PHP and MySQL on Ubuntu
Posted by | Posted in How to, Linux, OpenSource, PHP, Tips and Tricks, Tutorials, Ubuntu, Virtual Private Server | Posted on 19-07-2010
Tagged Under : FastCGI, Lighttpd, MySQL, PHP, PHP5, phpMyAdmin, Ubuntu, Ubuntu 10.04, Ubuntu 10.04 LTS, Ubuntu Server
On VPS, especially with challenging small memory limit (e.g. 64MB or 128MB) lighttpd is the best option instead of Apache. In this article I will show you how to do that. On a fresh box (which has no apache installed) type this to get lighttpd webserver installed
apt-get install lighttpd
Now install PHP5 CGI package and PHP5 command line package
apt-get install php5-cgi php5-cli
Edit the following file
nano /etc/php5/cgi/php.ini
and uncomment this line
cgi.fix_pathinfo = 1
Now enable fastcgi module
lighty-enable-mod fastcgi
Restart Lighttpd
/etc/init.d/lighttpd restart
Lets install MySQL 5.1 server and client
apt-get install mysql-server mysql-client
and optionally phpMyAdmin
apt-get install phpmyadmin
Now create a test page to see if phpinfo is all Ok
nano /var/www/info.php
Type in the following
<?php phpinfo();




