Prepare an article
First, the environment description:
Operating system: Windows Server R2
PHP Version: PHP 5.5.8
MySQL version: MySQL5.6.15
Second, related software downloads:
1, PHP download address:
Http://windows.php.net/downloads/releases/php-5.5.8-nts-Win32-VC11-x86.zip
2, MySQL download address:
Http://cdn.mysql.com/Downloads/MySQLInstaller/mysql-installer-community-5.6.15.0.msi
3. Visual C + + redistributable for visual Studio Update 4 (x64) download address (this plugin is required to install PHP):
Http://download.microsoft.com/download/9/C/D/9CD480DC-0301-41B0-AAAB-FE9AC1F60237/VSU4/vcredist_x64.exe
4. Visual C + + redistributable for visual Studio Update 4 (x86) download address (this plugin is required to install PHP):
Http://download.microsoft.com/download/9/C/D/9CD480DC-0301-41B0-AAAB-FE9AC1F60237/VSU4/vcredist_x86.exe
5. Microsoft Visual C + + 2010 Redistributable Package (x86) Download address (this plugin is required to install MySQL):
Http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe
6. Microsoft URL Rewrite module 2.0 download address (IIS8.5 pseudo-static requires this plugin):
Http://download.microsoft.com/download/4/E/7/4E7ECE9A-DF55-4F90-A354-B497072BDE0A/rewrite_x64_zh-CN.msi
Installation article
I. Installation of IIS8.5
Server Manager-adding roles and features
jquery1391919028750= "191" >
Next
Selecting: role-based or feature-based installation
Next
Select: Select server from server pool
Next
Selecting: Web Server (IIS)
Add Features
Next
Next
Make sure the CGI is selected, the other role services are selected as needed, and if you do not know how to choose, it is recommended that you select all features.
Next
Installation
In the process of being installed
The display installation was successful and the point was closed.
You can see that IIS is already in the roles and server groups
Click the Start button, open IE browser, input HTTP://127.0.0.1/will see the following interface
IIS8.5 has been installed.
Second, the installation of PHP
1. Install Visual C + + redistributable for visual Studio Update 4 (x86)
Double-click Vcredist_x86.exe
Installation
Being installed
Installation Complete, closing
2. Install Visual C + + redistributable for visual Studio Update 4 (x64)
Double-click Vcredist_x64.exe
Follow the steps in the previous step to install it by default
After installation completes, point closes
3. Installation Php-5.5.8-nts-win32-vc11-x86.zip
Extract php-5.5.8-nts-win32-vc11-x86.zip Files
Rename folder to PHP, copy php folder to C packing directory
Open c:php
Copy Php.ini-production to PHP.ini
Open php.ini with Notepad
Make the following modifications:
Extension_dir = "C:phpext" #设置php模块路径
Date.timezone = PRC #设置时区为中国时区
Register_globals = on #开启GET数据调用
Short_open_tag = on #php支持短标签
Cgi.force_redirect = 0 #开启以CGI方式运行php
Fastcgi.impersonate = 1;
Cgi.rfc2616_headers = 1
The following PHP expansion module, choose to open as needed, cancel the preceding semicolon to start the appropriate expansion module
Extension=php_curl.dll
Extension=php_gd2.dll
Extension=php_mbstring.dll
Extension=php_exif.dll
Extension=php_mysql.dll
Extension=php_mysqli.dll
Extension=php_sockets.dll
Extension=php_xmlrpc.dll
Extension=php_pdo_mysql.dll
System Yun-wei warm reminder: qihang01 original Content © Copyright, reproduced please indicate the source and the original link
Finally, save the exit
4. Configure IIS to support PHP
Opening: Control Panel-System and security-Administrative Tools-internet information Services (IIS) Manager
Double-click the computer name under Start page on the left
Locate the middle IIS section and open the handler mappings
"Add module mappings" to the right of the point
Request Path: *.php
Module: Fastcgimodule
Executable file (optional): C:phpphp-cgi.exe
Name: FastCGI
Finally, determine
Dot "yes"
Double-click the computer name under Start page on the left
Locate the middle IIS section and open the FastCGI settings
Right-click to select: C:phpphp-cgi.exe then select Edit
Monitoring changes to a file: C:phpphp.ini
environment variable, dot next to "..."
Point "Add"
Name:php_fcgi_max_requests
value:1000
Are you sure
Are you sure
Double-click the computer name under Start page on the left
Locate the IIS section in the middle and open the default document
"Add" to the right of the point
Name: index.php
Are you sure
You can see that there are already index.php in the default document
Select the "Move Up" option below the right action to move the index.php to the top
5, test the PHP program is normal operation
Open it:
C:inetpubwwwroot
Create a new index.php file
The contents are as follows:
<?php
Phpinfo ();
?>
Finally, save the exit
Open HTTP://127.0.0.1/in the browser
The following interface appears, saying that the PHP program can run correctly.
6, open Zend Opcache, speed up PHP execution efficiency
Open the C:phpphp.ini file with Notepad and add the following code at the bottom
[Zend Opcache]
Zend_extension = "C:phpextphp_opcache.dll"
opcache.memory_consumption=1024
Opcache.optimization_level=1
Opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4096
Opcache.revalidate_freq=60
Opcache.fast_shutdown=1
Opcache.enable=1
Opcache.enable_cli=1
Finally, save the exit
Open HTTP://127.0.0.1/in the browser and you can see Zend Opcache configuration options
Third, the installation of MySQL
Double hit Open Mysql-installer-community-5.6.15.0.msi
Select the first item install MySQL products (install MySQL)
Select "I accept the License Terms" (I accept the license terms), click Next
Select skip Check for update (not recommended), click Next
Select Custom Install
Installation path (Installation path): C:Program Filesmysql
Data path (Database storage path): C:programdatamysqlmysql Server 5.6
Next
Ensure "MySQL Server 5.6.15" is selected, click Next (Other components can choose to install)
All selected here, install all components
Execute (EXECUTE)
Select "I have read and accept license Terms"
Point installation
Complete
Execute (EXECUTE)
Next
Execute (EXECUTE)
System Yun-wei warm reminder: qihang01 original Content © Copyright, reproduced please indicate the source and the original link
Next
Next
Config type (configuration types):
Developer Machine (Development server)
Server Machine (normal server)
Dedicated Machine (dedicated server)
Here, select the second item:server Machine (normal server)
Check "Enable TCP/IP Networking" (Open TCP Network Port)
Port number (ports): 3306
Tick "Open firewall port for network access" (Open firewall Ports network access)
Next
MySQL Root Password: enter password
Repeat Password: Repeat Enter password
After setting, click Next
Windows Server name (Windows service name): MySQL56
Check: "Start the MySQL server at system startup" (Start MySQL servers at system startup)
Next
Next
Next
Point Finish (complete)
Close this window
Open MySQL Installation path
C:Program Filesmysqlmysql Server 5.6
Copy My-default.ini to My.ini
Enter C:programdatamicrosoftwindowsstart menuprogramsmysqlmysql Server 5.6 Directory
Open MySQL Server 5.6 Command Line Client
Enter the MySQL root account password at the time of installation, return, login to the MySQL console
Exit (Exit)
MySQL Installation complete
Iv. configuration IIS8.5 support pseudo-static
Double-click to install the Microsoft URL Rewrite module Rewrite_x64_zh-cn.msi
Installation
Being installed
Complete
In: Control Panel system and security management tools Internet Information Services (IIS) Manager can see "url rewrite"
In: Web site root directory New file web.config, add pseudo static rule code can achieve static web site