Linux--Ubuntu desktop installation Xampp

Source: Internet
Author: User
Tags phpmyadmin startssl
First, please download the latest version of XAMPP from www.xampp.org.

Install if it is xampp compressed file
Copy the xampp compressed file to / opt and unzip it. If your computer does not have the / opt directory, use the "sudo mkdir / opt" command to create the directory.

If the computer does not have a sudo command, use the su command and enter the superuser password to switch to the superuser.

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

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

 

If xampp is an installation file (.run)
$ sudo cp /doc/xampp-linux-5.6.8-0-installer.run / opt // "/ doc /" indicates the path of the current xampp file

$ cd / opt

$ sudo xampp-linux-5.6.8-0-installer.run

Warning: Only use the above command to install XAMPP. Do not use any Microsoft Windows tools to release compressed files, this is useless.

Warning 2: When using this command, the existing old version of XAMPP will be overwritten.

This is the end. XAMPP is installed in the / opt / lampp directory.

 

Note: The "su: authentication failed" error may appear after the su command. The reason is that after Ubuntu installation, the root user is locked by default, and login is not allowed, nor "su" to root. This is more secure and should be. Can be solved as follows

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

 1 [email protected]: ~ $ sudo passwd
 2 Password: <--- Enter the password of the user during 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: The password has been successfully updated
 6 [email protected]: ~ $ su
 7 Password: <-Enter the reset new password
 8 [email protected]: / home / xxx # #Has entered the root user
start operation
Use the following command to start running XAMPP:

sudo / opt / lampp / lampp start
You should 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.

test
Ok, this is simple, but how do you detect if all components are working properly? Just enter the following link in your browser:

http: // localhost
You should now see the XAMPP start page with links to detect the working status of the installed software and some sample programs.

Security Settings
As mentioned earlier, XAMPP is not suitable for production environments, but only for development environments. XAMPP is set to be as open as possible and provide the developer with any function he / she wants. This is great for a development environment, but it can be fatal for a production environment.

Here is a list of XAMPP's lack of security:

1. The MySQL administrator (root) has no password.
2. MySQL can be accessed via the network.
3. ProFTPD uses "lampp" as the password for the username "nobody".
4. PhpMyAdmin can be accessed via the network.
5. The sample program can be accessed via the network.
6. MySQL and Apache run under the same username (nobody).
To fix most of the security weaknesses, simply execute the following command:

sudo / opt / lampp / lampp security
It will enable a small security check function to make your XAMPP installation more secure.

Other parameters
Advanced start and stop parameters

Parameter Description
start Start XAMPP.
stop Stop XAMPP.
restart Restart XAMPP.
startapache only starts Apache.
startssl starts Apache's SSL support. This command will continue to activate SSL support. For example, after executing this command, if you close and restart XAMPP, SSL will still be activated.
startmysql only starts the MySQL database.
startftp starts the ProFTPD server. Through FTP, you can upload files to your web server (username "nobody", password "lampp"). This command will continue to activate ProFTPD, for example: after executing this command, if you close and restart XAMPP, FTP will still be activated.
stopapache Stop Apache.
stopssl stops Apache's SSL support. This command will continue to stop SSL support. For example, after executing this command, if you close and restart XAMPP, SSL will still be in a stopped state.
stopmysql Stop the MySQL database.
stopftp Stop the ProFTPD server. This command will continue to stop ProFTPD, for example: after executing this command, if you close and restart XAMPP, FTP will still be in a stopped state.
security starts a small security check program.
For example: To enable Apache with SSL support, simply enter the following command:

sudo / opt / lampp / lampp startssl
Now you can access the Apache server via SSL https: // localhost.

 

Catalog description
Important files and directories

File / Directory
/ opt / lampp / bin / XAMPP command library. For example, / opt / lampp / bin / mysql can execute the MySQL monitor.
/ opt / lampp / htdocs / Apache 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 file.
/opt/lampp/etc/proftpd.conf ProFTPD configuration file. (Since version 0.9.5) /opt/lampp/phpmyadmin/config.inc.php phpMyAdmin configuration file.

