redmine 在 centos 下的安装过程总结帖(上)

上一篇 / 下一篇  2012-03-06 09:21:49 / 个人分类:配置管理

一、各部分组件的基本要求

Redmine version

Supported Ruby versions

Required Rails version

Required Rack version

current trunk

ruby 1.8.6, 1.8.7

Rails 2.3.11

Rack 1.1.1

trunk from r2887 to r4903

ruby 1.8.6, 1.8.7

Rails 2.3.5

Rack 1.0.1

trunk from r2493 to r2886

ruby 1.8.6, 1.8.7

Rails 2.2.2

trunk before r2493

ruby 1.8.6, 1.8.7

Rails 2.1.2

1.3.x(1.3.1<RubyGems<1.5.0)

1.8 <ruby <1.9

Rails 2.3.5

Rack 1.1.1

1.2.x

ruby 1.8.6, 1.8.7

Rails 2.3.11

Rack 1.1.1

1.1.x

ruby 1.8.6, 1.8.7

Rails 2.3.5

Rack 1.0.1

1.0.x

ruby 1.8.6, 1.8.7

Rails 2.3.5

Rack 1.0.1

0.9.x

ruby 1.8.6, 1.8.7

Rails 2.3.5

Rack 1.0.1

0.8.x

ruby 1.8.6, 1.8.7

Rails 2.1.2


二、环境的配置
注:这里以版本0.8.6为例进行讲解,实际情况请按照说明配置基础环境。
2.1 安装必要的软件包
首先安装必要的库和软件包:
# yum install zlib-devel curl-devel expat-devel gettext-devel
# yum install mysql-server mysql-devel openssl-devel gcc make

2.2 安装和配置 Ruby on Rails
下载 ruby 和 rubygems
# wget http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.gz
# wget http://rubyforge.vm.bytemark.co.uk/files/rubygems/rubygems-1.3.5.tgz
编译和安装 ruby
# tar zxvf ruby-1.8.7.tar.gz
# cd ruby-1.8.7
# ./configure
# make
# make install
# cd ext/zlib
# ruby extconf.rb --with-zlib-include=/usr/include --with-zlib-lib=/usr/lib
# cd ../../
# make
# make install
编译和安装 rubygems,安装 ruby mysql 支持:
# tar zxvf rubygems-1.3.5.tgz
# cd rubygems-1.3.5
# ruby setup.rb
# gem sources -r http://gems.rubyforge.org/
# gem sources -a http://gems.tron.name/gems.rubyforge.org/
# gem install mysql
安装 ruby on rails,指定版本号因为 redmine 需要这个版本:
# gem install rails -v=2.1.2
安装完以后检查一下是否都正确装上:
# gem list
*** LOCAL GEMS ***
actionmailer (2.1.2)
actionpack (2.1.2)
activerecord (2.1.2)
activeresource (2.1.2)
activesupport (2.1.2)
mysql (2.8.1)
rails (2.1.2)
rake (0.8.7)
2.3 安装和配置 Redmine
下载 redmine 并增加一个 redmine 用户:
# wget http://rubyforge.org/frs/download.php/66633/redmine-0.8.6.tar.gz
# /usr/sbin/adduser redmine
创建 redmine 需要的数据库
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 50
Server version: 5.1.40 MySQL Community Server (GPL) by Remi

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database redmine character set utf8;
mysql> grant all on redmine.* to 'redmine'@'localhost' identified by 'yourpassword';
mysql> flush privileges;

配制 redmine 环境和数据库:
# rm -rf /home/redmine
# mv redmine-0.8.6 /home/redmine
# cd /home/redmine/config
# cp database.yml.example database.yml
# vi database.yml
production:
  adapter: mysql
  database: redmine
  host: localhost
  username: redmine
  password: yourpassword
  encoding: utf8
# cd /home/redmine
# rake db:migrate RAILS_ENV="production"
# chown -R redmine:redmine /home/redmine
# chmod -R o-rwx,g-rwx /home/redmine
启动 redmine
# su - redmine -c "ruby script/server webrick -e production"
访问 redmine,打开浏览器访问 http://localhost:3000 或者 http://your-service-ip:3000 ,输入默认用户名密码登陆:admin/admin

TAG:

 

评分:0

我来说两句

Open Toolbar