Installation XAMPP

From Wiki Against Mines

Revision as of 04:19, 2 May 2008; Irina Stobbe (Talk | contribs)
(diff) ←Older revision | Current revision | Newer revision→ (diff)
Jump to: navigation, search

Back to installation manual.

This manual is about the installation and configuration of XAMPP on a Windows and a Linux system.

XAMPP is a webserver distribution including basic elements Apache HTTP Serer, MySQL Databse Server, and scripting languages PHP and Perl. This distribution’s maxime is a simple and easy way to install and handle the included packages.

XAMPP is available in four different versions. It is available for Linux, Windos, Mac OS and Solaris based systems. It follows a XAMPP installation and configuration manual for these versions.

You can download all versions for free at: official Homepage of XAMPP.

Contents

Requirements and package content of XAMPP

XAMPP for Linux

The distribution for Linux (tested for SuSE, RedHat, Mandrake, and Debian) includes among others: Apache HTTP Server, 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, OpenLDAP (client), mcrypt, mhash, eAccelerator, SQLite and IMAP C-Client.

System requirements for thisinstallation are a running Linux system and an available XAMPP distribution.

The current version is XAMPP Linux 1.6.4. You can find it at Homepage of XAMPP for Linux.

You can ddownload XAMPP with the Downloadmanager wget directly to the Linux-System. For that purpose please execute the following command:

wget http://www.apachefriends.org/download.php?xampp-linux-1.6.4.tar.gz

If download is completed you can find the XAMPP-package in the index where you have executed the download.

XAMPP for Windows

The distribution for Windows (testd or Windows 98, 2000 and XP) includes among others: Apache HTTPD 2.2.6, MySQL 5.0.45, PHP 5.2.4 + 4.4.7 + PEAR + Switch, MiniPerl 5.8.7, Openssl 0.9.8e, PHPMyAdmin 2.11.1, XAMPP Control Panel 2.5, Webalizer 2.01-10, Mercury Mail Transport System v4.01a, FileZilla FTP Server 0.9.23, SQLite 2.8.15, ADODB 4.94, Zend Optimizer 3.3.0, XAMPP Security, Ming.

System requirements for the installation are a running Windows 98, 2000, or XP system and an available XAMPP-distribution.

The current Version is XAMPP Windows 1.6.4. You can find that one at XAMPP Homepage for Windows.


You can download for Windows in three different versions.

  • Installer-Version

The easy way: XAMPP with installation routine.

  • Ordinary ZIP-Archiv

For purists: XAMPP as a simple ZIP-archive.

  • Self-extracting ZIP-archive

the economically way: XAMPP as a very small self-extracting 7-ZIP-archive.


Please download the Installer-Version (ca. 34 MB).

XAMPP installation for Windows

XAMPP Control Panel
Enlarge
XAMPP Control Panel
The Installer Version is dedicated to beginner. The menu is multilingual and leads you through the routine. In case you are using a Windows NT system it is recommended to have administrator rights.


First of all please execute the exe-file you have just downloaded. Afterward you just have to name the path where XAMPP should be installed to and click “install”. That is it.

Now XAMPP can be started or stopped via the control panel on your desktop. You also can find it at Start|Programme|apachefriends|xampp.

You have the possibility to start and stop and to cinfigure Apache and MySQL as well. To use MediaWiki it is required that both services are running.

Another possibility is to start and stop the services via command prompt. To do so, please go to your installation directory and execute the exe- or bat-file in the folder \xampp:


Datei Bedeutung
.\xampp\xampp_start.exe Apache & MySQL start
.\xampp\xampp_stop.exeApache & MySQL stop
.\xampp\apache_start.batnur Apache start
.\xampp\apache_stop.batnur Apache stop
.\xampp\mysql_start.batnur MySQL start
.\xampp\mysql_stop.batnur MySQL stop
.\xampp\filezilla_setup.batFileZilla Server erst einrichten
.\xampp\filezilla_start.batFileZilla Server start
.\xampp\filezilla_stop.batFileZilla Server stop


Installation Test

XAMPP Control Panel
Enlarge
XAMPP Control Panel
After starting Apache please type-in the following address into your Browser http://localhost or http://127.0.0.1 The XAMPP-start-page opens.

XAMPP configuration or Windows

Service installation

Using Windows NT4, 2000, or XP you can install the server, included in XAMPP, as a service. The advantage is that you do not have to start each service manually after starting the computer. Please execute the bat-file In the following directory:

