D1V1网社区 @开门芝麻网 连劲淘 芝麻卡 吃饭赚钱 睡觉赚钱 做梦赚钱 http://sns.d1v1.com & http://www.KaiMenZhiMa.com/

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 12361|回复: 0

WNMP(Windows + Nginx + PHP + MySQL) 安装下载

[复制链接]
发表于 2012-6-27 10:22:34 | 显示全部楼层 |阅读模式 <
开门芝麻网
芝麻卡私域引流:芝麻卡赋能百业增值大众。http://sns.d1v1.com/forum.php?mod=viewthread&tid=6184
https://sourceforge.net/projects/wampserver/postdownload

最近在开发一个新的项目,环境用的是:

Nginx1.10.3  下载地址: http://nginx.org/en/download.html  下载windows版本包

PHP 7.1.1  下载地址:http://windows.php.net/download/  下载windows版本包

MySQL 5.7.17 下载地址 :https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.17-winx64.zip

PS: 这里MySQL我是用的 WampServer 带的MySQL,所以就没有重复安装。具体配置,稍后说。

这是WampServer的下载地址 : https://sourceforge.net/projects/wampserver/


东西准备完了,那么开始安装了。

一、Nginx 安装

1. 准备一个目录, 我这里是 E:\development\nginx(这里nginx目录下主要是为了以后方便拓展多版本的Nginx服务)

2. 运行该文件夹(nginx-1.10.3)下的nginx.exe

3.测试是否启动nginx。打开浏览器访问http://localhost 或 http://127.0.0.1,看看是否出现“Welcome to nginx!”,出现的证明已经启动成功了。没有启动的话,看看80端口有占用没。

注意:该网站的默认目录在 E:\development\nginx\nginx-1.10.3\html

二、PHP安装

nginx配置文件是conf文件夹里的nginx.conf

1. 创建一个PHP目录 E:\development\php (同样放在PHP的目录下,以后方便拓展)

2. 修改大概第43~45行之间的

            location /{            root   E:/proj; ;这里改成你自己的目录            index  index.html index.htm;}

修改网站文件的路径,以及添加index.php的默认页。

        location / {            root   E:/Projl;            index  index.html index.htm inde.php;        }

3. 支持php的设置

修改大概在第63-71行的

[url=][/url]
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000        #        location ~ \.php$ {              root           html;              fastcgi_pass   127.0.0.1:9000;              fastcgi_index  index.php;              fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;              include        fastcgi_params;        }[url=][/url]

先将前面的“#”去掉,同样将root  html;改为root  E:/Proj; 再把“/scripts”改为“$document_root”,这里的“$document_root”就是指前面“root”所指的站点路径,这是改完后的。


三、修改为php.ini。

搜索“extension_dir”,找到: e;xtension_dir = "ext" 先去前面的分号再改为 extension_dir = "C:\wnmp\php\ext"

搜索“date.timezone”,找到:;date.timezone = 先去前面的分号再改为 date.timezone = Asia/Shanghai

搜索“enable_dl”,找到:enable_dl = Off 改为 enable_dl = On

搜索“cgi.force_redirect” ;cgi.force_redirect = 1 先去前面的分号再改为 cgi.force_redirect = 0

搜索“fastcgi.impersonate”,找到: ;fastcgi.impersonate = 1 去掉前面的分号

搜索“cgi.rfc2616_headers”,找到:;cgi.rfc2616_headers = 0 先去前面的分号再改为 cgi.rfc2616_headers = 1

搜索“php_mysql”,找到:”extension=php_pdo_mysql.dll和extension=php_mysqli.dll  去掉前面的“;”extension=php_mysql.dll和extension=php_mysqli.dll   (支持MYSQL数据库)


四、启动

1. 在进行里删除 Nginx 然后 重新启动

2. php-cgi.exe -b 127.0.0.1:9000-c

phpinfo() 测试一下:  


五、将Nginx 和 PHP 设置为服务启动

发现没有,如果每次都要这样启动 Nginx 和 PHP 是相当麻烦的,接下来我们将其设置为服务启动

1. 下载 RunHiddenConsole 下载地址:http://www.inbeijing.org/wp-content/uploads/2015/06/RunHiddenConsole.zip

