1.安装mysql
1
2
3
4
|
wget http:
//repo
.mysql.com
/mysql-community-release-el7-5
.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum
install
mysql-server
service mysql start
|
2.安装依赖包
1
2
3
|
yum
install
mysql-devel
yum
install
libcurl-devel
yum
install
ImageMagick-devel
|
3.安装ruby2.4
1
2
3
4
|
gpg --keyserver hkp:
//keys
.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https:
//get
.rvm.io |
bash
-s stable --ruby
mv
/usr/bin/ruby
/usr/bin/ruby2
.0
ln
-s
/usr/local/rvm/rubies/ruby-2
.4.1
/bin/ruby
/usr/bin/
|
4.安装Redmine3
1
2
3
4
5
|
wget http:
//www
.redmine.org
/releases/redmine-3
.4.2.
tar
.gz
tar
-zxvf redmine-3.4.2.
tar
.gz -C
/opt/
gem
install
bundler
bundle
install
--with development
test
rmagick
RAILS_ENV=production REDMINE_LANG=zh bundle
exec
rake redmine:load_default_data
|
5.修改配置文件
1
2
|
cp
database.yml.example database.yml
vi
database.yml
|
修改Production
1
2
3
4
5
6
7
|
production:
adapter: mysql2
database: redmine
host: localhost
username: root
password:
"123456"
encoding: utf8
|
修改生成sercet.yml
生成密钥
1
|
rake secret
|
把上面命令生成的密钥写入secrets.yml
1
2
|
production:
secret_key_base:xxxxxx
|
6.升级redmine
从redmine1里导出数据库后
然后导入到redmine3的数据库中
1
|
mysql --default-character-
set
=utf8 redmine3 < redmine1.sql
|
1
2
3
4
5
6
|
#升级数据库
bundle
exec
rake db:migrate RAILS_ENV=production
#升级插件数据库
bundle
exec
rake redmine:plugins:migrate RAILS_ENV=production
#清除老的session
bundle
exec
rake tmp:cache:
clear
tmp:sessions:
clear
RAILS_ENV=production
|
7.配置redmine在nginx里运行
为nginx安装passenger
1
2
3
|
gem
install
passenger
passenger-
install
-nginx
#需要选择nginx的源代码路径,然后程序会自动编译nginx
|
修改nginx.conf
1
2
3
4
5
|
http{
...
passenger_root
/usr/local/rvm/gems/ruby-2
.4.1
/gems/passenger-5
.1.10;
passenger_ruby
/usr/local/rvm/gems/ruby-2
.4.1
/wrappers/ruby
;
..
|
添加server :
1
2
3
4
5
6
7
8
|
server
{
server_name redmine.abc.com;
charset utf8;
index index.html index.htm index.php;
root
/opt/redmine-3
.4.2
/public/
;
passenger_enabled on;
}
|
本文转自yifangyou 51CTO博客,原文链接:
本文转自yifangyou 51CTO博客,原文链接:,如需转载请自行联系原作者
,如需转载请自行联系原作者