Stop XAMPP
To stop XAMPP, simply enter the following command:

sudo / opt / lampp / lampp stop
You should now see:

Stopping LAMPP 1.7.3a ...
LAMPP: Stopping Apache ...
LAMPP: Stopping MySQL ...
LAMPP stopped.
Then the Linux version of XAMPP stopped running.

 

Uninstall
To uninstall XAMPP, simply enter the following command:

Stop XAMPP first

sudo / opt / lampp / uninstall
Then run the following folder directly delete command

sudo rm -rf / opt / lampp
Uninstallation is complete.

 


If you want ordinary users to be able to write htdocs directory, please modify the directory permissions.

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

XAMPP: Could n’t start MySQL! Solution (Cannot start mysql service)

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

Use the control defined in the configuration file to control user connection failure

1. Find the config.inc.php configuration file in the root directory where phpMyAdmin is installed (it may be config.sample.inc.php, first rename it to config.inc.php) and open it with Notepad.

2. In the opened configuration file, find $ cfg ['Servers'] [$ i] ['controlpass'] = '*******'; "where ******* is your The password is blank by default. Change it to your modified password on phpMyAdmin.

3. If your user name has also been modified, find $ cfg ['Servers'] [$ i] ['controluser'] = 'root'; this paragraph, where root is your user name, modify it to your The modified user name.

Existing configuration file (./config.inc.php) is not readable.

 $ sudo chmod 644 config.inc.php
Start or stop xampp:
$ sudo / opt / lampp / lampp start & stop

Tips:
XAMPP graphical panel under Linux

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

You can also use the command 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 to run as root and will prompt you to enter the password

 

For convenience: Edit: System-Preferences-Main Menu-Programming Then click on New Project, enter the name lampp Enter the command: sudo / opt / lampp / share / xampp-control-panel / xampp-control-panel

 

Next time you can start the lampp management interface directly from the program


XAMPP command
Install XAMPP
tar xvfz xampp-linux-1.6.4.tar.gz -C / opt

Start XAMPP
/ opt / lampp / lampp start

Stop XAMPP
/ opt / lampp / lampp stop

Restart XAMPP
/ opt / lampp / lampp restart

Security Settings
/ opt / lampp / lampp security

Use php4
/ opt / lampp / lampp php4

Use php5
/ opt / lampp / lampp php5

View php version
/ opt / lampp / lampp phpstatus

Only start Apache
/ opt / lampp / lampp startapache

Stop Apache
/ opt / lampp / lampp stopapache

Enable Apache's SSL support
/ opt / lampp / lampp startssl

End of Apache's SSL support
/ opt / lampp / lampp stopssl

Only start MySQL database
/ opt / lampp / lampp startmysql

Stop the MySQL database
/ opt / lampp / lampp stopmysql

Start ProFTPD server
/ opt / lampp / lampp startftp

Stop ProFTPD server
/ opt / lampp / lampp stopftp

Start automatically with the system
ln -s / opt / lampp / lampp /etc/rc.d/rc3.d/S99lampp
ln -s / opt / lampp / lampp /etc/rc.d/rc4.d/S99lampp
ln -s / opt / lampp / lampp /etc/rc.d/rc5.d/S99lampp

Cancel automatic operation with the system
ln -s / opt / lampp / lampp K01lampp

Uninstall XAMPP
rm -rf / opt / lampp

XAMPP important documents and objectives record
XAMPP command library. For example / opt / lampp / bin / mysql can execute MySQL monitor
/ opt / lampp / bin /

Apache document root
/ opt / lampp / htdocs /

Apache configuration file
/opt/lampp/etc/httpd.conf

MySQL configuration file
/opt/lampp/etc/my.cnf

PHP configuration file
/opt/lampp/etc/php.ini

ProFTPD configuration file. (Since version 0.9.5)
/opt/lampp/etc/proftpd.conf

phpMyAdmin configuration file
/opt/lampp/phpmyadmin/config.inc.php

Linux-install xampp on ubuntu desktop

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: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.