背景:
OS: CentOS release 3.6 (Final)
Apache: Apache/2.0.46
开始配置Apache+mongrel+rails
- 安装ruby






在/etc/proifle中加入

2)安装gem





3)安装rails

4)安装mongrel

Select which gem to install for your platform (i686-linux)
1. mongrel 1.0.1 (mswin32)
2. mongrel 1.0.1 (ruby)
3. mongrel 1.0 (mswin32)
4. mongrel 1.0 (ruby)
5. Skip this gem
6. Cancel installation


Select which gem to install for your platform (i686-linux)
1. fastthread 1.0 (ruby)
2. fastthread 1.0 (mswin32)
3. fastthread 0.6.4.1 (mswin32)
4. fastthread 0.6.4.1 (ruby)
5. Skip this gem
6. Cancel installation


5)启动mongrel


6)配置 apache
通过命令:httpd -version
发现:Apache/2.0.46
Apache已安装,于是开始略过安装过程直接配置:

文件最后加入:












注意:
1)上面对于apache得配置很粗糙,把所有的请求到推倒了mongrel实例,产品环境中显然是不行的,apache作为反向代理,最好是指把动态请求推给mongrel实例。
2) 仅有单个mongrel实例使得请求变成了单进程,并发性能不太好
对于小流量的网站无所谓,一旦压力增大,恐怕就的考虑Apache+Mongrel_cluster