How To Quickly Install LigHTTPD, MySQL and PHP5 On Ubuntu

Karol Krizka @ February 5, 2008

Linux

There is nothing better for web development that having your own local web server to test your web pages on before uploading them to a live server. As a Linux user, I have many choices including Apache2 and Lighttpd. I chose to use the latter of the two, because it is more lightweight and I do not need any of the fancy features offered by Apache2. Of course, a good web server is not the only application a web developer needs. a MySQL database and PHP5 support are almost always required. This whole setup is usually referred to as LLMP (Linux, Lighttpd, MySQL, PHP) and there is already an excellent tutorial that guides one through installation on Ubuntu. However it includes too much detail, and many people (including me) that already know what they need just want to install and program. So I decided to compress it into one short blog post. Just execute the following commands as root (access can be gained through sudo /bin/bash)


aptitude install mysql-client mysql-server php5-mysql php5-cgi phpmyadmin
lighty-enable-mod fastcgi userdir
/etc/init.d/lighttpd start
/etc/init.d/mysql start

That is it, you now have a fully functional web development environment (well, not including the editor) right on your Ubuntu installation. You can access your webpage through http://localhost or http://localhost/~user for contents of user’s public_html file. Also phpMyAdmin, a great web based manger for MySQL databases is accessible through http://localhost/phpmyadmin

Did you enjoy this post? Then why not subscribe to my RSS feed or subscribe by e-mail? Also check out the many other FREE ways to appreciate a blogger.


Related Posts

RSS feed | Trackback URI

Comments »

No comments yet.

Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line=""> in your comment.

Feed