File Meaning
.\xampp\apache\apache_installservice.bat Apache Service install
.\xampp\apache\apache_uninstallservice.batApache Service uninstall
.\xampp\mysql\mysql_installservice.batMySQL Service install
.\xampp\mysql\mysql_uninstallservice.batMySQL Service uninstall
.\xampp\filezilla_setup.batFileZilla Service (un)install


Security of XAMMP

As mentioned before XAMPP is not intended for productionally use but for developers in development environment. That implicates that XAMPP is not very restrictive but in contrast much more open pre-configured. That is ideal for a developer because there are no system boundaries. In contrast that is not very useful for a production environment. Here is a list of things that are not very secure intentionally:

  • The MySQL-Administrator (root) has no password.
  • The MySQL-Daemon is accessible via network.
  • PhpMyAdmin is accessible via network.
  • XAMPP directory is not protected.
  • Well known example user at FileZilla FTP and Mercury Mail Server.


All the given aspects can lead to profoundly security problems if the system is running unprotected and accessible for everyone via internet. Therefore the protection of the system is up to you. In most cases a firewall or an internet connection via an external router is enough to gain protection. A first aid might be the "XAMPP security center".


Securitybereich
Enlarge
Securitybereich
If you want to run XAMPP within a network, to make the XAMPP-server accessible for others, please go to the following URL to eliminate the most common security problems.:
http://127.0.0.1/security

Here you can make a port check, setup the rooot password vorMySQL and PHPMyAdmin and the directory security for the XAMPP-pages as well.

However with this webbased console you can not eliminate all the security problems. For instance the required setting of the FileZilla and the Mecury Server, especially the valid users. If you do not need these server just do not start tehm!

Archive documents

The folder for all web-documents is \xampp\htdocs. If you are saving a file called "test.html" for instance to this folder, you can access it via URL http://localhost/test.html. You also can create a new sub-folder: Just create a new folder like “new” at \xampp\htdocs (without spaces and special characters). Insert a new file and try to acces it via http://localhost/neu/test.html.


Change from PHP 4 and PHP 5

XAMPP is able to use PHP5 and PHP4 as well. You can switch between both PHP versions with \xampp\php-switch.bat. ATTENTION: The Apache server needs tto be stopped!

Where can I find it?

File / Directory Meaning
\xampp\apache\logs Log directory for Apache and PHP.
\xampp\cgi-bin\Das CGI-BIN-directory.
\xampp\apache\conf\httpd.conf central configuration file for the Apache-Webserver.
\xampp\apache\bin\php.inicentral configuration file for PHP with MOD_PHP
\xampp\htdocs\central document directory for HTML, PHP, CGI ..
\xampp\install\required for the first set-up ...
\xampp\mysql\The database server MySQL
\xampp\perl\The Perl-directory.
\xampp\php\php.exe + dlls + pear usw.
\xampp\phpmyadmin\config.inc.phpThe configuration file for phpMyAdmin.
\xampp\tmpTemp. Ordner für PHP-Uploads, Sessions usw.
\)xampp\moddavMOD-DAV sample folder.


Configuration of MySQL Servers with PhpMyAdmin

