我正在尝试在我的 CentOs 服务器上安装 ejabbered 并将其作为服务启动。我可以很好地安装它,但无法将其作为服务启动。
错误
* service[ejabberd] action enable
* service[ejabberd]: No custom command for enable specified and unable to locate the init.d script!
================================================================================
Error executing action `enable` on resource 'service[ejabberd]'
================================================================================
Chef::Exceptions::Service
-------------------------
service[ejabberd]: No custom command for enable specified and unable to locate the init.d script!
Resource Declaration:
---------------------
# In /root/chef-solo/cookbooks-3/exelon/recipes/jabber.rb
24: service "ejabberd" do
25: action :enable
26: end
27:
Compiled Resource:
------------------
# Declared in /root/chef-solo/cookbooks-3/exelon/recipes/jabber.rb:24:in `from_file'
service("ejabberd") do
action [:enable]
supports {:restart=>nil, :reload=>nil, :status=>nil}
retries 0
retry_delay 2
default_guard_interpreter :default
service_name "ejabberd"
pattern "ejabberd"
declared_type :service
cookbook_name :exelon
recipe_name "jabber"
end
Recipe: sysctl::default
胡扯食谱
remote_file '/tmp/ejabberd-16.02-0.x86_64.rpm' do
source 'https://www.process-one.net/downloads/downloads-action.php?file=/ejabberd/16.02/ejabberd-16.02-0.x86_64.rpm'
owner 'deploy'
group 'deploy'
mode '0755'
action :create
end
rpm_package 'ejabberd' do
action :install
source '/tmp/ejabberd-16.02-0.x86_64.rpm'
end
service "ejabberd" do
action :enable
end
我也尝试过使用 ejabberdctl 命令。但它说No such file or directory - ejabberdctl
execute 'start ejabberd' do
command 'ejabberdctl start'
end