Redmine装置

序言

目前, BitNami Redmine Stack 正在使用虚拟机(VM)。因此,以下注释适用于使用 Oracle VirtualBox ,而不是专门针对 Redmine step-by-step installation <http://www.redmine.org/projects/redmine/wiki/RedmineInstall>`_.

以下注释适用于测试环境(例如在个人计算机中),不一定适合或建议在生产环境中部署。

还要注意,Bitnami Redmine堆栈 MySql 作为数据库后端。

有关详细信息,请访问http://wiki.bitnami.com/applications/bitnami_redmine。

部署

  1. 更新 Oracle VirtualBox 如有必要。安装最新版本 VirtualBox Extension Pack .

  2. 从http://bitnami.com/stack/limesurvey 下载虚拟机。解压…

  3. 创建新的VirtualBox虚拟机

    • 来宾操作系统:Ubuntu 64位

    • RAM:至少512 MB RAM

    • 存储:选择vmdk文件

    • 网络:启用NAT

    在所有配置完成后,网络适配器将被更改为桥接适配器(在WiFi上桥接适配器存在一些问题,因此选择)。

    如果只从主机访问来宾,则也可以使用NAT。端口转发的设置如下所示:

../_images/OracleVMVirtualBoxManager_PortForwarding.png
  1. 启动虚拟机。准备安装虚拟机来宾添加(设备-->安装来宾添加)

  2. 默认的Linux登录名是 bitnami/bitnami . 在现实生活中,应该更改默认用户和密码。

  3. 启用根目录:

    $  sudo passwd root
    

    在现实生活中, root 密码应该 not 启用。(不是作为根输入,而是使用 sudo 相反)。

  4. 必要时更改键盘布局:

    $  sudo apt-get update
    $  sudo apt-get install console-data
    $  sudo dpkg-reconfigure keyboard-configuration
    $  sudo dpkg-reconfigure console-setup
    

    如果需要稍后重新配置:

    $  sudo dpkg-reconfigure console-data
    
  5. 安装VirtualBox来宾添加:

    $  sudo mount /dev/cdrom /mnt
    $  cd /mnt
    $  sudo ./VBoxLinuxAdditions.run
    $  sudo reboot
    

    如果生成失败,请检查日志文件:

    $ nano /var/log/vboxadd-install.log
    

    (请注意,如果服务器中没有安装图形界面,则Windows系统始终会显示一条失败消息)::

    $  sudo apt-get update
    $  sudo apt-get install dkms              #if required
    $  sudo apt-get install build-essential   #if required
    $  sudo apt-get linux-headers-generic     # and/or
    $  sudo apt-get linux-headers-3.2.0-53-virtual # for example, if such is the version required...
    
  6. 如何访问Bitnami虚拟设备?

如果已设置为NAT的网络和端口转发已按上述规定配置,则可以在http://localhost:8080/redmine访问应用程序。

默认应用程序登录信息为 user/bitnami

更多信息请访问:http://bitnami.com/faq/virtual_machines

备份

Redmine备份应包括:

  • 数据(存储在Redmine数据库中)

  • 附件(存储在Redmine安装的文件目录中)

下面是一个简单的shell脚本,可以用于日常备份(假设您使用的是MySQL数据库)::

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

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

存储库

Bitnami Redmine堆栈已经包含git。

项目经理可以在“项目设置”选项卡中配置对本地Git存储库的访问。

../_images/Redmine_RepositoryTab.png ../_images/Redmine_GitRepo.png

请注意,存储库应该是本地的和裸的。例如,要从远程存储库克隆,请使用:

git clone --bare git://yourgitserver.org/project.git

并在项目>设置>存储库中添加到存储库的完整路径,例如 /var/repositories/project.git .

Redmine用户组对存储库文件夹的权限应为775。

要使用来自远程工作源的更改来更新裸存储库,请执行以下操作:

git fetch -q origin master:master

或者将更改推送到裸存储库中:

git push --all <url-of-bare-repo>