安装Nginx为Windows service
来源:互联网 发布:mac隐藏的照片在哪里 编辑:程序博客网 时间:2024/06/07 07:04
安装目标系统是windows 7
首先看了这篇文章:http://blog.csdn.net/defonds/article/details/7906005
里面推荐winsw作为注册服务的工具,的确不错。该项目主页在:https://github.com/kohsuke/winsw
使用方法很简单,下载exe文件,重命名为install.exe,然后创建一个install.xml文件,根据主页上介绍的填好设置。
运行后的确成功。但是不能在newlisp程序的exec中调用,始终报下面的错误
annot start service from the command line or a debugger ...
Exception occurred while initializing the installation:System.BadImageFormatException: Could not load file or assembly 'file:///c:\cloud_engine\nginx\nginx.exe' or one of its dependencies. The module was expected to contain an assembly manifest..
最后找到这个:http://ng-srvinst.attron.org/
下载压缩包,解压后看一下read.me, 非常简单。
不过要注意ng_srv.xml文件最后的两项配置:
<service> <id>nginx</id> <name>nginx</name> <description>nginx</description> <executable>cloud-engine-home\nginx\nginx.exe</executable> <logpath>cloud-engine-home\nginx\logs\</logpath> <logmode>roll</logmode> <depend></depend> <startargument>-p cloud-engine-home\nginx</startargument> <stopargument>-p cloud-engine-home\nginx -s stop</stopargument></service>
-p 后面是Nginx目录,如果写成nginx.exe路径就错了,会造成nginx 服务无法启动。
现在newlisp中通过exec调用成功了。
- 安装Nginx为Windows service
- 命令行安装为Windows Service
- nginx 安装 windows service,gzip压缩
- windows将nginx安装为系统服务
- PostgreSQL 8.2.5 安装为 Windows 服务 (Service)
- MongoDB安装为service报错100(windows系统)
- spring boot 在windows下安装为service
- Windows下将nginx安装为服务运行
- Windows2012中安装Nginx并创建为Windows服务
- 如何安装 Windows Service
- 如何安装windows service
- 安装 windows service
- windows service 安装
- Windows Service安装
- windows service 安装/卸载
- Windows 安装 windows Service 步骤
- 配置 logstash 为 Windows Service
- nginx windows安装入门
- 利用ffmpeg来合并视频
- 书架
- 转载_linux锁机制
- Google Maps Android API v2 key生成以及添加到application的所有步骤
- 纯javascript拖拽
- 安装Nginx为Windows service
- Export 文件 JCA 文件
- USACO Magic Squares 解题报告
- Java中获取键盘输入值的三种方法
- CAS不启用HTTPS
- 合航CSDN博客开通啦
- 搭建express开发环境
- MFC 多线程及线程同步
- 双重检查加锁 之单例模式并发