Centos 6.5 redmine

安装rvm

curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm


安装ruby

rvm install list
#输入版本号
rvm install x.x.x


更改gem 安装源

gem sources -l
gem sources -a http://ruby.taobao.org/
gem sources -r https://rubygems.org/
gem sources -u


安装rails


gem install rails -v 3.2.19


安装redmine所需ruby插件

wget http://www.redmine.org/releases/redmine-2.6.0.tar.gz
tar zxvf redmine-2.6.0.tar.gz
cd redmine-2.6.0
bundle install --without development test
gem install selenium-webdriver
yum install imagemagick ImageMagick-devel

yum install -y ImageMagick-devel
yum install -y mysql-devel

#为了正常使用Redmine的认证系统,我们需要为其生成一个Session TOKEN
rake generate_secret_token
#初始化数据库
rake db:migrate RAILS_ENV="production"

#运行ruby
ruby script/rails server webrick -e production


修改redmine的url
修改文件config/environment.rb
在RedmineApp::Application.initialize!之前加入
#Redmine::Utils::relative_url_root = "/redmine"
RedmineApp::Application.routes.default_scope = '/redmine'

apache 反向代理设置

ProxyPass /redmine http://localhost:3000/redmine
ProxyPassReverse /redmine http://loclalhost:3000/redmine

redmine 自启动脚本

#!/bin/bash

# Modify it to your configuration
DIR=/var/www/html/redmine/

# Start Redmine in daemon mode.
start(){
cd $DIR
ruby script/rails server -d -e production
}
# Stop Redmine daemon
stop(){
RUBYPID=`ps aux | grep "ruby script/rails" | grep -v grep | awk '{print $2}'`
if [ "x$RUBYPID" != "x" ]; then
kill -2 $RUBYPID
fi
}
# Check if Redmine is running
status(){
RUBYPID=`ps aux | grep "ruby script/rails" | grep -v grep | awk '{print $2}'`
if [ "x$RUBYPID" = "x" ]; then
echo "* Redmine is not running"
else
echo "* Redmine is running"
fi
}

case "$1" in
start)
start
status
;;
stop)
stop
sleep 2
status
;;
status)
status
;;
restart|force-reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload|status}"
exit 1
esac
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值