From ArchWiki
Revision as of 05:23, 17 June 2010 by Ptmkenny (talk | contribs) (moved the start/stop/restart commands from the "Manual Install" section to a "using XAMPP" section, as they are valid for the aur install as well)
Jump to: navigation, search

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end


XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. It contains: Apache, MySQL, PHP & PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, gdbm, zlib, expat, Sablotron, libxml, Ming, Webalizer, pdf class, ncurses, mod_perl, FreeTDS, gettext, mcrypt, mhash, eAccelerator, SQLite and IMAP C-Client.

How to install



  1. Download the latest version from here.
  2. In the terminal run the following from the folder where the archive was downloaded to:
    sudo tar xvfz xampp-linux-*.tar.gz -C /opt

NOTE: If you are running 64-bit arch, you must install lib32-glibc and lib32-gcc-libs.

sudo pacman -S lib32-glibc lib32-gcc-libs


Use the following commands to control XAMPP:
sudo /opt/lampp/lampp {start,stop,restart}

Uninstalling Xampp

All the files needed by Xampp to be installed are located in the previous /opt/lampp folder. So, to uninstall Xampp, consider this command.

# rm -rf /opt/lampp

NOTE:If you had create symlinks, you need to destroy them too!

Hosting Files Outside the htdocs directory

The document root (web root) directory is located at /opt/lampp/htdocs/. All files placed in this directory will be processed by the web server.

To host other files on your system with XAMPP, you can configure an alias with apache.

  1. Edit apache's httpd.conf with your favorite editor.
    nano /opt/lampp/etc/httpd.conf
  2. In the Alias section, add an alias:
Alias /shortname /full_file_path
    <directory /full_file_path> 
        AllowOverride FileInfo Limit Options Indexes
        Order allow,deny
        Allow from all
Don't forget to restart apache:
/opt/lampp/lampp restart

This will allow you to host files from your home directory (or any other directory) with XAMPP.

In the above example, you can access the files by pointing your web browser to localhost/shortname.