Wednesday, August 5, 2009

Install Apache webserver,mysql,perl and php

For all those who dont have apache server,mysql,perl and php on your Linux OS here's a way you can install.
People who have installed Fedora 8/9[Full installation] all the above gets installed automatically. But if you have installed other distributions like Ubuntu, Open SUSE, Red Hat etc, here is a way you can do.

If you install the above softwares separately its a very tedious job believe me. But you need not do that. The idea was suggested by my class mate Abdul Munim. There is a package by name XAMPP which installs everything including many cool things.So how do you go about it

So wat is XAMPP??
XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use - just download, extract and start.

So how do you go about it?
At first you need to download the package file.You can find the file: here
Now copy the file to your home directory.Now you are three steps away:-)

Step 1: Installation
Go to a Linux shell and login as the system administrator root:
#su

Extract the downloaded archive file to /opt:
#pradeep@pradeep-laptop:tar xvfz xampp-linux-1.7.1.tar.gz -C /opt

Warning 1: Please use only this command to install XAMPP. DON'T use any Microsoft Windows tools to extract the archive, it won't work.
Warning 2: already installed XAMPP versions get overwritten by this command.

Step 2: Start
To start XAMPP simply call this command:
pradeep@pradeep-laptop:/opt/lampp/lampp start

You should now see something like this on your screen:
Starting XAMPP 1.7.1...
LAMPP: Starting Apache...
LAMPP: Starting MySQL...
LAMPP started.


Step 3: Test
OK, that was easy but how can you check that everything really works? 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.

You are done now. If you any queries/problems regarding the installation,please post in the comments and i will try to fix the problem:-)

7 comments:

Munim said...

Very helpful post.
Thanks for posting! :-)
Btw, love your new theme and toolbar!

roide said...

hi, nice to know about xampp. :)

But the best way to install on linux is(if u dont want to build from source code) is to use the package manager.
Fedora like u mentioned, is easy to handle because of yum, but
apart from fedora , normally all other distribution are shipped with the default package manager "apt".
Its easy to use as well. :)

In case people who dont know about it, u can find more informaion about it, here
http://www.debian.org/doc/manuals/apt-howto/

and the list of distributions that use apt here
http://www.debian.org/doc/manuals/apt-howto/ch-distros.en.html

Anyway, xampp is good as well. Just thought of mentioning "apt".

roide said...

hi, nice to know about xampp. :)

But the best way to install on linux is(if u dont want to build from source code) is to use the package manager.
Fedora like u mentioned, is easy to handle because of yum, but
apart from fedora , normally all other distribution are shipped with the default package manager "apt".
Its easy to use as well. :)

In case people who dont know about it, u can find more informaion about it, here
http://www.debian.org/doc/manuals/apt-howto/

and the list of distributions that use apt here
http://www.debian.org/doc/manuals/apt-howto/ch-distros.en.html

Anyway, xampp is good as well. Just thought of mentioning "apt".

Pradeep said...

@roide I agree apt-get or yum's easy. But lampp has every thing in it. one command installs everything and one command starts everyhting.

Elvis said...

You might as well consider:
sudo apt-get -y install mysql-server apache2 libapache2-mod-php5 php5 php5-mysql

One line.
And there is no need to start anything once it is installed.
You get the latest build.

ra said...

hi this raghu from C.I.T.gubbi,tumkur.i am using fedora 9(sulphur release).i followed ur procedure to install xampp package.but after starting- its giving message
XAMPP:Another webserver dameon is already running.
even mysql,php,perl is not working.plz try to fix this problem.

raghu said...

hi this Raghu.I am using fedora 9 but i installed defalut bcoz i hv only 512mb rom.i tried xampp but its giving msg like another web server is running and mysql is also not working.plz try to fix this problem