2010-03-09

Debian/Linux下Redmine的安装步骤

前提条件是:你的机器上已经安装了 ruby , rake, rails 和 mysql数据库。 至于ruby和rails的版本对应情况可以参考:http://www.redmine.org/wiki/redmine/RedmineInstall
  1. 下载安装包 redmine-x.x.x.tar.gz 下载地址:http://rubyforge.org/frs/?group_id=1850
  2. 解压并进入解压后目录
    tar -zxvf redmine.x.x.x.tar.gz
    cd redmine-x.x.x
  3. 创建数据库
    mysql> create database redmine;
    mysql> create user 'redmine'@'localhost' identified by 'redmine';
    mysql> grant all privileges on redmine.* to 'redmine'@'localhost';
  4. 配置redmine连接数据库所需的参数
    redmine-x.x.x$ cp config/database.yml.example config/database.yml
    redmine-x.x.x$ vi config/database.yml
    production:
      adapter: mysql
      database: redmine
      host: localhost
      username: redmine
      password: redmine
      encoding: utf8
    说明:粗体部分是修改的内容
  5. 创建一个session安装密钥 运行下面的命令:
    redmine-x.x.x$ rake config/initializers/session_store.rb
  6. 执行数据迁移
    redmine-x.x.x$ rake db:migrate RAILS_ENV='production'
    说明:如果出现异常: The bundled mysql.rb dirver has been removed from Rails 2.2 install the mysql gem and try again: gem install mysql 而且执行 gem install mysql 后仍然出现以下异常: ERROR: Error installing mysql: ERROR: Failed to build gem native extension. 则执行如下命令: sudo apt-get install ruby1.8-dev sudo apt-get install libmysqlclient15-dev 然后再执行 gem install mysql 就OK了
  7. 启动服务,查看 redmine 应用
    redmine-x.x.x$ ruby script/server -e production
    打开浏览器输入 http://localhost:3000    就可以看到redmine的首页了
如果你用的操作系统是Windows, 可参见 Windows下Redmine-0.9.x的安装
blog comments powered by Disqus