windows下的puppet学习之路(二)
puppet的服务端是用自带的WEBrick,在客户端数量不太多的时候并没有什么的影响,但是随着客户端数量的不断增加,就会出现性能上的问题。所以引进了Passenger,作用是将WEBrick用apache替代。可以参考官方的文档:http://docs.puppetlabs.com/guides/passenger.html。
本人的服务端是centos 6.4,而客户端是windows,版本均为3.1.1。和别人交流的时候,他说他的系统是ubuntu,完全按照文档说明,一气呵成,没有任何问题。可实际上我还是遇到了些问题。首先是puppetmaster.conf配置文件,需要在/etc/httpd/conf.d/目录下新建,然后把文档里的Example Vhost Configuration里的内容copy进去。启动apache服务的时候,发现语法错误:
Syntax error on line 15 of /etc/httpd/conf.d/pupptmaster.conf:
Invalid command 'PassengerHighPerformance', perhaps misspelled or defined by a module not included in the server configuration
仔细一看,配置文件上写得清清楚楚,路径神马的,需要修改:
# You'll need to adjust the paths in the Passenger config depending on which OS
# you're using, as well as the installed version of Passenger.
将#RHEL/CentOS:后面的三行注释取消,然后修改成:
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-4.0.20/buildout/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-4.0.20
PassengerRuby /usr/bin/ruby
mod_passenger.so文件的路径可以用locate命令查找,立马就出来了。
然后再配置服务端的SSL,把xx.example.pem修改成为自己的就OK了。但是随后又出现错误:
Syntax error on line 44 of /etc/httpd/conf.d/pupptmaster.conf:
Invalid command 'RackAutoDetect', perhaps misspelled or defined by a module not included in the server configuration
于是乎只能把这个RackAutoDetect给注释掉,暂时没有找到其他方法~~!启动,出现个警告,不予理会。此时若开启客户端,在客户端的控制台会出现好多错误和警告,一堆密密麻麻,主要是服务器的405错误:
Error:could not send report : Error 405 on SERVER:.............................
The requested method PUT is not allowed for the URL /..........
解决方法,将selinux的等级设为permissive,即:setenforce 0。重启apache服务:apachectl。搞定!
页:
[1]