Linux--Ubuntu desktop installation Xampp

Source: Internet
Author: User


First, please download the latest version of XAMPP from

installationIf it is a xampp compressed file

Copy the Xampp compressed file to the/OPT and unzip it. If your computer does not have a/opt directory, use the "sudo mkdir/opt" command to create the directory.

If the computer does not have the sudo command, use the SU command and enter the superuser password to switch to the super user.

Use the following command to copy the file to/OPT:
$sudo cp/doc/xampp-linux-x.x.tar.gz/opt //"/doc/" indicates the path of the current XAMPP file

Enter the opt/directory and unzip the file using the following command:
$ cd/opt
$ sudo tar zxvf xampp-linux-x.x-x.tar.gz/opt

If XAMPP is the installation file (. Run)

$sudo cp/doc/ //"/doc/" indicates the path of the current XAMPP file

$ cd/opt

$ sudo

Warning: Only allow XAMPP to be installed using the above command. Do not use any Microsoft Windows tools to release compressed files, which is no use.

Warning 2: When you use this command, older versions of XAMPP that already exist will be overwritten.

This is the end. The XAMPP is installed in the/OPT/LAMPP directory.

Note: The "SU: Authentication failed" error may occur after the SU command because the root user is locked out by default after Ubuntu installation, does not allow login, and does not allow "su" to root. This is more secure and should be. The following methods can be used to resolve

Use the passwd command to reset the root password. As follows

1 [email protected]:~$ sudo passwd  2 password:<---Enter the password for that user at installation 3 Enter the new UNIX password:<---New root user password 4 re-enter the new UNIX password: <-- -Repeat the new root user password 5 passwd: Successfully updated password  6 [email protected]:~$ su  7 password: <--Enter the new password reset  8 [email protected]:/home/xxx #         #已经进入root用户

Start Running

Use the following command to start running XAMPP:

Sudo/opt/lampp/lampp start

You should be able to see a message similar to the following on the screen:

Starting XAMPP for Linux 1.7.3a ... Xampp:starting Apache with SSL (and PHP5) ... Xampp:starting MySQL ... Xampp:starting ProFTPD ... XAMPP for Linux started.

All right. Apache and MySQL are running.


Well, that's simple, but how do you detect if all the components are working correctly? Just enter the following link in your browser:


You should now see a link to detect the working status of installed software and a XAMPP start page for some sample programs.

Security Settings

As mentioned earlier, XAMPP is not intended for production environments and is intended for use by the development environment only. XAMPP is set to be as open as possible and provides the developer with any features he or she wants. This is great for the development environment, but it can be deadly for production environments.

Here's a list of XAMPP. Lack of security protection:

To fix most of the security weaknesses, simply execute the following command:


It enables a small security check feature to make the XAMPP you install more secure.

Other Parameters

Advanced Start and Stop parameters

Parameter description start start XAMPP. Stop stops XAMPP. Restart Restart XAMPP. Startapache only launches Apache. Startssl initiates SSL support for Apache. The command will continue to activate SSL support, for example: After executing the command, if you shut down and restart the Xampp,ssl will still be active. Startmysql only starts the MySQL database. Startftp start the ProFTPD server. Via FTP, you can upload files to your Web server (username "Nobody", Password "lampp"). The command will continue to activate ProFTPD, for example: After executing the command, if you close and restart Xampp,ftp will still be active. Stopapache Stop Apache. Stopssl Stop the Apache SSL support. The command will continue to stop SSL support, for example: After executing the command, if you shut down and restart the Xampp,ssl will still be in the stopped state. Stopmysql Stop the MySQL database. Stopftp Stop ProFTPD Server. The command will continue to stop ProFTPD, for example: After executing the command, if you close and restart Xampp,ftp will still be in the stopped state. Security launches a small security check procedure.

For example: To enable Apache with SSL support, simply enter the following command:

Sudo/opt/lampp/lampp Startssl

You can now access the Apache server in the form of SSL https://localhost.

Catalogue Description

Important Files and directories

