Redmine 在ubuntu安装记录 2-依赖软件安装

 创建时间: 2015-7-28 16:03  修改时间: 2015-7-29 13:46  来源: http://ruby.taobao.org/
1 下载 redmine 软件包
2. 安装 ruby,bundler
sudo apt-get install ruby
sudo apt-get install bundler

3. ruby gem 安装源改成国内的taobao镜像源
gem sources --remove http://rubygems.org/ gem sources -a https://ruby.taobao.org/ $gem sources -l *** CURRENT SOURCES *** https://ruby.taobao.org
如果你使用 Gemfile 和 Bundle (例如:Rails 项目)
你可以用bundle的gem源代码镜像命令
bundle config mirror.https://rubygems.org https://ruby.taobao.org
这样你不用改你的 Gemfile 的 source。
source'https://rubygems.org/'gem'rails','4.1.0'...

4. rake 安装,

Rake的意思是Ruby Make,一个用ruby开发的代码构建工具.用于任务工具
$ sudo gem install rake

5. 配置 mysql 数据库
    1)mysql -h localhost -u root -p
  2)CREATE USER 'redmine'@'localhost' IDENTIFIED BY '123456'; 
  2)create database redmine default character set utf8;
  3)对数据库进行授权
  1. grant all on redmine.* to root;
  2. grant all on redmine.* to root@localhost;
  3. grant all on redmine.* to redmine;
  4. grant all on redmine.* to redmine@localhost;

6.软件拷贝到 /var 目录下
redmine-3.1.0.tar.gz
  sudo mv redmine-3.1.0 /var/redmine

7. 软件数据库配置
   cd redmine/config
   
  1. # cp database.yml.example database.yml
  2. # vi database.yml
  3. production:
  4. adapter: mysql
  5. database:redmine
  6. host: localhost
  7. username: redmine
  8. password: 123456
  9. encoding: utf8
  10. 保存退出:wq

8.gem bundler 包安装
sudo gem install bundler
9.修改 Gemfile 中 gem源
source “https://ruby.taobao.org”
10.开始安装依赖库
安装 zlib库 
sudo apt-get install zlib1g-dev
 sudo apt-get install libmysqlclient-dev
sudo gem install mysql2 -v '0.3.18'
sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev
bundle install
 
11.  Session store secret generation        
bundle exec rake generate_secret_token
12  Database schema objects creation

Create the database structure, by running the following command under the application root directory:

RAILS_ENV=production bundle exec rake db:migrate
13.
	

Database default data set

RAILS_ENV=production bundle exec rake redmine:load_default_data
14 Test the installation
bundle exec rails server webrick -e production
15 默认用户名密码:admin/admin

16 配置项文件
cp config/configuration.yml.example config/configuration.yml
vi configuration.yml
scm 配置
scm_subversion_command: svn
邮件发送配置
Redmine 在ubuntu安装记录 2-依赖软件安装-LMLPHP
11-25 01:38