我正在使用 chef 配置一台 centos 机器,除了
execute "chkconfig add tomcat" do
command "chkconfig --add tomcat"
end
execute "chkconfig tomcat level" do
command "chkconfig --level 234 tomcat on"
end
这会带来这个错误..
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of chkconfig --add tomcat ----
STDOUT:
STDERR: error reading information on service tomcat: No such file or directory
---- End output of sudo chkconfig --add tomcat ----
Ran chkconfig --add tomcat returned 1
最佳答案
您喜欢使用 chkconfig
吗?有一个 service应为您处理此问题的资源。
Chef::Provider::Service::Init::Redhat service The provider that is used with the Red Hat and CentOS platforms.
关于tomcat - 使用 chef 执行 "chkconfig --add tomcat"时出错?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21941251/