File/directory Purpose/opt/lampp/bin/xampp command library. For example,/opt/lampp/bin/mysql executable MySQL monitor. /opt/lampp/htdocs/apache the document root directory. /opt/lampp/etc/httpd.conf Apache configuration file. /OPT/LAMPP/ETC/MY.CNF MySQL configuration file. /opt/lampp/etc/php.ini PHP configuration files.

/opt/lampp/etc/proftpd.conf proftpd Preparation file. (starting from version 0.9.5)/opt/lampp/phpmyadmin/ phpmyadmin preparation file.


To stop XAMPP, simply enter the following command:

Sudo/opt/lampp/lampp stop

You should now be able to see:

Stopping Lampp 1.7.3a ... Lampp:stopping Apache ... Lampp:stopping MySQL ... Lampp stopped.

Then XAMPP's Linux version stops running.


To uninstall XAMPP, simply enter the following command:

Stop the XAMPP first


Then run the following folder to delete the command directly

sudo rm-rf/opt/lampp

Uninstall complete.

If you want ordinary users to be able to write Htdocs directories, modify the directory permissions.

$ sudo chmod-r a+rw/opt/lampp/htdocs

Xampp:couldn ' t start mysql! solution (MySQL service not start)

$ sudo chmod 777-r/opt/lampp/var

Using the control user connection that is defined in the configuration file to resolve the aromatic method

1. Locate the configuration file (or, rename it to first) in the root directory of the installation phpMyAdmin and open it with Notepad.

2. Find $cfg[' Servers ' [$i] [' controlpass '] = ' ******* ' in the open configuration file; This section of which ******* is your password, default is empty, modify it to your phpmyadmin on the modified password.

3, if your user name has also been modified to find $cfg[' Servers ' [$i] [' controluser '] = ' root '; This section, where Root is your username, change it to your modified username.

Existing configuration file (./ is not readable.

$ sudo chmod 644

To start or stop XAMPP:
$ sudo/opt/lampp/lampp Start & Stop

XAMPP graphical panel under Linux

$ cd/opt/lampp/share/xampp-control-panel
$ sudo./xampp-control-panel

You can also use commands to create a boot menu:

Open "System"-"preferences"-"main Menu"-"Programming"-"New Project"

Name: lampp command: Gksu/opt/lampp/share/xampp-control-panel/xampp-control-panel

Note: Gksu is intended to run as root, prompting you to enter a password

For convenience: Edit: System-Preferences-main Menu-programming then click New Project, enter the name lampp input command: Sudo/opt/lampp/share/xampp-control-panel/xampp-control-panel save to

The next time from the program, you can start the LAMPP management interface directly

XAMPP command
Installing XAMPP
Tar xvfz xampp-linux-1.6.4.tar.gz-c/opt

/opt/lampp/lampp start

/opt/lampp/lampp stop

Restart XAMPP

Security settings

Using PHP4
/opt/lampp/lampp PHP4

Using PHP5
/opt/lampp/lampp PHP5

View PHP Version
/opt/lampp/lampp Phpstatus

Start Apache only
/opt/lampp/lampp Startapache

Stop Apache
/opt/lampp/lampp Stopapache

To launch SSL support for Apache
/opt/lampp/lampp Startssl

Stop the Apache SSL support
/opt/lampp/lampp Stopssl

Start MySQL database only
/opt/lampp/lampp Startmysql

Stop MySQL Database
/opt/lampp/lampp Stopmysql

Start the ProFTPD server
/opt/lampp/lampp startftp

Stop ProFTPD Server
/opt/lampp/lampp stopftp

Auto-start with system

Cancel auto-run with system
Ln-s/opt/lampp/lampp K01lampp

Uninstalling XAMPP

XAMPP Important Files and directories
XAMPP Command Library. Example/opt/lampp/bin/mysql executable MySQL monitor

Apache Document root directory

Apache Compounding File

MySQL configuration file

PHP Configuration Files

ProFTPD the configuration file. (starting from version 0.9.5)

PhpMyAdmin Compounding File

Linux--Ubuntu desktop installation Xampp

Related Article

Beyond APAC's No.1 Cloud

19.6% IaaS Market Share in Asia Pacific - Gartner IT Service report, 2018

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.