1

将IoTDB注册为Windows服务 - 张善友

 1 year ago
source link: https://www.cnblogs.com/shanyou/p/17062772.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

将IoTDB注册为Windows服务

昨天写的文章《Windows Server上部署IoTDB集群》,Windows下的IoTDB是控制台程序,打开窗口后,很容易被别人给关掉,因此考虑做成Windows服务,nssm正是解决该问题的利器。

1.下载nssm:http://www.nssm.cc/download

    查看官网提示,如果是win10/windows server 2016,应该下载“nssm 2.24-101-g897c7ad”版本,否则启动时会报错

2.解压下载的nssm,找到里面的64位版本(我的电脑也是64位的),以管理员身份运行命令控制台:nssm install

    在弹出框中选择iotdb的运行程序:

1ac7cf77dca057b61adf14d5ae455cd

在打开的窗口中选择

  • 在path填上iotdb的路径,可以选择iotdb的启动脚本,还会自动填写Startup directory
  • 在Startup directory 填上iotdb包目录
  • Arguments填上参数
  • Service name 填上在windows服务列表生成的服务名称

点击install service即可, 到windows服务中,启动iotdbconfignode 即可:

image

注意要点:

nssm可以反复折腾,不会挂掉。主要的命令如下:

nssm install servername 安装
nssm remove servername 移除
nssm start servername 开启
nssm stop servermame 停止
nssm restart servername 重启
nssm status servername 状态


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK