# 下载redmine发布版本,解压
extracted from redmine-2.4.2.tar.gz
# 配置数据库
CREATE DATABASE redmine CHARACTER SET utf8;
CREATE USER ‘redmine‘@‘localhost‘ IDENTIFIED BY ‘redmine‘;
GRANT ALL PRIVILEGES ON redmine.* TO ‘redmine‘@‘localhost‘;
只安装production要求的依赖包,具体依赖包信息参见redmine根目录下的Gemfile
bundle install --without development test
注意:安装前还是看下Gemfile里边source指向的哪儿,https://rubygems.org,未必能顺利下载,GFW啊,擦!
注意:安装需要比较长时间,下载的东西比较多:rails... , 另外还经常出错, 擦!
注意:Redmine automatically installs the adapter gems required by your database configuration by reading it from the config/database.yml file ,如果修改了adapter,重新要运行下bundle install
出错 -- mysql.h is missing. please check your installation of mysql and try again.
解决:
yum list mysql-devel
yum install mysql-devel.x86_64
安装devel包后,继续执行bundle install
bundle install --without development test
...
Installing mysql2 0.3.18
出错 -- checking for Magick-config... no 安装rmagick出错
-- 现象:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension
...
checking for Magick-config... no
...
Check the mkmf.log file for more
...
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p551/extensions/x86_64-linux/1.9.1/rmagick-2.14.0/gem_make.out
-- 解决:
yum list ImageMagick ImageMagick-devel
yum install ImageMagick.x86_64 ImageMagick-devel.x86_64
安装devel包后,继续执行bundle install
bundle install --without development test
...
Installing rmagick 2.14.0
The user account running the application must have write permission on the following subdirectories:
files (storage of attachments)
log (application log file production.log)
tmp and tmp/pdf (create these ones if not present, used to generate PDF documents among other things)
public/plugin_assets (assets of plugins)
E.g., assuming you run the application with a redmine user account: