Win2008 R2 iis7.5+php5 (FastCGI) +MYSQL5 Environment set up a tutorial _win server

Source: Internet
Author: User
Tags mysql download mysql version php download vc9 win32 dedicated server mysql command line

Prepare an article

First, the environment description:

Operating system: Windows Server 2008 R2

PHP Version: PHP 5.4.4

MySQL version: MySQL5.5.25

Second, related software downloads:

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 Accelerator software zendguard Download Address:

Http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-Windows.zip

4. Microsoft. NET Framework 4 (stand-alone 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 Redistributable 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 article

I. Installation of IIS7.5

Start-management Tools-Server Manager

Select the Add role to the right of the role point

Next

Select Web Server (IIS), and the next step

Next

Make sure "CGI" is selected and other role services can be checked according to your needs

This is all checked out.

Next

Installation

Being installed

Close, open http://localhost/in the browser

The following interface appears

IIS7.5 Installation Complete

Installation of Microsoft Visual C + + 2010 Redistributable Package (x64)

Double hit Open Vcredist_x64.exe

Select "I have read and accept license Terms", point to install

Being installed

Complete

Third, install the Microsoft. NET Framework 4 (stand-alone installer)

Double-click Dotnetfx40_full_x86_x64.exe

Select "I have read and accept license Terms", point to install

Being installed

Point complete, installation complete.

Four, install MySQL

Double hit 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), click Next

Select skip Check for update (not recommended), click Next

Select Custom Install, installation path (installation path): D:\Program files\mysql

Next

Make sure "MySQL Server5.5.25" 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

Next

Execute (EXECUTE)

Next

Next

Developer Machine (Development server)

Server Machine (normal server)

Dedicated Machine (dedicated server)

Here, select the second item: Server Machine (normal server)

Click Next

Check "Enable TCP/IP Networking" (Open TCP Network Port)

Port number (ports): 3306

Check "Create Windows Service" (Creating Windows System Services)

Windows Server name (Windows service name): MySQL55

MySQL Root Password: enter password

Repeat Password: Repeat Enter password

After setting, click Next

Next

Next

Point Finish (complete)

Close this window

Open MySQL Installation path

D:\Program Files\mysql\mysql Server 5.5

Copy My-huge.ini to My.ini

Backup My-huge.ini to My-huge.ini_bak

Start-All Programs-mysql-mysql Server 5.5-mysql Command line Client

Enter the MySQL root account password at installation time, return

Login successful, MySQL installation complete.

V. Install Microsoft Visual C + + 2008 Redistributable Package (x86)

Double hit Open Vcredist_x86.exe

Next

Check "I have read and accept the license terms"

Point installation

Complete

Vi. Installation of PHP

Extract php-5.4.4-nts-win32-vc9-x86.zip Files

Rename folder to PHP, copy php folder to D packing directory

Decompression Zendguardloader-php-5.3-windows.zip

Open it

D:\soft\ZendGuardLoader-php-5.3-Windows\ZendGuardLoader-php-5.3-Windows\php-5.3.x

Copy the ZendLoader.dll file in the D:\php\ext directory.

Open D:\php

Copy Php.ini-development to PHP.ini

Open php.ini with Notepad

Make the following modifications:

Extension_dir = "D:\php\ext" #设置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

Add the following code on 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"

Finally, save the exit

Seven, configure IIS to support PHP

Start-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): D:\php\php-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: D:\php\php-cgi.exe then select Edit

Monitoring changes to a file: D:\php\php.ini

environment variable, click Next to install

Point "Add"

Name:php_fcgi_max_requests

value:10000

Are you sure

Are you sure

Test article

Open it:

C:\inetpub\wwwroot

Create a new index.php file

The contents are as follows:

<?php

Phpinfo ();

?>

Finally, save the exit

Open http://localhost/in the browser

The following interface appears, stating that the configuration is successful!

At this point, Windows Server 2008 R2 iis7.5+php5 (FastCGI) +MYSQL5 environment to complete the tutorial.

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.