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:
1 |
sudo apt-get install tasksel |
Now that we have tasksel installed, we can install all the packages necessary for LAMP server using another handy command:
1 |
sudo tasksel install lamp-server |
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 :
1 |
sudo chown -hR masnun /var/www |
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:
1 |
sudo a2enmod |
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:
1 |
sudo /etc/init.d/apache2 restart |
Now that we have apache, mysql and php running, lets install some GUI tools for mysql. Here goes the commands:
1 |
sudo apt-get install mysql-query-browser mysql-admin mysql-navigator |
So far we have installed the basic tools, now lets install PEAR 🙂
1 |
sudo apt-get install php-pear |
Now that you have PEAR, we can install a nice utility – “pman”.
1 |
sudo pear install doc.php.net/pman |
Pman is handy for command line php documentation. Just try like this:
1 |
pman strlen |
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:
1 |
sudo apt-get install php5-curl php5-gd |
Now that we have a working LAMP setup, lets get some additional tools: SVN, Git and Filezilla.
1 |
sudo apt-get install subversion git 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”
A very nice walkthrough. I am not a developer. So I just use xampp on my Ubuntu 10.04 box 🙂
There is another way to install LAMP without installing tasksel.
sudo apt-get install lamp-server^
This does same thing as tasksel. 😉
Awesome!