文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Nginx在WINDOW平台制作系统服务

Nginx在WINDOW平台制作系统服务

时间:2010-05-20  来源:hkebao

Nginx在WINDOW平台制作系统服务

时间:2010-5-20,整理人:遥方

1、  下载微软服务注册工具srvany.exe, instsrv.exe, 存放到D:\nginx\目录下
http://eastedu.bl-changjiang.com/UploadFiles/2006-5/511179043.rar

2、  安装NGINX服务, 将命令行切换到D\nginx\,执行下列命令

打开CMD窗口切换到D:\nginx目录下面去

instsrv NGINX D:\nginx\srvany.exe            执行这个命令

 

D:\nginx-0.8.12>instsrv.exe NGINX D:\nginx-0.8.12\srvany.exe

 

The service was successfuly added!            服务添加成功!

 

Make sure that you go into the Control Panel and use

the Services applet to change the Account Name and

Password that this newly installed service will use

for its Security Context.

 

3、  在D:\nginx\下,编辑一个nginx.reg文件

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NGINX\Parameters]

"Application"="D:\\nginx-0.8.12\\nginx.exe" 

"AppParameters"=""

"AppDirectory"="D:\\nginx-0.8.12\\"

 

4、  让服务与程序关联起来, 命令行执行

regedit /s nginx.reg

 

5、  编辑启动nginx脚本start-nginx.bat(关闭脚本不用变), 让程序以服务方式运行

D:\nginx-0.8.12>net start nginx                   以后就可以这样来启动nginx服务了。非常方便哦!

 

 

结论:将nginx配置成系统服务。再打开任务管理器发现这个时候运行nginx的用户为System

相关阅读 更多 +
排行榜 更多 +
步行僵尸2无限金币版

步行僵尸2无限金币版

体育竞技 下载
狐狸一号特殊任务无限金币版

狐狸一号特殊任务无限金币版

体育竞技 下载
忍者之雷复仇无限金币钻石版

忍者之雷复仇无限金币钻石版

体育竞技 下载