Web Development Setup on a PC

Being a developer, and doing the pathetic task of setting up my laptop for web development due to the poor quality of laptops provided in my company which crash or fail due to some hardware problems, I thought about writing up this blog post to help all those web developers who face problems in setting up their computers for web development. This is not a post for developers who want to work on Windows. So, only developers who prefer Linux may read further.


1) Install Linux :

This is the first step towards setting up your machine. I used Ubuntu 11.04 as the Linux OS. I downloaded it from the internet and then installed on my machine after creating a bootable USB using the application provided in the OS download.


2) Install Netbeans :

I prefer Netbeans IDE for my development. Its upto you whatever IDE you want to install but I have listed the steps to install Netbeans. I installed Netbeans IDE 7.0 with all the possible language support like C, C++, Java, PHP etc. along with the bundled servers.

i) Download the Netbeans installation file from http://netbeans.org/downloads/. Its entirely up to you to select and download what all language support you want in your IDE and what suits you best.

ii) Meanwhile, the Netbeans installation file gets downloaded, you can install JVM on your machine, which is required by the Netbeans installer.

iii) Go to the Synaptic Package Manager and search for the JVM packages. Once you find them, mark them for installation and click on apply. The JVM packages would start downloading.

iv) Once you complete with JVM installation and complete downloading the Netbeans installation file. You need to install Netbeans. The downloaded file would be an .sh extension file. So, to run this file, you need to execute the following command in the terminal after you move to the downloaded file's folder:

sudo sh <Name of the Downloaded File>

v) Now, follow the instructions shown by the installer to the install the Netbeans IDE.


3) Install LAMP Server : 

This is the most important installation as far as web development is concerned. LAMP stands for (L)inux (A)pache (M)ySQL (P)HP. Its similar to WAMP server provided in Windows. So, to install LAMP, go to the terminal and type the following command:
sudo apt-get install lamp-server^

Now, to check if the LAMP was setup properly, hit the url:

http://localhost

If the url givres you a response, "It Works !", then you can be sure of the correct installation of the Apache web server.

Now, if you want to install PHPMyAdmin for your machine, run the following command in the terminal.

sudo apt-get install phpmyadmin

During this installation, you will be asked to choose an administrator account along with a password. Also, when it asks for a choice of configuration, select 'Apache' and then select 'Yes' for dbconfig-common.

Once, you complete with the PHPMyAdmin, don't forget to restart the Apache server. Without this, PHPMyAdmin won't work properly. To restart the Apache server, run the following command in the terminal.

sudo service apache2 restart

If it still does not work, run the following command and then again restart the server.

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf

That's it for installing the LAMP Server.


4) Install RabbitVCS :

If you are working in a team over a project, you will definitely need a Version Control System. I installed RabbitVCS on my machine for this purpose. Run the commands given below in the order to complete RabbitVCS installation.

i) sudo add-apt-repository ppa:rabbitvcs/ppa

ii) sudo apt-get update

iii) sudo apt-get install rabbitvcs-core

iv) sudo apt-get install rabbitvcs-nautilus rabbitvcs-thunar rabbitvcs-gedit rabbitvcs-cli

After running all these commands successfully, you need to restart your machine to completely integrate RabbitVCS into your system.


5) Install xDebug :

This is an essential tool for any developer. For PHP debugging, I preferred xDebug. Its really easy to install. Just open the terminal and run the command given below.

sudo apt-get install php5-xdebug

Once you have installed it, go to the xdebug.ini file. You can go to the file using this command and open it in edit mode.

sudo gedit /etc/php5/apache2/conf.d/xdebug.ini

Now, change the file so it looks like this:

zend_extension="/usr/lib/php5/20090626/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000


The zend_extension will already be set. So, you need not change it. But if you don't have it. Find the file xdebug.so in php5 folder and copy its path to zend_extension.

Now you can check if your debugger is installed correctly with phpinfo(). You should see the text something like the one given below:

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.0.5, Copyright (c) 2002-2008, by Derick Rethans
with Suhosin v0.9.29, Copyright (c) 2007, by SektionEins GmbH

Hope that this blog post will help you in setting up your machine easily !! Your comments and feedbacks are highly welcomed on this post. If you find any thing or tool installation that I have missed regarding Web Development Setup, please feel free to write back.

Comments

  1. really very nice article in setting up machine after install ubuntu OS.


    loving it !!!!!!!!!!!!!!!!!!

    ReplyDelete

Post a Comment

Popular Posts