PHP+MYSQL Website Development Environment Erection (3): XAMPP

Source: Internet
Author: User
Tags ftp connect mysql pack php and filezilla filezilla ftp apache tomcat

XAMPP is a relatively powerful local test platform, although the panel is in English, but clearly understandable. Registration as a system service has the advantage that the boot can automatically run, but will consume a certain amount of system resources, how to choose their own users to decide. After the installation is successful and the service is successfully started, the browser can open the input http://localhost/and try to succeed. In the XAMPP web page option, there is Chinese support, as if many people are using XAMPP.

Software Download: http://www.apachefriends.org/zh_cn/xampp-windows.html

XAMPP is:
Windows/solaris/linux/macos + Apache + MySQL + Perl

1. To XAMPP website Download the latest version xampp, URL: www.xampp.org
I copy the URL to download the linux-1.6.8a.tar.gz directly ">http://jaist.dl.sourceforge.net/sourceforge/xampp/xampp-linux-1.6.8a.tar.gz

2. Download to find the download folder and then execute: TAR-XZVF xampp-linux-1.6.8a.tar.gz-c/opt (Note: Extract installation to opt directory)
3. Enter the XAMPP decompression directory execution:./lampp start Startup success occurs:
Starting XAMPP for Linux 1.6.8a ...
Xampp:starting Apache with SSL (and PHP5) ...
Xampp:starting MySQL ...
Xampp:starting ProFTPD ...
XAMPP for Linux started.

4.ifconfig view your IP and then enter http://192.168.1.2 in the URL bar (Note: Write your own IP) test pass will show lampp welcome page
Such as:
Welcome to use XAMPP for Linux 1.6.8a!
Congratulations to you:
You have successfully installed the xampp!

Now you can start using Apache and other components. First, you can see whether they are working properly by using the status feature on the navigation bar on the left.

You can verify OpenSSL by browsing https://127.0.0.1 or Https://localhost

Good luck, Kai "Oswald" Seidler + Kay Vogelgesang

Attached: If you need to uninstall, stop the service first:./lampp stop, then perform RM delete entire directory OK, isn't it convenient
Picture:/root/.tencent/qq//appdata/file//sendpix1.jpg

installation process

Method A: Install using the installation package

Installing XAMPP using the installation package is the easiest way to do this.

Installation wizard for XAMPP Win32

After the installation process is complete, you will find XAMPP under the Start/Program/xampp menu. You can use the XAMPP Control Panel to start/Stop all services or install/uninstall all services.

The XAMPP Control Panel can start/stop Apache, MySQL, Filazilla, and Mercury, or directly install it as a service

Method B: Install without using the installation package

If you do not need to install the package, you can download the 7-zip compression pack or ZIP compression package and extract it into the folder of your choice.

In this diagram, we extract the XAMPP into the D:\program files\xampp folder under the D:\program files path. After that, open the folder where XAMPP resides and run the "Setup-xampp.bat" in it.

This allows the path information in the configuration file to be updated.

Finally, enable different services through the "Xampp-control.exe" of those batch files or graphical interfaces.

Note: If you are using a XAMPP installation package, you do not need to run "Setup_xampp.bat".

» I want to use xampp!«without manual configuration

