一个production模式下的Ror环境搭建-airport -JavaEye技术社区

来源:百度文库 编辑:神马文学网 时间:2024/04/28 12:33:17
比较了一些ROR的生产环境,经过测试,还是选用了mongrel+apache的方式。
1.download安装包:
httpd-2.2.3.tar.gz ,apache服务器
ruby-1.8.5.tar.gz
rubygems-0.9.0.tgz
mongrel-0.3.13.4.gem
2.安装ruby
tar zxvf ruby-1.8.5.tar.gz
./configure
make
make install
3.安装rubygems
tar zxfv rubygems-0.9.0.tgz
cd rubygems-0.9.0
ruby setup.rb
# gem update - system
4.安装rails
gem install rails --include-dependencies
5.安装mongrel
#gem install daemons
#gem install gem_plugin 如果提示需要则安装
gem install mongrel
6.安装apache
tar zxvf httpd-2.2.3.tar.gz
./configure --prefix=/usr/local/apache
make
make install
7.启动mongrel
cd myrailsapp
#启动
mongrel_rails start -d -p 8000 -e production -P ./log/mongrel-1.pid
#停止
mongrel_rails stop -P ./log/mongrel-1.pid
8.编辑httpd.conf
代码

ServerName myapp.com
ServerAlias www.myapp.com
ProxyPass / http://www.myapp.com:8000/
ProxyPassReverse / http://www.myapp.com:8000
ProxyPreserveHost on
ProxyPass /images !
ProxyPass /stylesheets !
Alias /images /path/to/public/images
Alias /stylesheets /path/to/public/stylesheets
#continue with aliases for static content

 
改天把测试数据整理出来,包括cluster应用!
最后更新:2006-11-14 12:32
22:57  |  永久链接  |   浏览 (1564)  |  评论 (7)  |   收藏  |  ROR  |  进入论坛  |
永久链接
http://airport.javaeye.com/blog/34121
评论    共 7 条发表评论
whisper     2006-11-13 23:39
为什么不用lighttpd呢?
bd7lx     2006-11-14 08:19
为什么不用lighttpd呢?
估计你是看Agile的书受到了“不良”的影响
肯定是airport对mongrel+apache更加有信心投入实战
ouspec     2006-11-14 09:25
JavaEye用的就是lighttpd
airport     2006-11-14 09:56
mongrel的官方推荐好像是apache。
这几天我做一下测试!
bd7lx     2006-11-14 12:31
airport 写道
mongrel的官方推荐好像是apache。
这几天我做一下测试!
 
听你的意思是要测试mongrel + lighttpd ?
 
jerry     2006-11-28 11:02
有Cluster的配置方法吗?
其实有了Cluster用Apache也一样,不是每台机器都可以自己说安什么HTTP就可以安的.也要将就人家的Server
qiezi     2006-11-28 11:06
我测试用的mongrel cluster加pound,以后换成apache + mongrel cluster