passenger_apache2食谱失败

时间:2015-01-21 14:35:25

标签: apache chef passenger cookbook

我尝试在Ubuntu 14.04上部署一些烹饪书来配置Apache2和Passenger。下面是我按照它们在run_list中出现的顺序安装的cookbook列表:

build-essential 2.1.3,
apt 2.6.1,
iptables 0.14.1,
logrotate 1.7.0,
apache2 2.0.0,
vim 1.1.2,
passenger_apache2 2.2.3

我从我的开发工作站引导我的流浪者vm并且烹饪书似乎都安装没有错误,除非它到达passenger_apache2食谱。我可以提供全面的输出,但我相信以下是输出的信息部分:

STDERR: [Wed Jan 21 14:05:17.027610 2015] [core:warn] [pid 26648] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
node.vagrantup.com (2)No such file or directory: AH02297: Cannot access directory '/etc/apache2/${APACHE_LOG_DIR}/' for log file '${APACHE_LOG_DIR}/other_vhosts_access.log' defined at /etc/apache2/conf-enabled/other-vhosts-access-log.conf:2
node.vagrantup.com AH00014: Configuration check failed

我只看到几个讨论,表明没有为守护进程的chef-client设置$ HOME环境变量的问题。但是,我不清楚如何纠正这种情况。在学习如何使用Chef时,我将非常感谢社区可以提供的任何见解。

THX

更新:查看passenger_apache2食谱README,由于在该版本的操作系统中使用了Apache 2.4,因此Ubuntu 14.04尚不支持此食谱。此外,我看到我在输出中错过了一个错误:

WARNING: Apache doesn't seem to be compiled with the 'prefork', 'worker' or 'event' MPM
node.vagrantup.com Phusion Passenger has only been tested on Apache with the 'prefork', the
node.vagrantup.com 'worker' and the 'event' MPM. Your Apache installation is compiled with
node.vagrantup.com the '' MPM. We recommend you to abort this installer and to recompile
node.vagrantup.com Apache with either the 'prefork', the 'worker' or the 'event' MPM.

很想知道是否有人在使用Chef Server的Apache 2.4上使用Ubuntu 14.04部署乘客。如果是这样,怎么样?

更新2:我无法使用所谓的支持Ubuntu 12.04。真的想知道是否有人有这本食谱,如果有的话,怎么样。

1 个答案:

答案 0 :(得分:1)

我通过采取以下措施解决了这个问题:

  1. 下载最新的Apache2 cookbook并将其上传到我的Chef服务器
  2. 下载最新的Passenger_Apache2 cookbook
  3. 上传新的Passenger_Apache2食谱失败,并显示错误,指示Apache 1.0上存在未满足的依赖关系。然后,我修改了Passenger_Apache2 cookbook的metadata.rb文件,并更改了以下行:
  4. depends 'apache2', '~> 1.0'

    为:

    depends 'apache2', '~> 3.0'

    现在,当我引导我的厨师节点时,它会安装乘客,没有任何错误。希望这有助于其他人。