First Step into Web Developing on Linux Platform : Frequently Asked Questions, Problems and Solution

[All these problems and solutions are occurred and tested in a Linux Ubuntu 11.10 x86 machine.]

Q. Do I have to install the Apache HTTP Server, PHP, MySQL separately and write codes in the terminal?

Ans: No, there is a stack called XAMPP. XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl.

Q. Pheww! Then how to install XAMPP?

Ans: You can get XAMPP for linux from:

http://www.apachefriends.org/en/xampp-linux.html

Move/Copy the downloaded file (xampp-linux-*.*.*.tar.gz) from your downloads folder to your home folder.

Extract the downloaded archive file to /opt by opening the Terminal and writing:

sudo tar xvfz xampp-linux-1.7.7.tar.gz -C /opt

(Give your password if promted. Remember, DON’T use any Microsoft Windows tools to extract the archive, it won’t work.)

XAMPP is now installed in the /opt/lampp directory (Look in the File System!).

Q. How to start XAMPP?

Ans: To start XAMPP simply call this command:

sudo /opt/lampp/lampp start

Q. How to test XAMPP if it is working properly?

Ans: Just type in the following URL at your favourite web browser:

http://localhost

Now you should see the start page of XAMPP containing some links to check the status of the installed software and some small programming examples (e.g Flash Art).

Q. Okay, That was sweet! Now I want to know, where to put my websites in XAMPP?

Ans: You will have to ‘Put’ your websites at /opt/lampp/htdocs directory.

But, you will not be able to pasting/moving/writing/overwriting in any directory of the File System.

In Ubuntu, it is protected by a super user account. This ‘root’ log in is disabled by default. But, don’t worry, thanks to our friend called ‘nautilus’, we can access the protected area.

Type ‘gksu nautilus’ in the terminal.

A new file explorer will pop up. You can access all the protected areas by nautilus.