linux redmine 安装部署
1、安装mysql
1
2
3
|
yum
install
mysql-server
yum
install
mysql
yum
install
mysql-devel
|
1
2
|
service mysqld start
/usr/bin/mysqladmin
-u root password
'root'
|
添加到开机启动:
1
2
|
chkconfig --add mysqld
chkconfig --level 2345 mysqld on
|
2、安装ruby
1
2
3
|
yum
install
ruby
yum
install
rubygems
yum
install
ruby-devel
|
3、登录mysql,创建redmine数据库
1
|
CREATE
DATABASE
redmine
CHARACTER
SET
utf8;
|
4、下载redmine安装包
1
|
wget http:
//www
.redmine.org
/releases/redmine-2
.6.0.
tar
.gz
|
5、将redmine解压到/usr/local目录下
1
|
tar
zxvf redmine-2.6.0.
tar
.gz
|
6、进入redmine目录下
1
|
cd
/usr/local/redmine
|
7、配置redmine的数据库配置
进入config目录下,拷贝database.yml.example为database.yml
1
|
cp
database.yml.example database.yml
|
修改database.yml的配置
1
2
3
4
5
6
7
|
production:
adapter: mysql ruby 1.8设置为:mysql ruby 1.9设置为:mysql2
database: redmine
host: localhost
username: root
password: root
encoding: utf8
|
8、安装图片处理软件
1
|
yum
install
ImageMagick ImageMagick-devel
|
9、Bundler 是管理Gem相依性的工具
1
2
3
4
|
gem
install
bundler
gem
install
json -
v
'1.8.6'
gem
install
mysql -
v
'2.8.1'
gem
install
rmagick -
v
'2.16.0'
|
10、Redmine使用bundle来管理gems依赖
1
|
bundle
install
--without development
test
|
11、这一步生成随机密钥 Rails 。用于编码存储会话数据从而防止其篡改。
生成了一个新的秘密令牌无效后重新启动所有现有会话。
1
|
bundle
exec
rake generate_secret_token
|
12、加载数据结构
1
|
RAILS_ENV=production bundle
exec
rake db:migrate
|
13、加载默认数据
1
|
RAILS_ENV=production bundle
exec
rake redmine:load_default_data
|
14、开启服务
with Redmine 2.x:
1
|
bundle
exec
ruby script
/rails
server webrick -e production -p 80
|
with Redmine 3.x:
1
|
bundle
exec
rails server webrick -e production -p 80
|
15、访问
1
|
http:\\127.0.0.1:3000
|
账户密码:admin/admin
16、配置邮件,在config目录下的configuration.yml中进行配置
1
|
cp
configuration.yml.example configuration.yml
|
本文转自 XDATAPLUS 51CTO博客,原文链接:http://blog.51cto.com/xdataplus/1975227