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.
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
- Download xampp beta for mac os x.
- Install by
- Opening the DMG-Image.
- Drag'n'Drop the XAMPP folder into your Applications folder.
- 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
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
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
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 ui||xampp (mac)|
|xampp ui||lampp (linux)|
To secure xampp
Mac OS X
$ sudo /Applications/XAMPP/xamppfiles/xampp security
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