1、功能說(shuō)明
目前成都創(chuàng)新互聯(lián)已為上千多家的企業(yè)提供了網(wǎng)站建設(shè)、域名、雅安服務(wù)器托管、網(wǎng)站托管維護(hù)、企業(yè)網(wǎng)站設(shè)計(jì)、鷹手營(yíng)子網(wǎng)站維護(hù)等服務(wù),公司將堅(jiān)持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長(zhǎng),共同發(fā)展。
puppet默認(rèn)使用基于Ruby的WEBRickHTTP來(lái)處理HTTPS請(qǐng)求,
單個(gè)服務(wù)器使用Apache+Passenger替換掉WEBRickHTTP,
Passenger是用于將Ruby程序進(jìn)行嵌入執(zhí)行的Apache模塊,
在安裝前,首先至少要執(zhí)行一次service puppetmaster start,生成本地證書
官方配置指南:https://docs.puppetlabs.com/guides/passenger.html
2、安裝apache
[root@puppet ~]# yum install -y httpd httpd-devel openssl mod_ssl ruby-devel libcurl-devel rubygems gcc
前面已安裝了apache,這里主要安裝mod_ssl ruby-devel libcurl-devel三個(gè)。
3、安裝passenger
[root@puppet ~]# gem install rack passenger [root@puppet ~]# passenger-install-apache2-module
直接回車
默認(rèn)選擇了Ruby,直接回車
檢查需要安裝的包,根據(jù)提示安裝需要的軟件包,再重新執(zhí)行
[root@puppet ~]# yum install libcurl-devel
需要將此段寫入passenger.conf中:
[root@puppet ~]# vi /etc/httpd/conf.d/passenger.conf LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-4.0.53/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-4.0.53 PassengerDefaultRuby /usr/bin/ruby </IfModule>
繼續(xù)回車完成,可以看到一個(gè)虛擬主機(jī)的配置樣例。
4、配置rack
config.ru文件會(huì)告訴Rack如何生成puppet master進(jìn)程
[root@puppet ~]# cd /usr/share/puppet [root@puppet puppet]# mkdir -p rack/puppetmasterd/{public,tmp} [root@puppet puppet]# cp ext/rack/config.ru rack/puppetmasterd/ [root@puppet puppet]# chown puppet:puppet rack/puppetmasterd/config.ru
5、配置passenger和vhost
[root@puppet puppet]# cp ext/rack/example-passenger-vhost.conf /etc/httpd/conf.d/puppetmaster.conf [root@puppet puppet]# vi /etc/httpd/conf.d/puppetmaster.conf # This Apache 2 virtual host config shows how to use Puppet as a Rack # application via Passenger. See # http://docs.puppetlabs.com/guides/passenger.html for more information. # You can also use the included config.ru file to run Puppet with other Rack # servers instead of Passenger. # you probably want to tune these settings PassengerHighPerformance on PassengerMaxPoolSize 12 PassengerPoolIdleTime 1500 # PassengerMaxRequests 1000 PassengerStatThrottleRate 120 #RackAutoDetect Off #注釋掉這行 #RailsAutoDetect Off #注釋掉這行 Listen 8140 <VirtualHost *:8140> SSLEngine on SSLProtocol ALL -SSLv2 -SSLv3 SSLCipherSuite EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!IDEA:!ECDSA:kEDH:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA SSLHonorCipherOrder on SSLCertificateFile /var/lib/puppet/ssl/certs/puppet.ewin.com.pem #修改路徑和證書名稱 SSLCertificateKeyFile /var/lib/puppet/ssl/private_keys/puppet.ewin.com.pem #修改路徑和證書名稱 SSLCertificateChainFile /var/lib/puppet/ssl/ca/ca_crt.pem #修改路徑 SSLCACertificateFile /var/lib/puppet/ssl/ca/ca_crt.pem #修改路徑 # If Apache complains about invalid signatures on the CRL, you can try disabling # CRL checking by commenting the next line, but this is not recommended. SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem #修改路徑 # Apache 2.4 introduces the SSLCARevocationCheck directive and sets it to none # which effectively disables CRL checking; if you are using Apache 2.4+ you must # specify 'SSLCARevocationCheck chain' to actually use the CRL. # SSLCARevocationCheck chain SSLVerifyClient optional SSLVerifyDepth 1 # The `ExportCertData` option is needed for agent certificate expiration warnings SSLOptions +StdEnvVars +ExportCertData # This header needs to be set if using a loadbalancer or proxy RequestHeader unset X-Forwarded-For RequestHeader set X-SSL-Subject %{SSL_CLIENT_S_DN}e RequestHeader set X-Client-DN %{SSL_CLIENT_S_DN}e RequestHeader set X-Client-Verify %{SSL_CLIENT_VERIFY}e DocumentRoot /usr/share/puppet/rack/puppetmasterd/public #修改路徑 RackBaseURI / <Directory /usr/share/puppet/rack/puppetmasterd/> #修改路徑 Options None AllowOverride None Order allow,deny allow from all </Directory> </VirtualHost>
6、服務(wù)
[root@puppet ~]# service puppetmaster stop [root@puppet ~]# service httpd restart [root@puppet ~]# chkconfig httpd on [root@puppet ~]# netstat -nlp | grep 8140
7、測(cè)試
(1)WEB網(wǎng)頁(yè)訪問測(cè)試
客戶端修改IE設(shè)置,去掉標(biāo)黃的勾:
使用IE瀏覽https://10.188.1.73:8140/
出現(xiàn)這一行表示配置成功,下一節(jié)配置Dashboard后就有內(nèi)容了。
(2)linux客戶端測(cè)試
[root@zabbix ~]# puppet agent --server puppet.ewin.com --test
沒有報(bào)錯(cuò),顯示配置版本號(hào)及完成時(shí)間表示成功。
(3)puppet服務(wù)端測(cè)試
[root@puppet ~]# tailf /var/log/httpd/access_log
10.188.1.172是windows客戶機(jī)ywzhou-pc:
10.188.1.103是linux客戶機(jī)zabbix:
客戶機(jī)發(fā)出HTTP GET請(qǐng)求,狀態(tài)碼200表示請(qǐng)求成功,再使用PUT請(qǐng)求提交了一個(gè)報(bào)告
當(dāng)前文章:Puppet擴(kuò)展(一):縱向擴(kuò)展Apache+Passenger
當(dāng)前網(wǎng)址:http://aaarwkj.com/article6/pjcjig.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供營(yíng)銷型網(wǎng)站建設(shè)、網(wǎng)站設(shè)計(jì)公司、品牌網(wǎng)站設(shè)計(jì)、企業(yè)網(wǎng)站制作、動(dòng)態(tài)網(wǎng)站、Google
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)