bitnami redmine版本由2.3.1升級至3.2.2過程

環境:

  • 操做系統爲ubuntu13.**版本,非長期支持版。
  • 安裝目錄:/opt/redmine-2.3.1-0/
  • 全部者用戶:root

安裝過程:

1. 備份2.3.1數據庫

sudo /opt/redmine-2.3.1-0/mysql/bin/mysqldump -u bitnami -p  bitnami_redmine > /home/erick/redmineback/2.3.1backup.sql

2. 備份2.3.1的配置文件和files目錄(上傳文件)

cp /opt/redmine-2.3.1-0/apps/redmine/htdocs/config/database.yml /home/erick/redmineback/
cp /opt/redmine-2.3.1-0/apps/redmine/conf/redmine.conf /home/erick/redmineback/
 cp /opt/redmine-2.3.1-0/apps/phpmyadmin/conf/phpmyadmin.conf /home/erick/redmineback/
cp /opt/redmine-2.3.1-0/apache2/conf/httpd.conf /home/erick/redmineback/
mkdir /home/erick/redmineback/files
cp /opt/redmine-2.3.1-0/apps/redmine/htdocs/files/* /home/erick/redmineback/files
cp /opt/redmine-2.3.1-0/apps/redmine/htdocs/public/favicon.ico /home/erick/redmineback/

3. 下載並安裝最新redmine bitnami3.2.2安裝包,目錄與以前的區分開

/opt/redmine-3.2.2-0/

4. 備份3.2.2的數據庫

sudo /opt/redmine-3.2.2-0/mysql/bin/mysqldump -u bitnami -p  bitnami_redmine > /home/erick/redmineback/3.2.2backup.sql

5. 刪除並建立3.2.2的數據庫

sudo /opt/redmine-3.2.2-0/mysql/bin/mysql -u bitnami -p
DROP DATABASE bitnami_redmine;
CREATE DATABASE bitnami_redmine;
quit  

6. 用2.3.1的備份數據恢復到3.2.2的數據庫中

經過phpmyadmin的導入功能實現php

7. 遷移3.2.2的數據庫

cd /opt/redmine-3.2.2-0/apps/redmine/htdocs
sudo /opt/redmine-3.2.2-0/ruby/bin/ruby bin/rake db:migrate RAILS_ENV=production

8. 修改3.2.2的配置文件

設置apache,啓用gogs,修改apache參數文件:mysql

/opt/redmine-3.2.2-0/apache2/conf/httpd.conf

在最後增長如下配置信息:git

<VirtualHost *:80>
     DocumentRoot  "/opt/redmine-3.2.2-0/apps/redmine/htdocs/public/"
     ServerName qa.yncic.com
     ServerAlias qa.yncic.com
</VirtualHost>
<VirtualHost *:80>
        ServerAdmin webmaster@domain.tld
        ServerName git.yncic.com
        ProxyRequests Off
        <Proxy *>
        Order deny,allow
        Allow from all
        </Proxy>
        ProxyPass / http://localhost:3000/
        ProxyPassReverse / http://localhost:3000/
</VirtualHost>

9. 拷貝files目錄到3.2.2中

sudo cp -r /opt/redmine-2.3.1-0/apps/redmine/htdocs/files/* /opt/redmine-3.2.2-0/apps/redmine/htdocs/files/
sudo chown -R daemon:daemon /opt/redmine-3.2.2-0/apps/redmine/htdocs/files/*

10. 拷貝icon圖標

sudo cp /opt/redmine-2.3.1-0/apps/redmine/htdocs/public/favicon.ico /opt/redmine-3.2.2-0/apps/redmine/htdocs/public/favicon.ico

參考資料

  • https://wiki.bitnami.com/Applications/BitNami_Redmine#How_to_upgrade_Redmine.3fweb

  • https://wiki.bitnami.com/Components/MySQL#How_to_create_a_database_backup.3fsql

  • http://fableking.iteye.com/blog/1395366數據庫

  • http://blog.csdn.net/shishuo365/article/details/45999053apache

相關文章
相關標籤/搜索