redmine數據庫配置文件裏有三種環境: production, development, test
redmine/bin/rails server -b 0.0.0.0 // 默認development環境
ruby redmine/bin/rails server -b 0.0.0.0 webrick -e production -d // -e指定環境 -d後臺運行
redmine/bin/rails server -h // 查看幫助
修改gem源
gem sources -r https://.../ // 刪除源
gem sources -a https://ruby.taobao.org //增加源
gem sources -l // 列出現有源
# bundle config mirror.https://rubygems.org https://ruby.taobao.org
1.安裝ruby
./configure --prefix=/usr/local/ruby --with-openssl-dir=/usr/local/ssl
vim /etc/profile
export PATH=$PATH:/usr/local/ruby/bin
source /etc/profile
2.安裝rubygems
# ruby setup.rb
3.安裝rail
# gem install rails -v=2.3.5
# gem install rake
4.安裝redmine
# cp -rf redmine..- /usr/local/redmine
5.Setting up Rails
# cd /usr/local/redmine
# gem install bundler
# bundle install
這裏要安裝很多模塊
6.設置redmine數據庫環境
# rake db:migrate RAILS_ENV="production"
# rake generate_secret_token
redmine 啓動命令 // ./bin/rails server -h 查看幫助
ruby ./bin/rails server -b 0.0.0.0 webrick -e production -d
數據庫
mysql> create user 'redmine'@'localhost' identified by 'redmine'; //創建用戶
mysql> create database redmine character set utf8; //創建表
mysql> grant all privileges on redmine.* to 'redmine'@'localhost' identified by 'redmine'; //授權
mysql> flush privileges; //刷新