25 May 2010

How to install LigHttpd which support PHP 5

How to run LigHttpd which support PHP5 and also MySQL in linux ubuntu based like Ubuntu or linux Mint?
Bellow please find the simple step to do that.
First, of course you must install the application. You can install it via shell command bellow :

sudo apt-get install lighttpd php5-cgi php5-mysql mysql-server phpmyadmin

After installation, your lighttpd will not automatically support to run *.php file. You still need to edit some configuration in file php.ini which can be found at /etc/php5/cgi/php.ini . Open that file and then add the script bellow :


Then, activate cgi module in lighttpd via shell command bellow :

sudo lighthttpd-enable-mod fastcgi

The the last step is reload the lighttpd daemon via shell commadn bellow :

sudo /etc/init.d/lighttpd reload

By that reload script, the process of installing and configurating the lighttpd whcih support php5 is complete.
Now, you can check it by add some example of php file in folder /var/www .

No comments:

Post a Comment