Resin设置成windows服务(这样可以解决服务重启的时候,项目没有自动启动)
如果只是启动resin
1、cmd进入dos,执行下面的命令就可以把resin注册成服务:
dos:\> ${resin_home}\httpd.exe 参数 -install-as 服务名字
2、删除resin服务:
dos:\> ${resin_home}\httpd.exe 参数 -remove-as 服务名字
注:参数可有可无,如果你是想启动某一个项目的话,可以在参数里面加,例如:-server 项目服务名
服务名字也是可以不填的
可用脚本bat启动和停止服务:
@echo off
@echo 启动、停止服务-_-
@echo ========================================================
@net stop 服务名称
@echo 服务停止成功
@net start 服务名称
@echo 服务成功重启
@pause
3、带界面的启动resin脚本:
新建一个bat文件:
${resin_home}\httpd.exe -server 项目服务名
4、如果是linux的启动命令是:
停止
Xshell:\> ${resin_home}\httpd.sh -server 项目服务名 stop
开始
Xshell:\> ${resin_home}\httpd.sh -server 项目服务名 start
重启
Xshell:\> ${resin_home}\httpd.sh -server 项目服务名 restart
如果只是启动resin
1、cmd进入dos,执行下面的命令就可以把resin注册成服务:
dos:\> ${resin_home}\httpd.exe 参数 -install-as 服务名字
2、删除resin服务:
dos:\> ${resin_home}\httpd.exe 参数 -remove-as 服务名字
注:参数可有可无,如果你是想启动某一个项目的话,可以在参数里面加,例如:-server 项目服务名
服务名字也是可以不填的
可用脚本bat启动和停止服务:
@echo off
@echo 启动、停止服务-_-
@echo ========================================================
@net stop 服务名称
@echo 服务停止成功
@net start 服务名称
@echo 服务成功重启
@pause
3、带界面的启动resin脚本:
新建一个bat文件:
${resin_home}\httpd.exe -server 项目服务名
4、如果是linux的启动命令是:
停止
Xshell:\> ${resin_home}\httpd.sh -server 项目服务名 stop
开始
Xshell:\> ${resin_home}\httpd.sh -server 项目服务名 start
重启
Xshell:\> ${resin_home}\httpd.sh -server 项目服务名 restart

本文详细介绍了如何在Windows和Linux环境下将Resin应用服务器配置为系统服务,包括启动、停止和重启服务的方法,并提供了bat脚本示例。
1万+

被折叠的 条评论
为什么被折叠?



