XAMPP

From Cheaha
Jump to navigation Jump to search


Attention: Research Computing Documentation has Moved
https://docs.rc.uab.edu/


Please use the new documentation url https://docs.rc.uab.edu/ for all Research Computing documentation needs.


As a result of this move, we have deprecated use of this wiki for documentation. We are providing read-only access to the content to facilitate migration of bookmarks and to serve as an historical record. All content updates should be made at the new documentation site. The original wiki will not receive further updates.

Thank you,

The Research Computing Team

Overview

XAMPP is an open source AMPP (Apache, MySQL, PHP, and Perl) stack from Apache Friends. XAMPP provides a simple and easy way for developers to create and test web applications based on PHP, Perl, Python etc. XAMPP is only for development activity and not intended for hosting web apps for production use. XAMPP provides the ability to backup development activity to easily migrate to a production stack. Documented here is how to install, secure, and backup XAMPP.

Install

The XAMPP version installed in the following steps will be the beta version. beta version of XAMPP has more recent versions of the core packages (Apache, MySQL, PHP, phpMyAdmin).

NOTE: Early on, it will save a lot of grief, by checking which version is required for each of the PHP/Perl/Python applications to be developed and then choose an XAMPP stable/beta version accordingly for your development. For eg., see this note on the incompatibility with stable version of XAMPP for mediawiki development.

Mac OS X

  1. Download xampp beta for mac os x.
  2. Install by
    1. Opening the DMG-Image.
    2. Drag'n'Drop the XAMPP folder into your Applications folder.
  3. Open up XAMPP Control to start Apache, MySQL services or can even start from command line with
$ sudo /Applications/XAMPP/xamppfiles/xampp start

For more command line options, look up

$ sudo /Applications/XAMPP/xamppfiles/xampp --help

Linux

Configure

XAMPP requires its services to be started as root. So, make sure you have root privileges to start xampp (should likely change the config of xampp to run as non-root user, later...).

  • Since a developer's main activity/files is usually the user's $HOME, the default xampp's Apache config should be changed to resolve web server access permissions and paths.
  • The default xampp's httpd configuration runs as root initially and then switches to a user nobody and group nogroup. Replace nobody and nogroup to the current user/group details. For eg.,

Mac OS X

cd /Applications/XAMPP/etc

open httpd.conf as root and add the following changes (replace with your actual user/group settings)

#User nobody
#Group nogroup
User pnm
Group staff

Linux

Secure

The default xampp install is not secured for its services ie., mysql, apache etc. Secure xampp by setting passwords for various services. The user names for the different services (which are not easily apparent) are listed here:

xampp service username
xampp ui xampp (mac)
xampp ui lampp (linux)
mysql root
mysql pma
phpmyadmin pma

To secure xampp

Mac OS X

$ sudo /Applications/XAMPP/xamppfiles/xampp security

Linux

Backup

Backup your xampp config, log and data files with the backup option. This creates a backup file ie., a shell script. To restore your backup, just run the shell script created as a result of running the backup command.


Mac OS X

$ sudo /Applications/XAMPP/xamppfiles/xampp backup

Linux

References