tomcat - 使用 chef 执行 "chkconfig --add tomcat"时出错?

标签 tomcat centos chef-infra

我正在使用 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/

相关文章:

chef-infra - Vagrant 和 Knife Solo(或任何其他非 Vagrant Chef Env)的最佳常用工作流程?

java - 找不到全局 web.xml

java - LDAP "simple"用户身份验证(JNDI - Tomcat)不稳定?

Java nio2 目录没有关闭。导致 "too many open files"错误

linux - CentOS 70-persistent-net.rules 不会重新生成

linux - 使用 uuencode 发送附件时使用 sendmail 命令

ssh - 使用knife ec2插件在VPC私有(private)子网中创建VM

java - Log4j LocationInfo Struts + Tomcat 缓慢

java - Mule 启动时的两个 Java 进程

centos - 如何使用 Chef 在 vagrant centos 盒子上设置综合构建器环境?