PHP Environment Build-WNMP (win7+nginx+mysql+php)

Source: Internet
Author: User
Tags mysql free mysql version php development environment win32 nginx server

Introduction


The PHP development environment should not be a difficult thing for every phper, like breathing. Below I teach you how to build PHP environment, is also a summary of my own, I hope to work with you to improve. (I hope you share, don't hide private OH)


"Ready to Work"


Get started, first look at your computer is how many bits of the operating system (do not ask Niang), My computer is 64-bit Win7 operating system, I take 64 bits as an example

PHP Version: Php-5.6.15-win32-vc11-x64.zip PHP

nginx version: Nginx-1.8.0.zip nginx1.80

MySQL version: Mysql-5.6.27-winx64.zip MySQL

Set up the environment directory, the individual likes to put the environment of things on the D-disk, so in the D-disk directory set up "Wnmp", the directory is built four folders 1.mysql 2.nginx3.web 4.php


"Installation Environment"


1.nginx

unzip the downloaded nginx-1.8.0.zip to D:\wamp\nginx

2.php

Download good php-5.6.15-win32-vc11-x64.zip and unzip to D:\wamp\php

3.mysql

Unzip the downloaded php-5.6.15-win32-vc11-x64.zip to D:\wamp\mysql

"Configure Environment"

1.php Configuration

I'll finish it sometime.

2.nginx Configuration

I'll finish it sometime.

3.mysql free-Install version configuration

Unzip Php-5.6.15-win32-vc11-x64.zip to D:/wamp/mysql

Copy the default file My-default.ini in the extracted directory, rename My.ini and copy the following information to My.ini

*************************************************************************************************************** *************************

[Client]
port=3306
Default-character-set=utf8
[Mysqld]
port=3306
Character_set_server=utf8
basedir=D:\wamp\mysql
#解压目录
datadir=D:\wamp\mysql\data
#解压目录下data目录
Sql_mode=no_engine_substitution,strict_trans_tables
[Winmysqladmin]
D:\wamp\mysql\bin\mysqld.exe

*************************************************************************************************************** **************************

4. Add Environment variables

The operation is as follows:
1) Right-click My Computer, properties, advanced system settings (advanced), environment variables
Click the New button under System variables
input variable name: Mysql_home
input Variable value:D:\wnmp\mysql
#即为mysql的自定义解压目录.
2) Select path in the system variable
Click the Edit button
to add a variable value to a variable value:%mysql_home%\bin
Note that this variable is added after the value of the original variable, separated from it, and cannot delete the original variable value .

5. Run cmd to enter D:/wamp/mysql/bin to install the MySQL system service, after successful installation will prompt the service installation success.

Installation Services Command: mysqld install MySQL--defaults-file= "D:\wnmp\mysql\my.ini"

#移除服务命令为: mysqld Remove

"Start Environment"

1. Create a file Start_gbk_server.bat

@echo off & title start Nginx Server
Color 0A
Inactive under REM Windows
REM Set php_fcgi_children=5
Call Stop_server.bat
REM maximum number of requests processed per process, or set to Windows environment variable
Set php_fcgi_max_requests=1000
echo Launcher php-5.4.19 FastCGI ...
RunHiddenConsole.exe d:/wnmp/php/php-cgi.exe-b 127.0.0.1:9000-c "D:/wnmp/php/php.ini"
echo Start Nginx 1.6.3
RunHiddenConsole.exe d:/wnmp/nginx/nginx.exe-p D:/wnmp/nginx
echo Start Mysql 5.6
RunHiddenConsole.exe net start MySQL
echo Start Complete ...

2. Create a file Stop_bgk_server.bat

@echo Off & title Nginx
Color 0A
echo Stopping Nginx ...
taskkill/f/im nginx.exe > nul
echo Stopping PHP FastCGI ...
taskkill/f/im php-cgi.exe > nul
echo Stopping Mysql
net stop MySQL

"Test Environment"

The index.php content under the D:/wnmp/web directory is as follows:

<?php

Phpinfo ();

?>

Find the Hosts file in the west of C:\Windows\System32\drivers\etc with Notepad and then write the following hosts:
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
#:: 1 localhost
127.0.0.1 www.example.com

Open the www.example.com in the browser if it appears as proof that the PHP environment is built successfully and if it is not successfully debugged



This article from "10945815" blog, declined reprint!

PHP Environment Build-WNMP (win7+nginx+mysql+php)

Related Article

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.