安装版本为bitnami-redmine-2.6.5-0 ,用的Bitnami的一键安装包 。
下载地址https://bitnami.com/stack/redmine/installer
简要安装步骤如下:
1、给安装包添加可执行权限:
[root@redmine-test /]# chmod +x /usr/local/src/redmine-2.6.5/bitnami-redmine-2.6.5-0-linux-x64-installer.run
[root@redmine-test /]# /usr/local/src/redmine-2.6.5/bitnami-redmine-2.6.5-0-linux-x64-installer.run
2、安装目录为/opt/redmine-2.6.5-0/
3、添加Redmine开机启动项:
[root@redmine-test /]# vim /etc/rc.local
/opt/redmine-2.6.5-0/ctlscript.sh start mysql
/opt/redmine-2.6.5-0/ctlscript.sh start apache
/opt/redmine-2.6.5-0/ctlscript.sh start subversion
4、配置文件
系统配置:/opt/redmine-2.6.5-0/apps/redmine/htdocs/config/configuration.yml
数据库配置:/opt/redmine-2.6.5-0/apps/redmine/htdocs/config/database.yml
图片附件:/opt/redmine-2.6.5-0/apps/redmine/htdocs/files
5、每天0点运行备份脚本,备份redmine数据库至/backup
( 0 */24 * * * /root/redmine.sh )
redmine.sh:
#!/bin/bash #DB服务器IP
DB_HOST="127.0.0.1"
#database name
DB_NAME="bitnami_redmine"
#database username
DB_USER="bitnami"
#database password
DB_PASS="42a86f844f"
#当前日期时间字符串 例:2010-12-20-10-12-30 (年月日时分秒)
DATE=`date +%Y-%m-%d-%H-%M-%S`
#bakup file absolute path
BAKUP_FILE=/data/backup/$DB_NAME-$DATE.sql #执行mysqldump命令的参数
SQL_OPT="-u$DB_USER -p$DB_PASS -h $DB_HOST $DB_NAME" #执行备份,整个DB所有表的备份,SQL语句的形式
/opt/redmine-2.6.5-0/mysql/bin/mysqldump --opt $SQL_OPT > $BAKUP_FILE echo 'Backup success。'
6、系统迁移:
安装相同版本的redmine系统(bitnami-redmine-2.6.5-0)
新建空数据库:
> drop database bitnami_redmine;
> create database bitnami_redmine;
导入原系统数据库:
[root@redmine-test /]# /opt/redmine-2.6.5-0/mysql/bin/mysql -ubitnami -p bitnami_redmine < /usr/local/src/bitnami_redmine-2017-09-19-00-00-01.sql
导入图片附件:
图片附件地址:/opt/redmine-2.6.5-0/apps/redmine/htdocs/files
重启系统:
[root@redmine-test /]# /opt/redmine-2.6.5-0/ctlscript.sh restart
7、解决提交问题慢:
[root@redmine-test /]# vim /opt/redmine-2.6.5-0/apps/redmine/htdocs/config/configuration.yml
修改如下项目:
delivery_method: :smtp
delivery_method: :async_smtp
[root@redmine-test /]# /opt/redmine-2.6.5-0/ctlscript.sh restart
[THE END]