下载地址:
http://www.redmine.org/projects/redmine/wiki/Download
安装环境:
apt-get install ruby
apt-get install ruby-dev
apt-get install libmysqlclient-dev
apt-get install libmagickwand-dev
gem install mysql2
gem install bundler --no-rdoc --no-ri
cd redmine
修改源:
vim Gemfile
source ‘https://gems.ruby-china.org’
安装依赖包:
bundle install -V --without development test postgresql sqlite
配置数据库:
cp /usr/share/redmine/config/database.yml.example /usr/share/redmine/config/database.yml
vim /usr/share/redmine/config/database.yml
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "my_password"
encoding: utf8
配置邮件:
cp /usr/share/redmine/config/configuration.yml.example /usr/share/redmine/config/configuration.yml
vim /usr/share/redmine/config/configuration.yml
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: "smtp.126.com"
port: 465
authentication: :login
domain: 'smtp.126.com'
user_name: 'xxx@126.com'
password: 'xxx'
生成 session store secret:
rake generate_secret_token
连接数据库创建redmine数据库,执行以下命令导入数据库:
cd redmine
RAILS_ENV=production rake db:migrate
导入默认数据:
RAILS_ENV=production rake redmine:load_default_data
启动测试:
ruby bin/rails server webrick -e production -b 192.168.1.119 -p 4000
登录:
账号: admin
密码: admin