Environment: WINDOWS10
Mysql-5.6.24-win32 Decompression Version
nginx-1.8.0
Php7
1. mysql Installation
Unzip to the appropriate directory after downloading the compressed file (my directory is G:\wnmp\mysql-5.6.24-win32)
The MySQL root directory modifies the My-default.ini file to My.ini file: Modify the # number before the Basedir and datadir two paths to
Basedir = G:\wnmp\mysql-5.6.24-win32
DataDir = G:\wnmp\mysql-5.6.24-win32\data (the directory is replaced with the appropriate decompression path)
Run cmd as an administrator,
G:
CD \wnmp\mysql-5.6.24-win32
Mysqld-install
net start MySQL
Service started successfully, if error 1067 indicates a problem with the configuration file
2. PHP Installation
PHP7 download down and unzip into the PHP7 directory to execute php-cgi-b 9000-q (port corresponding to the following nginx configuration)
3, Nginx Installation
Modify Nginx configuration file nginx.conf
Location ~ \.php$ {
root HTML;
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_param script_filename $document _root$fastcgi_script_name;
Include Fastcgi_params;
}
You can start the Nginx
Here the initial environment is configured to complete, you can create a new PHP file in the browser to test whether the installation is successful!
About the configuration File (php.ini) path problem under Phpinfo:
I print here is C:\Windows, so deliberately checked the following related issues, get the following results:
The PHP runtime in the Windows environment first looked for the configuration file in the C:\WINDOWS, could not find it in the PHP installation directory to find, two directories can not find to use PHP default configuration environment. So you just have to have at least one PHP configuration file in the C:\WINDOWS or PHP installation directory.
Configuring NGINX+MYSQL+PHP7 under Windows