有关于redmine 2.0.3 安装的文章请参考我的另一篇博文
http://crazyming.blog.51cto.com/1048571/936260
1.在Redmine 2.0.3的基础上安装
安装依赖包:
yum install gcc gcc-c++ make patch zlib-devel openssl-devel readline-devel curl git cyrus-sasl-devel libmemcache-devel tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel glib2-devel fontconfig-devel libwmf-devel gd-devel
2.安装thin
gem install thin
3.获取配置文件
thin config -C /etc/thin/redmine.yml -c /usr/local/redmine -e production --server 5
cat /etc/thin/redmine.yml
chdir: /opt/redmine
environment: production
address: 0.0.0.0
port: 13000
timeout: 30
log: log/redmine.log
pid: tmp/pids/thin.pid
max_conns: 1024
max_persistent_conns: 512
require: []
wait: 30
servers: 3
daemonize: true
4.开机自启动 thin & thin启动方式
启动方式:thin start -C /etc/thin/redmine.yml
设置开机启动:
echo "thin start -C /etc/thin/redmine.yml" >> /etc/rc.local
问题:
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/thin-1.4.1/lib/thin/backends/tcp_server.rb:16:in `connect': no such file to load -- thin/connection (LoadError)
from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/thin-1.4.1/lib/thin/backends/base.rb:55:in `block in start'
from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `call'
from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/thin-1.4.1/lib/thin/backends/base.rb:63:in `start'
from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/thin-1.4.1/lib/thin/server.rb:159:in `start'
from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/thin-1.4.1/lib/thin/controllers/controller.rb:86:in `start'
from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/thin-1.4.1/lib/thin/runner.rb:185:in `run_command'
from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/thin-1.4.1/lib/thin/runner.rb:151:in `run!'
from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/thin-1.4.1/bin/thin:6:in `<top (required)>'
from /etc/init.d/thin:19:in `load'
from /etc/init.d/thin:19:in `<main>'
解决办法:
ln -s /usr/local/ruby/lib/ruby/gems/1.9.1/gems /usr/local/ruby/lib/ruby/gems/1.9.1/gems
add thin to Gemfie, and it works again!
把thin添加到Gemfile中
gem "thin"