源码安装redmine

2017-01-05 11:11:06来源:oschina作者:山里来的鱼人点击

http://www.redmine.org/projects/redmine/wiki/redmineinstall


创建redmine数据库
mysql -u root -p

输入mysql密码后,依次执行


CREATE DATABASE redmine CHARACTER SET utf8;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
修改database.yml
cp config/database.yml.example config/database.yml
production:
adapter: mysql2
database: redmine
host: localhost
username: root
password: my_password
安装依赖项

需要安装mysql2,rails3的驱动全用的mysql2.


sudo apt-get install libmysqlclient-dev
gem install mysql2

如果需要


sudo apt-get install imagemagick libmagickwand-dev
gem install rmagick

然后是bundler


gem install bundler
bundle install --without development test
Session store secret generation
bundle exec rake generate_secret_token

redmine 1.4命令不同,详见上面的链接


Database schema objects creation
RAILS_ENV=production bundle exec rake db:migrate

这个过程有点慢(创建表)


Database default data set
RAILS_ENV=production bundle exec rake redmine:load_default_data

会提示选择语言,简体中文为zh


测试
bundle exec rails server webrick -e production

打开http://localhost:3000/


此时无法通过IP地址访问,详见Rails启动后,无法通过IP访问


将命令换成如下命令即可。


bundle exec rails server webrick -e production -p 端口 -b IP

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台