我必须从源代码安装旧版本的Elasticsearch(2.3.3)。二进制文件位于/opt/local/elasticsearch-2.3.3/bin/
我创建了以下文件
/Library/LaunchDaemons/org.elasticsearch.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.elasticsearch</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/elasticsearch-2.3.3/bin/elasticsearch</string>
</array>
<key>UserName</key>
<string>root</string>
<!-- <key>GroupName</key>
<string>staff</string> -->
<key>WorkingDirectory</key>
<string>/opt/local/elasticsearch-2.3.3/bin</string>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
然后我发出以下命令:
sudo launchctl load -w /Library/LaunchDaemons/org.elasticsearch.plist
当我查询sudo launchctl list | grep elastic
时,它会返回org.elasticsearch
。但是当我检查elasticsearch是否与ps ax | grep elastic
一起运行时,它还没有运行。
我的.plist
文件有问题吗?
答案 0 :(得分:0)