XAMPP: Easy Apache, MySQL, PHP, Perl Install and Config For Linux, Windows, Mac OS, and Solaris

by SathiyaMoorthy on January 12, 2011

To run various open source applications you might have to install Apache, MySQL, PHP, and Perl (or some combination of these). For those who have difficulties installing and configuring these separately, XAMPP might be helpful.

XAMPP is Apache distribution that contains MySQL, PHP and Perl. You really don’t need to worry about configuring MySQL, PHP, or Perl for Apache. Just install XAMPP, and everything is already pre-built and ready to go. It is that easy!

Also, XAMPP is available for Linux, Windows, Mac OS, and Solaris.

1. Download XAMPP

Download XAMPP from xampp in sourceforge.

2. Install XAMPP

Extract the tar file under /opt directory.

# cd /opt
# tar xvzf xampp-linux-1.7.3a.tar.gz

Note: For those who prefer to install the individual components separately, you can also install Apache from source, MySQL, PHP from source, or install LAMP using yum.

3. Start or stop XAMPP

Start xampp. It starts all the xampp services.

# /opt/lampp/lampp start

Stop xampp. It stops all the xampp services.

# /opt/lampp/lampp stop

4. Start particular XAMPP service

Start a particular service by specifying the name of the service along with start. For example, following starts only Apache (along with PHP).

# /opt/lampp/lampp startapache
XAMPP: Starting Apache with SSL (and PHP5)...

Note: Use startmysql in the argument to start only mysql

5. Stop particular service

Similar to start, you can also stop a particular server. For example, following stops only MySQL.

# /opt/lampp/lampp stopmysql
XAMPP: Stopping MySQL...

6. XAMPP Configuration file

Configuration files are available under /opt/lampp/etc/. Some of the xampp config files are httpd.conf, my.cnf, php.ini.

7. XAMPP uninstallation

Remove the /opt/lampp directory to uninstall xampp.

# rm -rf /opt/lampp

Linux Sysadmin Course Linux provides several powerful administrative tools and utilities which will help you to manage your systems effectively. If you don’t know what these tools are and how to use them, you could be spending lot of time trying to perform even the basic administrative tasks. The focus of this course is to help you understand system administration tools, which will help you to become an effective Linux system administrator.
Get the Linux Sysadmin Course Now!

If you enjoyed this article, you might also like..

  1. 50 Linux Sysadmin Tutorials
  2. 50 Most Frequently Used Linux Commands (With Examples)
  3. Top 25 Best Linux Performance Monitoring and Debugging Tools
  4. Mommy, I found it! – 15 Practical Linux Find Command Examples
  5. Linux 101 Hacks 2nd Edition eBook Linux 101 Hacks Book

Bash 101 Hacks Book Sed and Awk 101 Hacks Book Nagios Core 3 Book Vim 101 Hacks Book

{ 7 comments… read them below or add one }

1 dpminusa January 12, 2011 at 6:35 am

How sensitive is XAMPP to different distros? I use Gentoo. They stress using their emerge system (similar to CPAN or PEAR if you are not familiar with it). They discourage other installations.

2 j January 12, 2011 at 6:46 am

cool. nice tip, thx

3 Lunamystry January 12, 2011 at 7:18 am

how does this compare to uniform server? I a beginner in servers and development of web apps and I would like something like this.

4 Ted January 12, 2011 at 9:25 am

This is an excellent post. I have used XAMPP on both linux and Windows and it works flawlessly. This stack is wonderful starting place for anyone who wants to
learn about MySQL or Apache or PHP.

You should make to follow the security advisory as right out of the box this is a totally open system.

Highly recommended!

5 Simon January 12, 2011 at 9:32 pm

This is a great package and works well, straight out of the box. I’ve been using it for over 5 years now, particularly when needing to do development work on Windows machines

Another alternative on Ubuntu Linux (don’t know about other distro’s) is to run tasksel.
> ‘sudo tasksel install lamp-server’
This will install the whole Apache/MySQL/PHP without a hitch, combine that with
> ‘sudo apt-get install phpmyadmin’
For a MySQL admin interface and you’ve got a winner.

6 Martin Gee January 20, 2011 at 4:43 pm

Xampp haven’t been updated for ages and all the stuff is way old. If you’re a windows user there are so many good reasons for using UniformServer, http://www.uniformserver.com/, instead including new versions of Apache server (2.2.17 vs 2.2.16), PHP (5.3.5 vs 5.3.1), MySQL (5.5.8 vs 5.1.41) and myPhpAdmin (3.3.9 vs 3.2.4). And people are working on this project!

7 senthil February 28, 2011 at 8:40 pm

Hi,

I was try lot of script (in ubuntu) to start xampp service while booting the system. But it doesn’t work…. Any idea……

Leave a Comment

Previous post:

Next post: