Redmine升级/迁移
http://bitnami.org/article/how-to-backup-and-update-the-bitnami-redmine-stack#updating-stack
原环境说明:
安装目录:/opt/redmine
数据库文件:/opt/redmine/apps/redmine/config/database.yml
邮件文件:/opt/redmine/apps/redmine/config/email.yml
步骤:
首先停止正在运行的redmine服务:
#cd /opt/redmine
#./ctlscript.sh stop
然后单独启动mysql服务,并将数据库进行备份,在关闭服务:
#./ctlscript.sh start mysql
#/opt/redmine/mysql/bin/mysqldump -u bitnami -p bitnami_redmine > bitnami_redmine.sql
#./ctlscript.sh stop mysql
将原来的安装文件重命名为redmine-old
#mv /opt/redmine /opt/redmine-old
接着安装最新版的bitnami_redmine文件,下载地址:http://bitnami.org/stack/redmine
下载完成后,添加可执行权限,然后运行文件,按照提示进行安装即可,新的redmine的安装目录为/opt/redmine
将之前备份的数据库文件导入到新的数据库中,提供的用户名和密码在新的配置文件中/opt/redmine/apps/redmine/htdocs/config/database.yml的production:部分查看;
如果是迁移:
$ mysql -u root -p
Password: ****
mysql> drop database bitnami_redmine;
mysql> create database bitnami_redmine;
mysql> grant all privileges on bitnami_redmine.* to 'bitnami_redmine'@'localhost' identified by 'DATABASE_PASSWORD';
导入数据
#/opt/redmin/mysql/bin/mysql -u bitnami -p bitnami_redmine < bitnami_redmine.sql
然后将redmine-old目录下的fils文件中的所有内容拷贝到redmine
#cp /opt/redmine-old/apps/redmine/files /opt/redmine/apps/redmine/htdocs/files
如果安装了相关插件的话,需要将插件目录文件拷贝到新的里面:
#cp /opt/redmine-old/apps/redmine/htdocs/plugins/<plugin_name> /opt/redmine/apps/redmine/htdocs/plugins/
最后需要migrations:(这一步非常关键,否则会出现error 500)
#vim /etc/profile
export PATH=$PATH:/opt/redmine/ruby/bin
#source /etc/profile
#cd /opt/redmine/apps/redmine/htdocs
#rake db:migrate RAILS_ENV=production
rake redmine:plugins:migrate RAILS_ENV=production
最后清除缓存会话:
#rake tmp:cache:clear
#rake tmp:sessions:clear
重启服务即可完成:
#/opt/redmine/ctlscript.sh restart
下一篇: dubbo2.5.3升级到2.7.5记录
推荐阅读
-
Glide3升级到Glide4碰到的问题汇总以及部分代码修改
-
CentOS系统中MySQL5.1升级至5.5.36
-
144Hz显示器真有吹得那么神?盲目升级是花冤枉钱
-
基于SQL2005 SQL2008 表结构信息查询升级版的详解(含外键信息)
-
华为Mate 30系列EMUI 10.1内测:多屏协同升级 电脑接听手机来电
-
叕叕又升级啦!PDF文档管理控件Aspose.PDF 11月新更!支持居中对齐输出HTML
-
迁移sql2005到sql2008r2步骤
-
360随身wifi4G版怎么激活使用 360随身wifi4G版固件升级方法步骤
-
Mysql升级到5.7后遇到的group by查询问题解决
-
Win下Mysql5.6升级到5.7的方法