Categories
PHP

My LAMP Environment

Today, I am gonna share a short overview of my work environment. I’m gonna detail on how you can setup yours too. First lets get to the L part. I am running Ubuntu Linux 11.04. Well, I do hate the default Unity UI. But good lord, we have the fall back options like “Ubuntu Classic” which is Gnome I believe. After installing Ubuntu, I installed the LAMP server using the “tasksel” utility. I love it because it’s handy and lets me do all sort of package management and software installation based on the nature of task. By default, in Ubuntu 9.10+ versions, we no longer have “tasksel” installed by default. So, open your terminal and get the utility from the repository by executing the following command:

Now that we have tasksel installed, we can install all the packages necessary for LAMP server using another handy command:

Man, I love this terminal and command line geekery! It’s just feels like magic! We’re done setting up the LAMP server. Visit : http://localhost/ and you’ll get the local web page 🙂

Now, the www folder is located to “/var/www” which is owned by the user “root”. So, we take the ownership :

Aha! Now you can create files and directories in the www directory and enjoy!

Well, now if we need to enable a custom apache module, we do this:

It’ll display a list of available modules, type in the ones you need and press enter. After selecting the modules, type this command to reload apache:

Now that we have apache, mysql and php running, lets install some GUI tools for mysql. Here goes the commands:

So far we have installed the basic tools, now lets install PEAR 🙂

Now that you have PEAR, we can install a nice utility – “pman”.

Pman is handy for command line php documentation. Just try like this:

It’ll give the docs for the strlen function on the terminal just like the linux man utility 🙂 Press “q” to quit the man page.

By default, php doesn’t come with curl and gd in linux. Install them like this:

Now that we have a working LAMP setup, lets get some additional tools: SVN, Git and Filezilla.

Ubuntu has Gedit, a text editor with Syntax highlighting. While Gedit can be used for PHP development, most of the popular PHP IDEs have their Linux version. I have used both Netbeans and PhpStorm on Ubuntu. And I know Eclipse run on Linux as well. So fire up your favorite IDE and storm the LAMP arena! 🙂

3 replies on “My LAMP Environment”

There is another way to install LAMP without installing tasksel.
sudo apt-get install lamp-server^

This does same thing as tasksel. 😉

Comments are closed.