2015-12-18 36 views
5

OpsWorks kullanarak şu anda şef öğreniyorum, şu anda tek bir pakette 2 paketi kuracak bir reçete oluşturmaya çalışıyorum. webserver.rbŞef httpd bağlı değil

# 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 

Ben AWS LAMP ortamı yaratmada öğretici takip ediyorum - Ben bu gibi bir reçete var .. github benim yemek kitabı saklanan. Ne yazık ki bu benim Instance çalıştırdığınızda, opsworks_cookbook_demo :: varsayılan (webserver dahil olmak üzere bazı içerir, çalışır.) precondition httpd cookbook not found hata alıyorum, metadaba.rb zaten ekledim 'httpd' '~> ..', Can bağlıdır Birisi bana burada yanlış ne yaptığını yönlendirir. Coz koyduktan sonra 'httpd' yazdığına göre yemek kitabımı kullanmak için yemek kitabımı genişleteceğim.

Bu dava için berksahete ihtiyacım var mı? (Şu anda AWS OpsWorks kullanıyorum ve reçetemi github'da aldım)

cevap

İlgili konular