Chinaunix首页 | 论坛 | 博客
  • 博客访问: 463474
  • 博文数量: 122
  • 博客积分: 1403
  • 博客等级: 中尉
  • 技术积分: 1668
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-11 13:31
文章分类

全部博文(122)

文章存档

2018年(5)

2017年(12)

2014年(15)

2013年(33)

2012年(4)

2011年(53)

分类: 项目管理

2017-04-26 21:43:45

环境

centos 6.2,mysql,redmine V2.2.4,apache

安装过程

1. 下载rdmine压缩包,解压为后目录名为redmine,移动到/var/www

2.mysql中创建数据库以及用户

CREATEDATABASE redmine CHARACTER SET utf8;

CREATE USER 'redmine'@'localhost' IDENTIFIED BY'my_password';

GRANTALL PRIVILEGES ON redmine.* TO'redmine'@'localhost';

 

3. 数据库连接配置

3.1复制/var/www/redmine/config/database.yml.example ../config/database.yml

3.2,编辑database.yml,为“Production”环境配置数据库设置


这里的password对应的是用户redmine@localhost的密码。

 

4.依赖安装

         4.1 Redmine 使用Bundler 来管理gems依赖,所以我们首先要安装Bundler

gem install bundler

         4.2安装Redmine所需要的所有gems

bundle install --without development test

5. Session store secret generation

rake generate_secret_token

6. Database schema objects creation

RAILS_ENV=production rake db:migrate

7. 数据库默认数据设置

RAILS_ENV=production rake redmine:load_default_data

运行这个命令之后会提示你输入语言类型,简体中文选择 zh

8.文件系统权限

redmine用户需要有以下子目录(在redmine根目录下)的权限:

1.    files (storage of attachments)

2.    log (application log file production.log)

3.    tmp and tmp/pdf (create these ones if not present, used to generate PDF documents among other things)

4.    public/plugin_assets (assets of plugins)

运行命令:

mkdir -p tmp tmp/pdf public/plugin_assets
sudo chown -R redmine:redmine files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets

9.启动redmine系统

ruby script/rails server webrick -e production

10.登录使用

登录

初始的管理员账号密码:

配置

redmine的设置文件是config/configuration.yml

邮件配置如下:

 

改动配置后需要重新启动redmine才能生效

重启redmine

start.sh

 

备份

Redmine备份包括两部分:

l  数据,存储的是redmine数据库的系统

l  附件,存储的是redmine系统中用户上传的附件

下面是最简单的一个备份样例,实际工作中,可以改写成一个shell脚本,然后设定为每日备份一次

# Database

/usr/bin/mysqldump -u -p | gzip > /path/to/backup/db/redmine_`date +%y_%m_%d`.gz

 

# Attachments

rsync -a /path/to/redmine/files /path/to/backup/files

 

阅读(940) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~