Installing Lighttpd, PHP and MySQL on Ubuntu

How to, Linux, OpenSource, PHP, Tips and Tricks, Tutorials, Ubuntu, Virtual Private Server
If you are not getting a package on Ubuntu, please check to see if your /etc/apt/sources.list file is updated. This is common with most VPS providers 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 [code]apt-get install lighttpd[/code] Now install PHP5 CGI package and PHP5 command line package [code]apt-get install php5-cgi php5-cli[/code] Edit the following file [code]nano /etc/php5/cgi/php.ini[/code] and uncomment this line [code]cgi.fix_pathinfo = 1[/code] Now enable fastcgi module [code]lighty-enable-mod fastcgi[/code] Restart Lighttpd [code]/etc/init.d/lighttpd restart[/code] You get the welcome page Lets install MySQL 5.1 server and client [code]apt-get install mysql-server mysql-client[/code] and…
Read More

Installing / re-installing and Configuring phpMyAdmin on Ubuntu

How to, Linux, OpenSource, PHP, Resources, Tips and Tricks, Tutorials, Ubuntu
phpMyAdmin is a very common and handy tool that most of the developers use. It is available on almost every server. Installing phpMyAdmin on Ubuntu server is even easier, you just need to [sourcecode language="plain"]sudo apt-get install phpmyadmin[/sourcecode] but what if we accidently skip the configuration screen where phpmyadmin makes modifications to apache? Dont worry just do the following Edit Apache's configuration file (assuming you are using apache2) [sourcecode language="plain"]sudo nano /etc/apache2/apache2.conf # better to use the following command instead of the one above #gksudo gedit /etc/apache2/apache2.conf[/sourcecode] Add the following line of code inside apache2.conf: [sourcecode language="plain"]Include /etc/phpmyadmin/apache.conf[/sourcecode] Now restart Apache: [sourcecode language="plain"]sudo /etc/init.d/apache2 restart[/sourcecode] Go to /phpmyadmin/ and login with your mysql username and password.
Read More