Windows R2 server configuration IIS7.5 + PHP5 (FastCGI) + MySQL5 environment

Source: Internet
Author: User
Tags install php iis mysql download mysql version php file php download vc9 win32
Preparation

I. Environment description:

Operating system: Windows Server 2008 R2

PHP version: php 5.4.4
MySQL version: MySQL5.5.25

2. Download related software:

1. PHP download address:

Http://windows.php.net/downloads/releases/php-5.4.4-nts-Win32-VC9-x86.zip
2. MySQL download address:
Http://gd.tuwien.ac.at/db/mysql/Downloads/MySQLInstaller/mysql-installer-5.5.25.0.msi
3. PHP acceleration software ZendGuard download address:
Http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-Windows.zip
4. Microsoft. NET Framework 4 (independent installer) download address:
Http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe
5. Microsoft Visual C ++ 2010 reusable package (x64) download address:
Http://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe
6. Microsoft Visual C ++ 2008 Redistributable Package (x86) download address:

Http://download.microsoft.com/download/7/5/0/7502f4e9-1f90-4895-9259-1bde67b8b9a1/vcredist_x86.exe

Installation

1. Install IIS7.5

Start-management tools-Server Manager

System O & M www.111cn.net reminder: qihang01 original content © copyright. For details, refer to the source and original article links.
Select "role" and add a role on the right.
Next Step
Select "Web Server (IIS)" and click Next

Next Step

Make sure that "CGI" is selected. Other role services can be selected as needed.
Select all

Next Step

Install

Installing

Close. Open http: // localhost/in the browser/

The following interface is displayed:

IIS7.5 installation complete
II. Install the Microsoft Visual C ++ 2010 component package (x64)

Double-hitting vcredist_x64.exe

Select "I have read and accept license terms" and click "install"

Installing

Complete
3. Install Microsoft. NET Framework 4 (independent installer)

Double-scan dotnetfx40_full_x86_x64.exe

Select "I have read and accept license terms" and click "install"

Installing

Click finish. Installation is complete.
4. Install MySQL

Double-click open mysql-installer-5.5.25.0

Select the first item Install MySQL Products (Install MySQL)

Select "I accept the license terms" (I accept the license terms) and click Next

Select "Skip the check for update (not recommended)" (Skip the check for updates) and click next.

Select "Custom" (Custom Installation), Installation Path (Installation Path): D: \ Program Files \ MySQL

Next Step

Make sure "MySQL Server5.5.25" is selected and click "next" (you can choose to install other components)

Select all here to install all components

Execute)

Select "I have read and accept the license terms"

Click to install

Complete

Next Step

Execute)

Next Step

System O & M www.111cn.net reminder: qihang01 original content © copyright. For details, refer to the source and original article links.

Next Step

Developer Machine (development server)
Server Machine (common Server)
Dedicated Machine (Dedicated server)
Select Server Machine (common Server)

Click Next

Select Enable TCP/IP Networking (Enable TCP port)
Port Number (Port): 3306
Select "Create Windows Service" to Create a Windows system Service)
Windows Server Name (Windows service Name): MySQL55
MySQL Root password: enter the password
Repeat Password: enter the Password again

Click next after setting

Next Step

Next Step

Click Finish)

Close this window

Open the MySQL installation path
D: \ Program Files \ MySQL Server 5.5
Copy the my-huge.ini to my. ini.

Backup my-huge.ini for my-huge.ini_bak

Start-all programs-MySQL Server 5.5-MySQL Server 5.5 Command Line Client

Enter the MySQL root account password during installation, and press enter

Login successful, MySQL installation complete.
5. Install Microsoft Visual C ++ 2008 Redistributable Package (x86)

Double-hitting vcredist_x86.exe

Next Step

Check "I have read and accept the license terms"

Click to install

Complete
6. Install PHP
Decompress the php-5.4.4-nts-win32-vc9-x86.zip file
Rename the folder to php and copy the php folder to the root directory of drive D.
Decompress zendguardloader-php-5.3-windows.zip
Open
D: \ soft \ ZendGuardLoader-php-5.3-Windows \ ZendGuardLoader-php-5.3-Windows \ php-5.3.x
Copy the ZendLoader. dll file to the directory D: \ php \ ext.
Open D: \ php
Copy php. ini-development to php. ini.
Open php. ini in Notepad
Make the following changes:
Extension_dir = "D: \ php \ ext" # set the php module path
Date. timezone = PRC # set the time zone to China
Register_globals = On # enable GET data call
Short_open_tag = On # php supports short labels
Cgi. force_redirect = 0 # run php in CGI mode
Fastcgi. impersonate = 1;
Cgi. rfc2616_headers = 1
The following php extension module is enabled as needed. Cancel the semicolon to start the extension 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
Add the following code in the last line
[ZendGuardLoader]
Zend_loader.enable = 1
Zend_loader.disable_licensing = 1
Zend_loader.obfuscation_level_support = 3
Zend_loader.license_path =
Zend_extension = "D: \ php \ ext \ ZendLoader. dll"
System O & M www.111cn.net reminder: qihang01 original content © copyright. For details, refer to the source and original article links.
Finally, save and exit
VII. Configure IIS to support PHP
Start-management tools-Internet Information Service (IIS) manager
Double-click the computer name under "start page" on the left.
Locate the IIS section in the middle and open "handler ing"
Click "Add module ing" on the right"
Request path: *. php
Module: FastCgiModule
Executable file (optional): D: \ php \ php-cgi.exe
Name: FastCGI
Finally, OK
Click "yes"
Double-click the computer name under "start page" on the left.
Locate the IIS section in the middle and enable "FastCGI settings"
Right-click the: D: \ php \ php-cgi.exe and select Edit
Monitor changes to the File: D: \ php. ini
Environment variable, click "..." Next to it "..."
Click "Add"
Name: PHP_FCGI_MAX_REQUESTS
Value: 10000
OK
OK
Test
Open:
C: \ inetpub \ wwwroot
Create an index. Php file
The content is as follows:
<? Php
Phpinfo ();
?>
Finally, save and exit
Open http: // localhost/in the browser/
The following interface is displayed, indicating that the configuration is successful!

Now, the Windows Server 2008 R2 IIS7.5 + PHP5 (FastCGI) + MySQL5 environment setup tutorial is complete.

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.