本教程使用Centos6.3 64位版本。以#开头代表需要再linux上执行的指令。安装Redmine一定要注意版本对应,不能一个高一个低,否则无法安装!!!
1、先安装Mysql
http://blog.csdn.net/tabactivity/article/details/12121599
2、安装openssl-1.0.0a.tar.gz ,这个安装主要目的是提取文件,因为后续安装会缺少文件。
# tar zxvf openssl-1.0.0a.tar.gz
# cd openssl-1.0.0a
# 。/config
# make
# make test
# make install
3. 安装Ruby
[ruby] view plaincopy
tar xvf ruby-1.8.7-p352.tar.bz2
cd ruby-1.8.7-p352
。/configure --prefix=/usr
make && make install
查看是否安装成功:
ruby -v
which ruby
4. 安装Ruby扩展库
[ruby] view plaincopy
cd ext/zlib
ruby extconf.rb
make && make install
cd 。。/ext/openssl
ruby extconf.rb
make && make install
5.回到一开始的目录,安装RubyGems
[ruby] view plaincopy
tar xvf rubygems-1.6.2.tgz
cd rubygems-1.6.2
ruby setup.rb
6、安装其他依赖项
#gem install rake
# gem install bundler
#gem install activesupport
#gem install activerecord
#gem install actionpack
#gem install actionmailer
#gem install activeresource
#gem install rails
6. 安装redmine
[ruby] view plaincopy
tar xvf redmine-1.1.2.tar.gz
cd redmine-1.1.2
#修改配置
cp 。/config/database.yml.example 。/config/database.yml
vi database.yml
production:
adapter: mysql
database: redmine
host: localhost
username: root
password: 《你的mysql密码》
建数据库、表,在redmine目录下:
[ruby] view plaincopy
mysql:
create database redmine character set utf8;
命令行:
rake db:migrate RAILS_ENV=production
注:如有报错:
#在redmine的。/config/boot.rb中加一句: require ‘thread’
运行:
[ruby] view plaincopy
ruby script/server -e production
通过localhost:3000来访问,管理员登录帐号/密码:admin/admin