Ubuntu 10.04 安装 Redmine 2.0 与 Apache2 集成配置
零、注意事项
1、使用Ruby 1.9 + Redmine 2.0,有些插件安装时可能会出现问题,例如:
A、Scrum插件scrum-pm(redmine_sprints)
Error message:
no such file to load -- dispatcher
Exception class:
LoadError
Application root:
/usr/share/redmine
第三方库引用出现问题,可能是由Ruby 1.9较之前版本的改动引起。
scrum-pm官方并未说明支持Ruby 1.9,scrum-pm官方已经停止支持。
2、暂时建议使用低版本Ruby(1.8) 和 低版本Redmine(1.4)
一、安装环境
1、操作系统
root@cloudsoft:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
2、已经正常安装 MySql(sudo apt-get install mysql-server libmysqlclient-dev) :
root@cloudsoft:~# mysql --version
mysql Ver 14.14 Distrib 5.1.54, for debian-linux-gnu (i686) using readline 6.2
3、已经正常安装 Apache2
root@cloudsoft:~# apache2 -v
Server version: Apache/2.2.17 (Ubuntu)
Server built: Feb 22 2011 18:34:09
二、安装ruby 1.9 (含gem)
1、安装依赖包:
root@cloudsoft:~# sudo apt-get install gcc g++ build-essential libssl-dev libreadline-dev zlib1g-dev linux-headers-generic libyaml-dev
2、下载ruby 1.9 最新稳定版
root@cloudsoft:~# wget http://ftp.ruby-lang.org/pub/ruby/ruby-1.9-stable.tar.gz
root@cloudsoft:~# tar -zxf ./ruby-1.9-stable.tar.gz
3、编译ruby源码
root@cloudsoft:~# cd ruby-1.9.3-p194/
root@cloudsoft:~/ruby-1.9.3-p194# ./configure --prefix=/usr/local/ruby
root@cloudsoft:~/ruby-1.9.3-p194# make && sudo make install
4、ruby环境变量设置
#PATH设置
root@cloudsoft:~/ruby-1.9.3-p194# sudo vi /etc/environment
#PATH中添加/usr/local/ruby/bin:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/ruby/bin"
root@cloudsoft:~/ruby-1.9.3-p194# source /etc/environment
#检查PATH设置
root@cloudsoft:~/ruby-1.9.3-p194# ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
root@cloudsoft:~/ruby-1.9.3-p194# gem -v
1.8.23
#修改GEM_HOME
root@cloudsoft:~/ruby-1.9.3-p194# sudo vim /etc/profile
#/etc/profile中添加:
export GEM_HOME=/usr/local/ruby/lib/ruby/gems/1.9.1/
export RUBYOPT=rubygems
root@cloudsoft:~/ruby-1.9.3-p194# source /etc/profile
#修改 gem 源(你懂的)
root@cloudsoft:~# gem source
*** CURRENT SOURCES ***
http://rubygems.org/
root@cloudsoft:~# gem source --clear-all
*** Removed specs cache ***