Please have a look at [[WM_II:Installation_XAMPP#Configuration_of_MySQL-Server_with_PhpMyAdmin|]].

Uninstall XAMPP for Windows

To remove the INSTALLER Version of XAMPP please use the appropriate UNINSTALL Routine. You can find it at the XAMPP-directory; it is called uninstall.

\xampp\uninstall.exe 

Usig this routine all of the useless Windows registry entries of XAMPP are going to be deleted.

XAMPP Installation for Linux

Installation

To install the distribution it is required to logged on to the system as root. You can do that by using the following command. su root Now you are going to asked for the root password. Please type it in and press enter to confirm

The XAMPP-distribution exists as a packed archive. Please go to the directory where XAMPP was downloaded. Now please extract this archive to the directory /opt. You can do that with the following command:

tar xvfz xampp-linux-1.6.4.tar.gz -C /opt

The program tar extracts (x), the file (f) xampp-linux-1.6.4.tar.gz, which is gzip-stuffed (z) show all file names (v) to the directory /opt (-C /opt).

Please note:

  • Please extract the archive with exactly the command from abovel! Do not use Windows-tools to extract your files. That won’t work.
  • a former installed XAMPP-version will be overwritten by using this command. In this case it is better to use a XAMPP-Upgrade.

XAMPP for Linux now is installed at the directory /opt/lampp.

Start

To start XAMPP you have to type in the following command:

/opt/lampp/lampp start

Now there should be the following note on your screen:

Start XAMPP for Linux 1.6.4...
XAMPP: Start Apache with SSL...
XAMPP: Start MySQL...
XAMPP: Start ProFTPD...
XAMPP started.

Finished, XAMPP was started successfully (APACHE HTTP Server, MySQL-Server and ProFTPD).

In case there are occurring some problems, you may find some help at XAMPP fü Linux FAQ.


Installation Test

To test the installation please go to the XAMPP start page using your web browser. Type in the LINUX-machine’s IP-address (e.g. 192.168.0.1) into your Browsers.

http://192.168.0.1

Now you should be able to see the XAMPP start page.

Even if you have created your own start page later on, you are always able to reach the XAMPP start page via http:// 192.168.0.1/xampp.

Picture of the XAMPP-start page

On this page you can find several links (Bio rhythm, guestbook, instant art, flash art, phone book) to check the installation and some small sample programs.


XAMPP handling for Linux

Advanced start and stop parameter

Up to now you just learned how to start the XAMPP-systems. However XAMPP can be started with a lot more parameters. You can find these parameter in the following table.

Parameter Meaning
start Starts XAMPP.
stopStops XAMPP.
restartStops XAMPP and restarts afterwards.
reloadApache, MySQL and – if started - ProFTPD newly read in of your configuration files. It is required if you made changes in your configuration files which should work without restarting the correspondent component.
securityCarrys out a security check for XAMPP and eliminates possible gaps.
startapacheStarts just the Apache HTTP Server.
startsslStarts the Apache HTTP Server with SSL-support. Now the Apache is also accessable via SSL at https:// IP-Adresse!

With that command the SSL-support is activated permanently. That means, starting XAMPP next time, SSL-support is activated automatically.

startmysqlStartet nur den MySQL-Server.
startftpStarts only the ProFTPD-Server. The FTP-Server is pre-configured, so you are enabled to upload the HTML-file to the XAMPP-server, using the user "nobody" and the password "lampp".

Attention: You should create a new password immediately. You can create it easily using the security-parameter. (Please have a look at the paragraph configuration XAMPP for Linux, below)

Using this command the FTP-server is activated permanently. That means even with restarting XAMPP, the FTP-server is started as well.

stopapacheThe Apache HTTP Server is stopped.
stopsslApache HTTP Server SSL-support is deactivated. Even with restarting the Apache HTTP Server the SSL-support is still deactivated.
stopmysqlStops the MySQL-Server.
stopftpStops the Pro-FTPDServer. It is not going to be started, even with a restart of XAMPP.
reloadapacheThe Apache HTTP Server reads in its configuration files.
reloadmysqlThe MySQL-Server reads in its configuration files.
reloadftpThe ProFTPD-Server reads in its configuration files.

To start for instance only the MySQL-Server you can use the following command:

/opt/lampp/lampp startmysql

Now the MySQL-Server should be started!

FTP-access to the Webserver

If the ProFTPD-Server was started additionally with starting XAMPP you are able to access the Apache HTTP Server HTdocs-directoy via any FTP-program.

By default the user is nobody and the password lampp.

For security reasons you should change ProFTPD server password. Please have a look at Configuration paragraph.

PHP 4 or PHP 5

Within XAMPP you have the possibility to switch between two different versions of PHP. You can choose between PHP version 5.x or PHP version 4.x. By default PHP version 5.x. is activated. Because some web applications do not support PHP 5.x yet, you can activate the former PHP Version 4.x.


The following command activates PHP version 4.x:

/opt/lampp/lampp php4

The following command switches back to PHP 5.x:

/opt/lampp/lampp php5

Which version is currently running can be figured out with the following command:

/opt/lampp/lampp phpstatus

What is where?

Characteristically for Unix XAMPP for Linux does not use a graphical user interface for its configuration and administration. Configuration and administration is working via configuration files. Please find the most important configuration files included in the XAMPP software packages in the following table.

File / Directory Meaning
/opt/lampp/bin Here the commands for XAMPP handling are located. The command /opt/lampp/bin/mysql calls the MySQL-Monitor for instance.
/opt/lampp/htdocsThis is the Apache HTTP Server document root directory. Here the web server’s web pages are located.
/opt/lampp/etc/httpd.confCentral configuration-file for the Apache-Webserver.
/opt/lampp/etc/my.cnfThe configuration-file for the MySQL-Database server.
/opt/lampp/etc/php.iniThe configuration-file for PHP.
/opt/lampp/etc/proftpd.confThe configuration-file for ProFTPD.
/opt/lampp/phpmyadmin/config.inc.phpThe configuration-file for phpMyAdmin, a graphical, web based interface to configure the MySQL-Server.

Stop XAMPP

To stop XAMPP you can use the following command:

/opt/lampp/lampp stop

Now XAMPP should be stopped and there should be the following note on your screen:

Stop XAMPP for Linux 1.6.4...
XAMPP: Stop Apache...
XAMPP: Stop MySQL...
XAMPP: Stop ProFTPD...
XAMPP closed.

In that case XAMPP was shout down successfully.

XAMPP configuration for Linux

XAMPP Security

XAMPP was developed for a development environment. Here usability and functionality is more important then security. That implies that XAMPP is pre-configured less restrictive. For a productive environment this configuration is not appropriate.

Following aspects are configured less secure intentionally:

  1. The MySQL-Server-Administrator (root) has no password.
  2. The MySQL-Daemon is accessible via network.
  3. The ProFTPD-Daemon uses the password lampp.
  4. PhpMyAdmin is accessible via network.
  5. MySQL and Apache HTTP Server are running with the same user identification (nobody).

Within the Xampp-Demo-pages you can find the aspect Security check. Here you can see the current security settings.

If you want to run the XAMPP-Server so, it can be accessed by others, you have to modify the security settings. You can do that with the following command:

/opt/lampp/lampp security

This program checks the security settings and makes proposals e.g. how to set passwords or how to protect the system.

Afterwards you can be sure that your XAMPP-system is protected. For more information please go to Sicherheitsabschnitt in der Linux-FAQ.

MySQL-Server Configuration with PhpMyAdmin

XAMPP offers enhanced configuration possibilities for the MySQL server via the web based tool PhpmyAdmin. With that you are able to create Command prompt version of MySQL-Server the required data bases and MediaWiki users.

The following paragraph is about the handling of PHPMyAming.

Calling PhpmyAdmin

Registration screen PhpmyAdmin
Enlarge
Registration screen PhpmyAdmin
Start page PhpmyAdmin
Enlarge
Start page PhpmyAdmin

Please log on to the XAMPP-Start page (if you was running the security check). Please select the link phpMyAdmin of the menu. Now you are going to be forwarded to the phpMyAdmin page. Please log on with the database user root and your MySQL-password you have set during the security check.

Additionally you can choose your language within PhpmyAdmin. There are several languages available (e.g. German, English, Spanish, French, Chinese)

If you were able to logon, you are now on phpMyAdmin main page.

If you were unable to logon, please check whether the password and user was correct.

Create Database

To create a database please select the link “database”. Now you geet an overview about all already installed databases within the database system. In the lower part of the window you have the possibility to create a database.

Create a database

Please name the database name wikiuser and click on the button create.

You will get an acknowledgement that the database was created successfully.

Swich back to the start page of PhpmyAdmin (Button Button Start page in the menu on the left).

Create User

To create MediaWiki access to the database you have to create a new user. Use the link rights, to get an overview about existing users of the MySQL-Server.

Click on the link Create New User, to create a new user.

Link new user

Please name the user name 'wikiuser' on the following page, select loakl as host within the drop-down menu and set a password (e.g. 'P@ssw0rd').

Create a user

Please confirm with the button 'OK' to create the user.

Set user rights

Image:Datenbankrechte1.gif
Global database rights

Within the next step you are requested to change the 'wikiuser' user rights. By default this user has no database rights. Please leave the global rights. Please just chose the databse 'wikidb' within the paragrpaph database specific rights within the drop-down menu. Now you are going to be forwarded to a new page where you can set the 'wikiuser' user rights for the database 'wikidb'. Please select the following rights: thumb|Database rights wikidb

  • Daten
    • SELECT
    • INSERT
    • UPDATE
    • DELETE
  • Struktur
    • CREATE
    • ALTER
  • Administration
    • LOCK TABLES

Please confirm your entry with 'OK'. Rights will be set and you will be forwarded back to the site of the database specific rights.

Now please chose back to start page of PhpmyAdmin (Button Schaltfläche Eingangsseite within the menu on the left).

Log off PhpmyAdmin

To logg off PhpmyAdmin please click on the button Log off within the menu on the left. You will be log off and forwarded to the PhpmyAdmin log on screen. Now you can log on again

Uninstall XAMPP for Linux

To uninstall XAMPP you just have to remove the XAMPP directory and its subdirectories. Please stop XAMPP for Linux before.

Please note Sie: If you are executing the following command both, the whole XAMPP installation and configuration as well as the information stored on the webserver and database are deleted irrevocably. Therefore please save all files and your database entries before!

The following command deletes the XAMPP-directories including all its subdirectories irrevocably: rm -rf /opt/lampp Hence XAMPP is uninstalled.

Assessment

Please answer the following questions for revision click and click the button "Marking". In case you have reached less then 13 points it is recommendet to read the XAMPP paragrph again carefully!


References


Continue with Installation of MediaWiki

Back to installation manual.