-
尝试了用winsw,发现服务运行不起来,配置文件如下: <service>
<!-- ID of the service. It should be unique across the Windows system-->
<id>apache-iotdb</id>
<!-- Display name of the service -->
<name>apache-iotdb</name>
<!-- Service description -->
<description>apache-iotdb</description>
<!-- Path to the executable, which should be started -->
<executable>cmd</executable>
<arguments>/c "%BASE%\sbin\start-iotdb.bat"</arguments>
<startmode>Automatic</startmode>
</service> 问一下各位大佬,有没有好的办法能够使IoTDB在windows下以服务的方式运行? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
start-iotdb.bat 有这个脚本吗0.0不是0.13和1.0版本的吧 |
Beta Was this translation helpful? Give feedback.
-
在sbin目录下,新建文件1,start-confignode.vbs 新建文件2,start-datanode.vbs 把这俩文件丢sbin下,依次点击就行了 |
Beta Was this translation helpful? Give feedback.
-
我使用C#写了一个Windows的服务程序,在里面通过调用cmd命令,启动服务执行start-confignode.bat和start-datanode.bat,停止服务执行stop-confignode.bat和stop-datanode.bat,关键代码如下: using Process process = new Process();
process.StartInfo.FileName = "cmd.exe";
process.StartInfo.Arguments = $"/C {batFile}";
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
process.Start();
process.WaitForExit(); 现在已经可以以服务的方式运行了,谢谢大家 |
Beta Was this translation helpful? Give feedback.
-
老哥 用的哪个方法 |
Beta Was this translation helpful? Give feedback.
我使用C#写了一个Windows的服务程序,在里面通过调用cmd命令,启动服务执行start-confignode.bat和start-datanode.bat,停止服务执行stop-confignode.bat和stop-datanode.bat,关键代码如下:
现在已经可以以服务的方式运行了,谢谢大家