If you extract XAMPP to the root directory (such as C:\XAMPP or D:\XAMPP, and so on), you can try to start XAMPP directly. This means that you do not need to run "Setup_xampp.bat" to configure it first. Apache, MySQL, and Mercury mail servers can start correctly! Only the FileZilla FTP server will not start because it requires an absolute path. Use this method to note: Do not extract into the dual Xampp folder (such as C:\XAMPP\XAMPP)! You can use only one Xampp folder (such as D:\xampp (\apache, and so on). If you use a dual folder, you must first run the Setup-xampp.bat configuration process.

Operations Guide

Operation 1: Start/stop/test XAMPP

The XAMPP Control Panel made by Www.nat32.com is not included in the Lite version (compact version).

. \xampp\xampp-control.exe

Other service start/stop scripts

Start Apache and Mysql:.\xampp\xampp_start.exe

Stop Apache and Mysql:.\xampp\xampp_stop.exe

Start Apache:.\xampp\apache_start.bat

Stop Apache:.\xampp\apache_stop.bat

Start Mysql:.\xampp\mysql_start.bat

Stop Mysql:.\xampp\mysql_stop.bat

Start Mercury mail server:. \xampp\mercury_start.bat

(The Mercury mail server can only be stopped through the graphical interface of the XAMPP Control Panel)

Set up FileZilla FTP server:. \xampp\filezilla_setup.bat

Start FileZilla FTP server:. \xampp\filezilla_start.bat

Stop FileZilla FTP server:. \xampp\filezilla_stop.bat

Test: After the Apache service starts, enter address http://localhost or http://127.0.0.1 in the browser and detect all XAMPP samples and tools.

Action 2: Configure a specific server as a system service

You can configure a specific server as a system service on the NT4, 2000, and XP platforms. Please use the following script:

Install Apache Server for System services:. \xampp\apache\apache_installservice.bat

Uninstall the Apache server's system services:. \xampp\apache\apache_uninstallservice.bat

Install MySQL Server for System services:. \xampp\mysql\mysql_installservice.bat

Uninstall the MySQL Server System services:. \xampp\mysql\mysql_uninstallservice.bat

Install and uninstall FileZilla FTP Server for System services:. \xampp\filezilla_setup.bat

Mercury Mail server: Currently can not be configured for system services!

Action 3: Install the Plugin

In addition to the main package, there are a number of related plug-ins available for the development environment. At present, the official Win32 Plug-ins issued by the site are as follows:

Perl plug-ins that contain Mod_perl and selected important Perl modules

Tomcat Plug-in (System requirements: The SUN j2se SDK must already be installed in the system)

Cocoon module of the Tomcat plug-in (System requirements: Tomcat must be installed in the system)

Python Plugin

Recommended installation methods are as follows: XAMPP installation package needs to install package format Plug-ins, 7-zip compression package requires 7-zip compression package format Plug-ins. ZIP Compression Package Format Plug-ins Please extract directly into the XAMPP home folder. Then run the "setup_xampp.bat" batch file. Install package format plug-in can automatically configure all things, you do not need to manually configure.

Note: Anyone can write a new XAMPP plugin for his project. For example, you can

Http://sourceforge.net/projects/xamppaddon find other XAMPP plug-ins.

Action 4: Upgrade XAMPP

When a separate component in the XAMPP assembly is upgraded, we will upgrade the XAMPP synchronously. However, the changes to some of these components are incompatible with our latest release, so we will not upgrade such components. We can usually upgrade all the servers and programs in XAMPP. But we do not upgrade the profile because you may have modified them already. Tip: If you are using the installation package version of the XAMPP, you will be very relaxed when using the upgrade installation package. Other users please download the self-extracting 7-zip compression pack. Release the files directly into the XAMPP folder and overwrite the original file.

Security issues (Must read!)

XAMPP Security Console

As mentioned earlier, XAMPP is not intended for the production environment, it is for developers only. For the convenience of developers, XAMPP is configured to open all features by default. This is great for the development environment, but it can be catastrophic for a production environment.

The following is a list of security issues for the XAMPP default configuration:

The MySQL administrator (root) does not have a password set.

The MySQL server can be accessed over the network.

phpMyAdmin can be accessed over the network.

Examples can be accessed over the network.

Users of the Mercury mail server and FileZilla FTP server are public.

So you should ensure XAMPP security before releasing something online. Sometimes, a firewall or an external router is safe enough. First, you can try a network-based "XAMPP security console."

Fix the vast majority of security vulnerabilities by simply accessing the following address (accessible only on the local computer):

Pre-1.4.15 version:

http://127.0.0.1/xampp/xamppsecurity.php

1.4.15 Edition and later version:

Http://127.0.0.1/security

The MySQL, phpmyadmin Administrator password and XAMPP directory protection can be set here. For Mercury mail servers and FileZilla FTP servers, remember to change configuration settings (such as username and password). If you don't need these services, don't start them-it's also safe.

Unloading

Removal Method A: Install package

Use the XAMPP Uninstall tool that you installed with the install package (NSI) to uninstall! The Uninstall tool will uninstall the relevant content in the registry and some services together. The uninstall tool that you bring is shown in the following illustration.

  

Removal methods B:zip and 7-zip compression packs

The uninstall method differs depending on the version of the XAMPP installation you are using:

Zip Compression Package

Self-extracting 7-zip compression package

XAMPP Lite (Lite edition)

Simply delete the entire XAMPP folder when uninstalling. Does not involve registry keys, environment variables are not involved ... Simple and clean! But don't forget to shut down all XAMPP components and exit all the panels. Perhaps you have installed some XAMPP components as system services, then you must uninstall these services first!

Problems

Question 1: What is XAMPP Lite (compact version)?

XAMPP Lite (compact version) is similar to the XAMPP recommended PHP and MySQL quick use package. It has fewer tools than the full version, such as Mercury mail servers or Filezila FTP servers. Note: There are no associated installation packages, Plug-ins, or upgrade packs for the Lite version.

Question 2: Where should I put my Web documents?

All network documents are placed in the Htdocs home folder (. \xampp\htdocs). If you put the test.html file here, you can access it through http://localhost/test.html. PHP or CGI files are also placed here. Other WWW subfolders can be created in the Htdocs directory. For example, placing the test.html under the. \xampp\htdocs\new path allows you to enter http://localhost/new/test.html in the address bar of the browser to access the file.

More file features Overview:

CGI) executable: All; end allowed:. CGI => Main Package

PHP) executable: All; allowed end:. php. php4. php3. phtml => Main Package

MOD perl) executable:. \xampp\htdocs\modperl; allowed end:. pl => Perl Plugin

ASP perl) executable:. \xampp\htdocs\modperlasp; end of allowed:. asp => Perl Plugin

JSP Java) Executable:. \xampp\tomcat\webapps\java (and others); end allowed:. JSP => Tomcat Plug-in

Servlets Java) Executable:. \xampp\tomcat\webapps\java (and others); end allowed:. HTML (and other) => Tomcat Plug-ins

MOD Python) executable:. \xampp\htdocs\python; allowed end:. py => python plug-in Spyce python) executable:. \xampp\htdocs\python; allowed end:. Spy = > Python Plugins

Question 3: Can I move XAMPP?

Can, but only limited to Zip/7-zip compression package version of the XAMPP. After the move operation, you must run "setup-xampp" to make the configuration file updated. Please do not attempt to install version of XAMPP in this way. If you are using the installation version of XAMPP, you can copy (rather than move) a copy of it, place it under a new path, and then run "setup-xampp" to make the configuration file updated. Give it a try!:)

Question 4: How do I configure the default start page?

If you access a folder similar to http://localhost/xampp/in a browser, the Apache server automatically returns a default Start page. Apache automatically looks for an existing index page similar to index.php. The "DirectoryIndex" command in HTTPD.CONF is responsible for this function. Here you can define the name and protocol of the default start page. XAMPP in the default state, the list of "DirectoryIndex" directives is as follows:

index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.html.var index.phtml

Question 5: How can I switch between PHP5 and PHP4?

XAMPP (not compact version!) Contains PHP5 and PHP4. Use the "Php-switch.bat" ($path-to-xampp\xampp\php-switch.bat) to toggle the version. Note: Please stop the Apache server before switching versions.

Question 6: Where can I change the configuration file?

You can change various configuration files for XAMPP through a text editor. These files exist in the following path:

Apache basic configuration:. \xampp\apache\conf\httpd.conf

Apache ssl:.\xampp\apache\conf\ssl.conf

Apache Perl (Plug-in only):. \xampp\apache\conf\perl.conf

Apache Tomcat (Plug-in only):. \xampp\apache\conf\java.conf

Apache Python (plugin only):. \xampp\apache\conf\python.conf

Php:.\xampp\php\php.ini

Mysql:.\xampp\mysql\bin\my.ini

phpmyadmin:.\xampp\phpmyadmin\config.inc.php

FileZilla FTP server:. \xampp\filezillaftp\filezilla server.xml

Mercury mail Server Basic configuration:. \xampp\mercurymail\mercury. Ini

Sendmail:.\xampp\sendmail\sendmail.ini

Question 7: Do I need to connect to the network when I run XAMPP?

No need! You can use XAMPP offline.

Question 8: What are these folders?

Path content

\xampp\anonymous Anonymous FTP Sample folder

\xampp\apacheapache Server

\xampp\cgi-bin executable CGI Script

\xampp\filezillaftpfilezilla FTP Server

\xampp\htdocshttp a document's home folder

\xampp\install for XAMPP installation (do not delete!)

\xampp\licenses ditto

\xampp\mercurymailmercury Mail SMTP POP3 IMAP server

\xampp\mysqlmysql Server

\xampp\perlperl

\xampp\phpphp (4 and 5)

\xampp\phpmyadminphpmyadmin

\xampp\security Additional Security Configuration

\xampp\tmp temporary folder

\xampp\webalizerwebalizer Network Status

Examples of \xampp\webdavwebdav

Related information

Where can I find more information (frequently asked questions, etc.)?

Please visit our XAMPP Windows FAQ (FAQ):

Http://www.apachefriends.org/zh_cn/faq-xampp-windows.html

or to our forum to ask questions:

http://www.apachefriends.org/f/

XAMPP and System Services

For all nt/2000 users, you will find an installation/uninstall file that configures all servers as system services in the package's respective path.

Apache_installservice.bat => Install Apache for system services

Apache_uninstallservice.bat => Uninstall Apache's system services

Mysql_installservice.bat => Install MySQL for system services

Mysql_uninstallservice.bat => Uninstall MySQL's system services

Don't forget to restart your computer after you make changes to the above servers. Please note! Don't forget to stop the MySQL service before uninstalling the MySQL system service!

MySQL and PHP

MySQL's "root" user default state is no password, so in PHP you can use mysql_connect ("localhost", "root", "") to connect to the MySQL server;

If you want to set a password for the "root" user in MySQL, use the "mysqladmin" command in the console. For example:

\...\xampp\mysql\bin\mysqladmin-u Root Password secret

Note that after you change the password for root, do not forget to change the information in the phpMyAdmin. Search for "config.inc.php" under \...\xampp\phpmyadmin\ and edit the following lines:

$cfg ["Servers"] [$i] ["user"] = "root"; MySQL Superuser

$cfg ["Servers"] [$i] ["auth_type"] = "http"; HTTP MySQL authentification

From now on, you need to correctly enter the "root" password to start phpMyAdmin



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.

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.