加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

厨师无法获得httpd依赖

发布时间:2020-12-13 20:44:38 所属栏目:百科 来源:网络整理
导读:我正在使用OpsWorks学习厨师,目前我正在尝试创建一个将在一个实例中安装2个包的配方.我把我的食谱存放在 github上..我有一个像这样的食谱 – webserver.rb # Install apache and start the servicehttpd_service 'site' do mpm 'prefork' action [:create,:s
我正在使用OpsWorks学习厨师,目前我正在尝试创建一个将在一个实例中安装2个包的配方.我把我的食谱存放在 github上..我有一个像这样的食谱 – webserver.rb
# Install apache and start the service
httpd_service 'site' do 
  mpm 'prefork'
  action [:create,:start]
end

# Add the site configuration
httpd_config 'site' do
  instance 'site'
  source 'site.conf.erb'
  notifies :restart,'httpd_service[site]'
end

#create the document root directory
#directory '/var/www/public_html' do
#  recursive true
#end

#write the homepage
file '/var/www/index.html' do 
  content '<html>This is a web</html>'
  mode '0644'
  owner 'web_admin'
  group 'web_admin'
end

# Install apache,config and etc END

# Install the mod_php5 apache module
httpd_module 'php' do 
  instance 'site'
end

#install php5-mysql
package 'php-mysql' do 
  action :install
  notifies :restart,'httpd_service[site]'
end

#write the homepage
file '/var/www/index2.php' do 
  content '<html><?php echo phpinfo(); ?></html>'
  mode '0644'
  owner 'web_admin'
  group 'web_admin'
end

我正在遵循AWS创建LAMP环境的教程.不幸的是,当我把它运行到我的Instance时,opsworks_cookbook_demo :: default(它会运行一些include,包括webserver.)我得到的错误是找不到httpd cookbook,我已经添加了我的metadaba.rb取决于’httpd”?> ..’,有人可以指导我这里做错了什么.因为我假设每当你放置’httpd’它将扩展我的食谱以使用该食谱.

这个案子我需要berkshelf吗? (目前我正在使用AWS OpsWorks并在github中使用我的食谱)

您必须提前下载所有依赖项以提供给OpsWorks.有关详细信息,请参阅 https://docs.aws.amazon.com/opsworks/latest/userguide/best-practices-packaging-cookbooks-locally.html.较旧的Chef 11堆栈曾经通过在目标上运行berks供应商来为您自动化,但现在您需要在工作站上自己执行此操作.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读