由于3.x系列已不再支持mongrel,所以就采用nginx+passenger来做负载均衡;之前有发过nginx+mongrel,puppet version是2.7系列的,所以还是可以用的;
环境说明:
操作系统:CentOS 5.8 64位
puppet版本:3.1系列
1,升级ruby至1.8.7,安装rubygems
# rpm -Uvh />
# yum install -y ruby rubygems ruby-devel.x86_64
2,安装puppet server
# rpm -ivh />
# yum install -y puppet puppet-server
3,安装nginx相关的依赖包
# yum install -y gcc make pcre-devel zlib-devel openssl-devel pam-devel curl-devel rpm-build
4安装rake, rack and passenger ruby gems
# gem install rake rack passenger --no-rdoc --no-ri
5,安装nginx
编译参数如下,必须包含passenger模块
# tar -xjf pcre-8.32.tar.bz2 -C /usr/local/src ----pcre自己下载
# tar -xzf nginx-1.2.1.tar.gz -C /usr/local/src ----解压nginx
cd /usr/local/src/nginx-1.2.1
./configure --prefix=$NGINX_PATH --with- http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.32 --add-module=`passenger-config --root`/ext/nginx
# make
# make install