XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and to use.
Simply click on one of the links below. It's a good idea to get the latest version.
A complete list of downloads (older versions) is available at SourceForge.
After downloading simply type in the following commands:
chmod 755 xampp-linux-x64-7.3.8-2-installer.run
That's all. XAMPP is now installed below the
To start XAMPP simply call this command:
You should now see something like this on your screen:
Starting XAMPP 7.3.8... LAMPP: Starting Apache... LAMPP: Starting MySQL... LAMPP started.
Ready. Apache and MySQL are running.
If you get any error messages please take a look at the Linux FAQ.
OK, that was easy but how can you check that everything really works? Just type in the following URL at your favourite web browser:
Now you should see the start page of XAMPP containing some links to check the status of the installed software and some small programming examples.
As mentioned before, XAMPP is not meant for production use but only for developers in a development environment. The way XAMPP is configured is to be open as possible and allowing the developer anything he/she wants. For development environments this is great but in a production environment it could be fatal.
Here a list of missing security in XAMPP:
- The MySQL administrator (root) has no password.
- The MySQL daemon is accessible via network.
- ProFTPD uses the password "lampp" for user "daemon".
- PhpMyAdmin is accessible via network.
- Examples are accessible via network.
- MySQL is running under "mysql".
- Apache is running under "daemon".
To fix most of the security weaknesses simply call the following command:
It starts a small security check and makes your XAMPP installation quite secure. For example this protects the XAMPP demo pages by a username ('lampp') and password combination.
START AND STOP PARAMETERS
|restart||Stops and starts XAMPP.|
|startapache||Starts only the Apache.|
|startssl||Starts the Apache SSL support. This command activates the SSL support permanently, e.g. if you restarts XAMPP in the future SSL will stay activated.|
|startmysql||Starts only the MySQL database.|
|startftp||Starts the ProFTPD server. Via FTP you can upload files for your web server (user "nobody", password "lampp"). This command activates the ProFTPD permanently, e.g. if you restarts XAMPP in the future FTP will stay activated.|
|stopapache||Stops the Apache.|
|stopssl||Stops the Apache SSL support. This command deactivates the SSL support permanently, e.g. if you restarts XAMPP in the future SSL will stay deactivated.|
|stopmysql||Stops the MySQL database.|
|stopftp||Stops the ProFTPD server. This command deactivates the ProFTPD permanently, e.g. if you restarts XAMPP in the future FTP will stay deactivated.|
|security||Starts a small security check programm.|
For example: To start Apache with SSL support simply type in the following command (as root):
You can also access your Apache server via SSL under https://localhost/.
What is where? A big question of our existens, here are some answers! ;)
IMPORTANT FILES AND DIRECTORIES
|/opt/lampp/bin/||The XAMPP commands home. /opt/lampp/bin/mysql calls for example the MySQL monitor.|
|/opt/lampp/htdocs/||The Apache DocumentRoot directory.|
|/opt/lampp/etc/httpd.conf||The Apache configuration file.|
|/opt/lampp/etc/my.cnf||The MySQL configuration file.|
|/opt/lampp/etc/php.ini||The PHP configuration file.|
|/opt/lampp/etc/proftpd.conf||The ProFTPD configuration file.|
|/opt/lampp/phpmyadmin/config.inc.php||The phpMyAdmin configuration file.|
|/opt/lampp/logs/php_error_log||The PHP error log file.|
sql_mode = ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
To stop XAMPP simply call this command:
You should now see:
Stopping LAMPP 1.8.2... LAMPP: Stopping Apache... LAMPP: Stopping MySQL... LAMPP stopped.
And XAMPP for Linux is stopped.
To uninstall XAMPP just type in this command:
rm -rf /opt/lampp
LoadModule rewrite_module modules/mod_rewrite.so
#LoadModule rewrite_module modules/mod_rewrite.so
-> Running more than one web site on a single machine
Create a symbolic link between a directory which you have read and write permissions in with htdocs.
sudo ln -s /home/USERNAME/workspace/project /opt/lampp/htdocs
and enter root password when prompted.
To run a local test server on Open SuSE Linux 42.2 64-bit edition the following standard applications have to be installed:
- MariaDB / MySQL (default database)
- php7 and mysql support for php7
- Apache2 web server (default webserver)
- phpMyAdmin (gui for access to MariaDB / MySQL)
Got all the latest security updates?
sudo zypper update
Changing the default localhost folder
Consider to create a user-defined folder for your server document (easier backup, to prevent loss of data in case of a new installation or OS upgrade). By default, apache will operate on the “/srv/www” folder. The documents in this folder will be visible from the URL http://localhost.
before each command.
mkdir -p /home/$USER/ www/htdocs
Setting user-defined permissions
If your server documents are in /home/$USER/www/htdocs directory run
sudo chown -R www-data:www-data /home/$USER/www/htdocs
to give ownership of the DocumentRoot folder to the user www-data and group www-data.
Then you can add yourself to the group www-data
sudo adduser $USER www-data
Finally, you need to make the DocumentRoot folder writable by owner (www-data user) and to your self (as part of the www-data group):
sudo chmod -R 775 /home/$USER/www/htdocs
Install http Server wizard
This wizard will help you configure your apache document root later:
sudo zypper install yast2-http-server
The MariaDB / MySQL database can be installed by using zypper. Type the below command:
zypper install mariadb
To make your database access more secure call this command:
and follow the instructions.
The Apache web server can be installed by typing:
zypper install apache2
To install PHP7 and MySQL support for php7 copy and paste the following command:
zypper install apache2-mod_php7 php7 php7-gd php7-ftp php7-mysql php7-pear php7-gettext php7-mbstring php7-mcrypt php7-odbc php7-openssl php7-sockets php7-xmlrpc php7-fastcgi
Download phpMyAdmin and untar to your DocumentRoot (e.g. /home/$USER/www/htdocs)
tar -xzvf phpMyAdmin_x.x.x-all-languages.tar.gz /home/$USER/www/htdocs
Start MySQL server:
Check if it is running:
Start Apache server:
Check if it is running:
Check which version of php5 is running:
You might also want to confirm PHP works by starting up your favorite text-editor (for example kwrite or gedit) and copy/paste the code below into it.
Stop apache and mysql:
/usr/sbin/rcapache2 stop ; /usr/sbin/rcmysql stop
Uninstall apache2, mysql, php5. Be carefull! Only uninstall the following:
zypper rm apache2-mod_php7 php7 php7-gd php7-ftp php7-mysql php7-pear php7-gettext php7-mbstring php7-mcrypt php7-odbc php7-openssl php7-sockets php7-xmlrpc php7-fastcgi
MAMP installs a local server environment in a matter of seconds on your macOS or Windows computer. MAMP comes free of charge, and is easily installed. MAMP will not compromise any existing Apache installation already running on your system. You can install Apache, Nginx, PHP and MySQL without starting a script or having to change any configuration files! Furthermore, if MAMP is no longer needed, just delete the MAMP folder and everything returns to its original state (i.e. MAMP does not modify any of the "normal" system).