首先将下载好的frp解压到D盘根目录,D:/frp
将下载好的winSW.exe修改为frpc-sw.exe,然后复制到D:/frp目录,如上图所示。
编写winSW配置文件,文件名与上面改的exe名称保持一致,这里以xml配置文件为例,创建frpc-sw.xml文本文件,然后用文本工具打开,编辑内容为:
<service>
<id>frpc-client</id>
<name>frpc-client</name>
<description>frpc 客户端服务.</description>
<executable>d:/frp/frpc.exe</executable>
<arguments> -c d:/frp/frpc.ini</arguments>
<logmode>rotate</logmode>
</service>
新建service-install.bat 内容为:
@echo off
d:\frp\frpc-sw.exe install
net start frpc-client
pause
新建service-uninstall.bat 内容为:
@echo off
net stop frpc-client
d:\frp\frpc-sw.exe uninstall
pause
以管理员运行service-install.bat脚本
可以看到安装成功且服务已经启动,通过系统里面的服务可以查看
可以看到服务是自动启动,也就开机会启动frpc
至此frpc 安装为Windows服务搞定,下面是卸载
同样是以管理员方式运行,运行service-uninstall.bat
自此Windows 将frpc作为服务的安装和卸载讲解完毕
http://blog.xqlee.com/article/1099.html