2. star.bat 启动

[url=][/url]
@echo offREM Windows 下无效REM set PHP_FCGI_CHILDREN=5REM 每个进程处理的最大请求数,或设置为 Windows 环境变量set PHP_FCGI_MAX_REQUESTS=1000 echo Starting PHP FastCGI...RunHiddenConsole E:/development/php/php-7.1.1-nts-Win32-VC14-x64/php-cgi.exe -b 127.0.0.1:9000 -c E:/development/php/php-7.1.1-nts-Win32-VC14-x64/php.ini echo Starting nginx...RunHiddenConsole E:/development/nginx/nginx-1.10.3/nginx.exe -p E:/development/nginx/nginx-1.10.3[url=][/url]

3. stop.bat 停止

@echo offecho Stopping nginx...  taskkill /F /IM nginx.exe > nulecho Stopping PHP FastCGI...taskkill /F /IM php-cgi.exe > nulexit

五、结语

到此Nginx 和 PHP 已经安装完毕了, 如果要链接Mysql 需要检查一下进程的 mysqld 启动了吗? 如果没有 进入到mysql/bin 目录 执行 mysqld 启动mysql服务

也可以执行  mysqld --install 将其设置为启动服务。


原文
children grandfather insisted relatives apologize
's court filed an appeal asking to dismiss the first instance verdict, the judgment to ascertain the facts.
lee: he is just holding his girl,herve leger, not me.
li parent (hereinafter referred to as "lee"): the first-instance judgment only consider them (referring to lele mother side) a feelings,ralph lauren, did not consider our.
in this regard, lele zhang yu's mother said, her ex-husband to make any move was not surprised. our marital emotional problems,stray male rape and murder of two women being arre, he asked for a divorce,stealing small fox head stuck to the glass bottles,louboutin,man holding a fowling piece and wounded a third pa, i do not agree, but in the courthouse, he and his family called me, i completely give up hope. "zhang yu said," i do not blame my father this year more than hardship and help me pull the child. the first instance judgment, is an accident, no responsibility. "
lee: we have a clear conscience. although we are a worker's family, but not because of money, go the legal way can lele justice, otherwise think of my grandson at the injustice ...... (emotional interrupt)
fang li zhi phylogenetic relationship should not be a statutory reason to reduce or remit the parties to civil liability. "the children get up from bed, get out of bed through the living room,burberry, moving a stool, or even play to open the window, climb railings are unaware, is not this is the sense of duty, neglect of care "
lee: yes,michael kors! your grandfather, my grandfather, you should at least say sorry.
li zhi,ralph lauren pas cher, zhang yu made a seven couples with unexpected fragmentation of the family. in fact, the crisis has long been latent. yesterday, li zhi's father on behalf of his son were interviewed.
(text characters are not his real name)
on appeal,ralph lauren pas cher, li believes that the court for the transfer of shijingshan public security bureau the octagonal police station-related record of inquiry, instead of the site investigation,mercurial vapor pas cher, the records of inquests, can not be ruled out criminal suspects,burberry, and thus the child fall death by the civil trial found accident hasty.
zhang yu second instance trial, as soon as possible a fair lele and his father.
■ dialogue
beijing news: why do you insist on prosecution of appeal
beijing news: why the appeal
beijing news: after the incident,air jordan, he knelt to apologize to the child beside you
beijing news: do you insist on an apology
i do not blame my father, mother of the child:
开门芝麻网
部分内容由网友发布或收集于互联网,如有侵权,请联系QQ/微信76815288,第一时间删除!(开门芝麻网 sns.d1v1.com)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

 
在线客服
点击这里给我发消息 点击这里给我发消息 点击这里给我发消息 点击这里给我发消息
售前咨询热线
400-888-xxxx

微信扫一扫,私享最新原创实用干货

QQ|申请友链|Archiver|手机版|小黑屋|D1V1网社区 @开门芝麻网 ( 沪ICP备15050032号-2 )

GMT+8, 2025-5-26 02:46 , Processed in 0.099774 second(s), 28 queries .

Powered by Discuz! X3.4 Designed by www.D1V1.cn

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表