1.下载:wget https://www.redmine.org/releases/redmine-4.1.0.tar.gz
2.解压: tar -zxvf redmine-4.1.0.tar.gz
3.安装mysql:apt-get install mysql-server mysql-client
4.创建数据库:mysql -u root -p
cp config/database.yml.example config/database.yml
vi config/database.yml 修改为
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "passwd"
encoding: utf8
5.下载依赖:
1)ruby,gem :
sudo apt-get install ruby ruby-dev rubygems libmysqlclient-dev imagemagick libmagickwand-dev
2)bundler:
gem sources -r http://rubygems.org/
gem source -a http://ruby.taobao.org
gem install bundler -V
3)用bundle下载依赖
bundle install --without development test
6.生成一个加密
bundle exec rake generate_secret_token
7.数据库创建和设置
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake redmine:load_default_data
8.设置权限
sudo find files log tmp public/plugin_assets -type f -exec chmod -x {} +
bundle exec rails server webrick -e production
9.访问
http://localhost:3000/ (admin:admin)