Windows set up IIS + PHP + MySQL environment

Ready to work:

1, php-7.2.25-Win32-VC15-x64, download address: http: //windows.php.net/downloads/releases

2, mysql-installer-community-5.7.28.0, download address: https: //downloads.mysql.com/archives/community/

 

The first step in installing IIS

First, right-click the bottom right corner WINDOWS logo, click Settings - Applications - Programs and Features (or directly click Control Panel Search Programs and Features)

Click: Enable function on or off WINDOWS

Select the internet information services, opening the World Wide Web Services - Application Development Features, select CGI, and then OK to save.

Then management tool which you can see the IIS Manager.

The second step configuration PHP

Create a directory called packages in the root folder, PHP configuration file and Mysql database file. Unzip the PHP file you just downloaded to this folder and rename the inside php.

The php php.ini-development inside the paper copy, and then modify the php.ini name, as shown below:

Use Notepad to open the php.ini, search extension_dir, about 721 lines

Remove the semicolon in front of the extension_dir; to the back of the modified ext: E: \ packages \ php \ ext

Search the date.timezone, about 909 lines, to remove the semicolon in front of it, to modify the date.timezone =: date.timezone = Asia / Shanghai

Continue search extension = php_ following several extensions to remove the semicolon in front, here are a few must be open. If you run the program prompts which extension is missing, PHP.INI directly modify the file on the line.

extension=curl
extension=gd2
extension=mbstring
extension=exif
extension=mysqli
extension=pdo_mysql

打开IIS管理器,点击右边的处理程序映射。

添加模块映射

填写如下图所示:模块选择FastCgiModule

设置网站默认文档为:index.php

在网站根目录新建一个index.php,内容为:

<?php
phpinfo();
?>

 访问网站,看看环境配置是否成功?

第三步 安装Mysql

a、运行mysql-installer-community-5.7.28.0.msi,勾选 I accept the license terms,点击“next”;

b、选择Custom类型,点击“next”;

c、在左侧选择MySQL Server 5.7.28-X64,点击向右箭头,如下图所示

d、在右侧选中MySQL Server 5.7.25-X64,点击右下角的 Advanced Options,设置mysql安装路径如下图所示,点击“next”;

e、如下图所示,点击“Execute”

f、等待安装完成,点击“next”;

 

g、点击“next”继续进行配置;

h、如下图所示选择,点击“next”;

i、如下图所示选择,点击“next”;

j、如下图所示,设置root用户密码,设置完毕,点击“next”;

k、如下图所示选择,点击“next”;

k、如下图所示选择,点击“Execute”;

l、配置完成后,点击“finish”;

m、如下图所示选择,点击“next”;

n、如下图所示选择,点击“finish”完成安装;

 

Guess you like

Origin www.cnblogs.com/yangyangblog/p/11996827.html