Ruby 1.9 is not supported yet. You have to use Ruby 1.8.x as stated above.
RubyGems 1.3.7 or higher is required with following limitations :
Rails 2.3.5 will fail with RubyGems 1.5.0 or later, stick to previous versions of RubyGems !
Rails 2.3.11 will fail with RubyGems 1.7.0 or later, stick to previous versions of RubyGems !
Rake 0.8.7 is required (rake 0.9.x is not supported by Rails yet)
Rack 1.1.x is required, 1.1.0 has a bug with quotes (#8416). Database migration would fail with other version.
Mongrel 1.1.5 needs a patch attached to #7688 to work fine with Rails 2.3.11. In case of upgrade, another issue may appear for some time after migration (#7857).
I18n 0.4.2 is required for Redmine >= 1.0.5
tar zxvf rubygems-1.6.2.tgz
cd rubygems-1.6.2
ruby setup.rb
cd ..
cd /data/www/redmine
mongrel_rails cluster::configure -e production -p 8000 -a 127.0.0.1 -N 3
6、启用mongrel_cluster
cd /data/www/redmine
mongrel_rails cluster::start
启动如果出错如下:
复制代码 代码如下:
starting port 8000
!!! Path to pid file not valid: tmp/pids/mongrel.8000.pid
mongrel::start reported an error. Use mongrel_rails mongrel::start -h to get help.
starting port 8001
!!! Path to pid file not valid: tmp/pids/mongrel.8001.pid
mongrel::start reported an error. Use mongrel_rails mongrel::start -h to get help.
starting port 8002
!!! Path to pid file not valid: tmp/pids/mongrel.8002.pid
mongrel::start reported an error. Use mongrel_rails mongrel::start -h to get help.
创建/data/www/redmine/tmp/pids目录即可
mkdir -p /data/www/redmine/tmp/pids
启动成功如下:
[root@CentOS5 redmine]# mongrel_rails cluster::start
starting port 8000
starting port 8001
starting port 8002
7、配置nginx
复制代码 代码如下:
vi /data/soft/nginx/conf/nginx.conf
upstream mongrel
{
server 127.0.0.1:8000;
server 127.0.0.1:8001;
server 127.0.0.1:8002;
}
server
{
listen 80;
server_name 192.168.8.32;
root /data/www/redmine;
index index.html index.htm;
location /
{
proxy_pass http://mongrel;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
五: 访问redmine测试:
http://192.168.8.32
直接用ruby内置webrick也可启动redmine
/usr/local/ruby/bin/ruby /data/www/redmine/script/server webrick -e production &
启动成功如下:
[root@CentOS5 redmine]# /usr/local/ruby/bin/ruby /data/www/redmine/script/server webrick -e production &
[1] 3526
[root@CentOS5 redmine]# => Booting WEBrick
=> Rails 2.3.11 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-06-2409:30:47] INFO WEBrick 1.3.1
[2011-06-2409:30:47] INFO ruby 1.8.7 (2008-05-31) [i686-linux]
[2011-06-2409:30:47] INFO WEBrick::HTTPServer#start: pid=3526 port=3000