Linux XAMPP Integrated Package installation configuration method

Source: Internet
Author: User

To hang our PHP Web program on a Linux server, you have to build a PHP operating environment on the server first. Of course, if you are using a VPS, you choose the system with a WDCP version of Linux, will automatically help you install the environment, and the Chinese management interface to facilitate your management of your Linux server, add new sites, new FTP, link database, etc., novice recommended to use this, However, not every one is provided with WDCP, million net of no, Huaxia has.

Now in Linux to build the operating environment of PHP, there are 4 kinds of common ways:

Use the XAMPP integrated installation package "includes Php,mysql,apache,phpmyadmin,ftp,perl"-–XAMPP official website: www.apachefriends.org
Use the LNMP integrated installation package "includes php,mysql,nginx,phpmyadmin"--LNMP official website: lnmp.org
Direct Source Independent Installation Php,mysql,nginx/apache
In the integrated installation package, Windows Server can also be built using XAMPP, LNMP without Windows platform. Windows is commonly used under the Phpnow,phpnow now renamed to Servkit, the website of the original website is phpnow.org, now also replaced by servkit.org. Windows Server under the PHP environment to build a tutorial later.
Advantages and disadvantages of XAMPP, LNMP, independent source installation environment

The first and XAMPP second LNMP are integrated packages, installation is more convenient, a third independent source code installation, this is more trouble, Linux does not have a certain familiarity is difficult to install success, unfamiliar words even according to the online tutorial step-by-step, the middle of a step is not successful and do not know how to deal with.
The difference between the first xampp and the second LNMP look inside the software that knows, the biggest difference is that Xampp used is APACHE,LNMP with Nginx, and nginx in the processing of large concurrent access to the ability above will be stronger than Apache. Nginx can also support module functionality, but Nginx does not support Apache. htaccess, there is a relatively apache,nginx configuration of the virtual host a little bit of trouble (in fact, with the familiar also do not feel Trouble). More differences, we can own Baidu.
PHP development Environment Php,mysql,nginx/apache Source code installation so troublesome, where is the advantage, if it is independent installation, then we installed what, that software needs that version can be determined by ourselves, integrated installation package is a dead version of the software (if you need to upgrade, That's what happened after the installation. Another major advantage is that stand-alone installations do not install many of the software that might not be needed or load other unwanted modules like the integrated installation package, which takes up the resources of the Linux system. Since our Linux system is specifically to hang our website, can run less other things will run less.
Recommended order

Standalone source installation Php,mysql,nginx/apache > Lnmp > Xampp

However, I would like to explain each of the installation methods. This time, first of all, the simplest XAMPP installation (take CentOS to install XAMPP as an example).

1, check your Linux system's number of digits, is 32-bit or 64-bit. Use the uname-a command to view.

Show a

X86_64 means you are a 64-bit kernel, running a 64-bit system.

i386, i686 you are a 32-bit kernel, running a 32-bit system.

Mine is a virtual machine, with 32-bit installed.

2, first download the XAMPP installation package. Open URL: https://www.apachefriends.org/zh_cn/download.html, select the version you want, according to the Linux system number of digits to download


My 32-bit, the choice of 1.8.3 version, PHP version is 5.5, in the "Download bit" right button, view the link address, get download address:

Http://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/1.8.3/xampp-linux-1.8.3-5-installer.run

3, the use of Linux wget command to download, before downloading into the OPT folder, otherwise we do not know where we download files to go.

Cd/opt
wget Http://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/1.8.3/xampp-linux-1.8.3-5-installer.run
This time he downloaded himself, the process of the following figure:


4, then we first give 755 permissions, in case of insufficient permissions, can not install

Chmod-r 755 Xampp-linux-1.8.3-5-installer.run
5, then we run this installation file

./xampp-linux-1.8.3-5-installer.run
6, the installation process is not much said, and do not have to set anything, but is to ask you to determine some options, there are questions, directly press ENTER down. XAMPP is installed by default under/OPT/LAMPP

7, after installation, and did not run, we need to manually start the XAMPP service, that is, start apache,ftp and MySQL these servers. Using commands

/opt/lampp/lampp start
8, the environment installed, but the MySQL password is how much, FTP account password is also how many? We do not know, this default is empty, we also need to set ourselves. "To first write in the text before copying the security point, otherwise the password is set to what you do not remember the" input command

SUDO/OPT/LAMPP/LAMPP Security


As shown in the picture: He will ask you in turn

1, the first Input XAMPP Control Panel password (user name is XAMPP);

2, enter the phpMyAdmin password (user name is PMA)

3, enter the MySQL password (username is root)

4, enter the FTP password (username is daemon, default port 21)

"In the middle of a few mistakes, so let me repeat the input, you can ignore"

9, in the browser to enter the server IP access look at the success of it? If you are outside the net should not be able to, because the hint below this:


Look at the path, we did not move the default folder to put items, so the default open index.php, and then jumped to the Xampp folder below, into the XAMPP Web management interface. This is because the server is set up XAMPP does not allow remote access.

10, the site file default is placed under the/opt/lampp/htdocs folder, the above problem, if you do not need the XAMPP Web Control Panel, the Htdocs folder under the files and folders with the command or link just the FTP all deleted can be, Then upload your website file up; If you still want this, edit httpd-xampp.conf this file to set up

Vi/opt/lampp/etc/extra/httpd-xampp.conf
Found it

Locationmatch "^/(?: xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"
Require Local
ErrorDocument 403/error/xampp_forbidden.html.var
Change into

Locationmatch "^/(?: xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"
Require all granted
ErrorDocument 403/error/xampp_forbidden.html.var
That is to change the Require local to Require all granted. Save the file and use the command/opt/lampp/lampp restart restart XAMPP. Then put the files under the Htdocs folder into a new folder, and then upload their own site files using ftp uploaded "upload, use the chmod-r 755/opt/lampp/htdocs command to give permissions, or upload failure."

phpMyAdmin Address: http://your domain name or ip/phpmyadmin "to enter phpMyAdmin username and password, the user name is PMA, the password is just set"
FTP address for your IP, username: daemon, port 21
Now we have completed the XAMPP environment. Other settings can go online Baidu, or in the following message.

Related Article

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.

Tags Index: