Redmine 在ubuntu安装记录 2-依赖软件安装
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
source'https://rubygems.org/'gem'rails','4.1.0'...
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)对数据库进行授权
- grant all on redmine.* to root;
- grant all on redmine.* to root@localhost;
- grant all on redmine.* to redmine;
- 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
- # cp database.yml.example database.yml
- # vi database.yml
- production:
- adapter: mysql
- database:redmine
- host: localhost
- username: redmine
- password: 123456
- encoding: utf8
- 保存退出:wq
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
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 installationbundle exec rails server webrick -e production
15 默认用户名密码:admin/admin
16 配置项文件cp config/configuration.yml.example config/configuration.ymlvi configuration.ymlscm 配置scm_subversion_command: svn邮件发送配置