Win2012 R2 IIS8.5+PHP(FastCGI)+MySQL运行环境搭建教程

2019-10-16 16:55:31于海丽

最后,确定

点“是”

双击左边“起始页”下面的计算机名称

找到中间的IIS部分,打开“FastCGI设置”

右键选中:C:phpphp-cgi.exe然后选择编辑

监视对文件所做的更改:C:phpphp.ini

环境变量,点旁边的"..."

点“添加”

Name:PHP_FCGI_MAX_REQUESTS

Value:1000

确定

确定

双击左边“起始页”下面的计算机名称

找到中间的IIS部分,打开“默认文档”

点右边的“添加”

名称:index.php

确定

可以看到默认文档中已经有了index.php

选择右边操作下面“上移”选项,把index.php移到最上边

5、测试php程序是否正常运行

打开:

C:inetpubwwwroot

新建一个index.php文件

内容如下:

<?php

phpinfo();

?>

最后,保存退出

在浏览器里面打开http://127.0.0.1/

出现下面的界面,说php程序可以正常运行。

6、开启Zend OPcache,加速php执行效率

用记事本打开C:phpphp.ini文件, 在最底部增加以下代码

[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

最后,保存退出

在浏览器里面打开http://127.0.0.1/,可以看到Zend OPcache配置选项

三、安装MySQL

双击打开mysql-installer-community-5.6.15.0.msi

选择第一项Install MySQL Products(安装MySQL)