[JIRA] 從低版本升級到高版本(3.6.2->6.0.8)
前言:
JIRA是Atlassian公司出品的專案與事務跟蹤工具,被廣泛應用於缺陷跟蹤、客戶服務、需求收集、流程審批、任務跟蹤、專案跟蹤和敏捷管理等工作領域。
公司原來用的是JIRA 3.6.2版本,Atlassian官方已不推薦使用JIRA 4.4之前的版本,之前的版本有漏洞也已不再更新,同事已經安裝好了JIRA6.0.8版本,新版的JIRA介面扁平化設計,支援移動端瀏覽,很符合移動網際網路企業的風格,現在JIRA升級到了新的版本JIRA 6.1.7,但是在遷移資料的時候,直接從3.6.2遷移到6.0.8失敗,google了很久,才發現需要在4.4.5上面將資料轉換一下,在此記錄一下資料遷移步驟。
思路:(1),安裝Jira4.4.5;(2),將Jira3.6.2的資料匯入到Jira4.4.5後再匯出;(3),再將從4.4.5匯出的資料匯入到6.0.8版本中,這樣就完成了資料的遷移工作,升級也完成了。
準備工作,JIRA3.6.2以及JIRA6.0.8已經安裝,還需要安裝的是中間的過度版本4.4.5
1,下載Jira4.4.5
Jira下載地址:http://pan.baidu.com/s/1eQcQeL8
2,安裝Jira4.4.5
[[email protected] ~]# tar -xvf atlassian-jira-4.4.5.tar.gz
[[email protected] ~]# cd atlassian-jira-4.4.5-standalone/
[[email protected] atlassian-jira-4.4.5-standalone]# find / -name start-jira.sh
/root/atlassian-jira-4.4.5-standalone/bin/start-jira.sh
[[email protected] atlassian-jira-4.4.5-standalone]#
[[email protected] atlassian-jira-4.4.5-standalone]#
[[email protected] atlassian-jira-4.4.5-standalone]# /root/atlassian-jira-4.4.5-standalone/bin/start-jira.sh
To run JIRA in the foreground, start the server with start-jira.sh -fg
Server startup logs are located in /root/atlassian-jira-4.4.5-standalone/logs/catalina.out
executing as current user
MMMMMMMMMMM .,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMM. OMM. ~MM.. MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMDMMZ7MMMMMMMMN7DMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMDMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMZ IMMM ..MMN= ,8MO 8 IN +DM8 ?MMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMM ..OI . 8I...MMMO 8 IN M7 ,MMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMN, . +MMMMMO 8 IN =O M~ ~..$MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMM~... +MMMMMMO 8 IN . . IN I..+MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMI . OMMMMMMMO 8 IN := ,O =8 MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMD ... .MMMMMMO 8 IN =O + .MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMM, =N. .7MMMM~. 8 IN =O :. =M. .MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMM, . MMD. .+MMM= :$M IN =O , IM: .MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
__ __ __ _ __
\ \/ /___ __ __ / /_ ____ __ _____ (_)___________ _____ _____/ /
\ / __ \/ / / / / __ \/ __ `/ | / / _ \ / / ___/ ___/ / / / _ \/ ___/ /
/ / /_/ / /_/ / / / / / /_/ /| |/ / __/ / (__ |__ ) /_/ / __(__ )_/
/_/\____/\__,_/ /_/ /_/\__,_/ |___/\___/ /_/____/____/\__,_/\___/____(_)
JIRA Standalone Edition
Version : 4.4.5
Detecting JVM PermGen support...
PermGen switch is supported. Setting to 256m
If you encounter issues starting or stopping JIRA Standalone Edition, please see the Troubleshooting guide at http://confluence.atlassian.com/display/JIRA/Installation+Troubleshooting+Guide
Using CATALINA_BASE: /root/atlassian-jira-4.4.5-standalone
Using CATALINA_HOME: /root/atlassian-jira-4.4.5-standalone
Using CATALINA_TMPDIR: /root/atlassian-jira-4.4.5-standalone/temp
Using JRE_HOME: /usr/lib/jvm/jdk1.7.0_60/jre
Using CLASSPATH: /root/atlassian-jira-4.4.5-standalone/bin/bootstrap.jar
Using CATALINA_PID: /root/atlassian-jira-4.4.5-standalone/work/catalina.pid
[[email protected] atlassian-jira-4.4.5-standalone]#
3,Jira4.4.5配置過程
安裝完後可以直接訪問http://192.168.171.230:8080/,進行Jira配置步驟。
3.1,訪問報錯問題
如果訪問出現該頁面,是因為我們還沒有配置JIRA HOME的路徑,需要設定java_home路徑,先去檢視下JAVA_HOME路徑為:
[[email protected] atlassian-jira-4.4.5-standalone]# echo $JAVA_HOME
/usr/lib/jvm/jdk1.7.0_60
[[email protected] atlassian-jira-4.4.5-standalone]#
找到jira的配置檔案
[[email protected] atlassian-jira-4.4.5-standalone]# find /root/atlassian-jira-4.4.5-standalone -name jira-application.properties
/root/atlassian-jira-4.4.5-standalone/atlassian-jira/WEB-INF/classes/jira-application.properties
[[email protected] atlassian-jira-4.4.5-standalone]#
[[email protected] atlassian-jira-4.4.5-standalone]# vim /root/atlassian-jira-4.4.5-standalone/atlassian-jira/WEB-INF/classes/jira-application.properties
# Do not modify this file unless instructed. It is here to store the location of the JIRA home directory only and is typically written to by the installer.
jira.home = /usr/lib/jvm/jdk1.7.0_60
在jira.home = 後面新增上JAVA_HOME的路徑,儲存配置檔案後再重啟JIRA。
3.2,配置好jira.home後重啟Jira
[[email protected] atlassian-jira-4.4.5-standalone]# /root/atlassian-jira-4.4.5-standalone/bin/shutdown.sh
MMMMMMMMMMM .,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMM. OMM. ~MM.. MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMDMMZ7MMMMMMMMN7DMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMDMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMZ IMMM ..MMN= ,8MO 8 IN +DM8 ?MMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMM ..OI . 8I...MMMO 8 IN M7 ,MMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMN, . +MMMMMO 8 IN =O M~ ~..$MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMM~... +MMMMMMO 8 IN . . IN I..+MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMI . OMMMMMMMO 8 IN := ,O =8 MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMD ... .MMMMMMO 8 IN =O + .MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMM, =N. .7MMMM~. 8 IN =O :. =M. .MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMM, . MMD. .+MMM= :$M IN =O , IM: .MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
__ __ __ _ __
\ \/ /___ __ __ / /_ ____ __ _____ (_)___________ _____ _____/ /
\ / __ \/ / / / / __ \/ __ `/ | / / _ \ / / ___/ ___/ / / / _ \/ ___/ /
/ / /_/ / /_/ / / / / / /_/ /| |/ / __/ / (__ |__ ) /_/ / __(__ )_/
/_/\____/\__,_/ /_/ /_/\__,_/ |___/\___/ /_/____/____/\__,_/\___/____(_)
JIRA Standalone Edition
Version : 4.4.5
Detecting JVM PermGen support...
PermGen switch is supported. Setting to 256m
If you encounter issues starting or stopping JIRA Standalone Edition, please see the Troubleshooting guide at http://confluence.atlassian.com/display/JIRA/Installation+Troubleshooting+Guide
Using CATALINA_BASE: /root/atlassian-jira-4.4.5-standalone
Using CATALINA_HOME: /root/atlassian-jira-4.4.5-standalone
Using CATALINA_TMPDIR: /root/atlassian-jira-4.4.5-standalone/temp
Using JRE_HOME: /usr/lib/jvm/jdk1.7.0_60/jre
Using CLASSPATH: /root/atlassian-jira-4.4.5-standalone/bin/bootstrap.jar
Using CATALINA_PID: /root/atlassian-jira-4.4.5-standalone/work/catalina.pid
[[email protected] atlassian-jira-4.4.5-standalone]#
再重新啟動jira:
[[email protected] atlassian-jira-4.4.5-standalone]# /root/atlassian-jira-4.4.5-standalone/bin/start-jira.sh
To run JIRA in the foreground, start the server with start-jira.sh -fg
Server startup logs are located in /root/atlassian-jira-4.4.5-standalone/logs/catalina.out
executing as current user
MMMMMMMMMMM .,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMM. OMM. ~MM.. MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMDMMZ7MMMMMMMMN7DMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMDMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMZ IMMM ..MMN= ,8MO 8 IN +DM8 ?MMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMM ..OI . 8I...MMMO 8 IN M7 ,MMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMN, . +MMMMMO 8 IN =O M~ ~..$MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMM~... +MMMMMMO 8 IN . . IN I..+MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMI . OMMMMMMMO 8 IN := ,O =8 MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMD ... .MMMMMMO 8 IN =O + .MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMM, =N. .7MMMM~. 8 IN =O :. =M. .MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMM, . MMD. .+MMM= :$M IN =O , IM: .MMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
__ __ __ _ __
\ \/ /___ __ __ / /_ ____ __ _____ (_)___________ _____ _____/ /
\ / __ \/ / / / / __ \/ __ `/ | / / _ \ / / ___/ ___/ / / / _ \/ ___/ /
/ / /_/ / /_/ / / / / / /_/ /| |/ / __/ / (__ |__ ) /_/ / __(__ )_/
/_/\____/\__,_/ /_/ /_/\__,_/ |___/\___/ /_/____/____/\__,_/\___/____(_)
JIRA Standalone Edition
Version : 4.4.5
Detecting JVM PermGen support...
PermGen switch is supported. Setting to 256m
If you encounter issues starting or stopping JIRA Standalone Edition, please see the Troubleshooting guide at http://confluence.atlassian.com/display/JIRA/Installation+Troubleshooting+Guide
Using CATALINA_BASE: /root/atlassian-jira-4.4.5-standalone
Using CATALINA_HOME: /root/atlassian-jira-4.4.5-standalone
Using CATALINA_TMPDIR: /root/atlassian-jira-4.4.5-standalone/temp
Using JRE_HOME: /usr/lib/jvm/jdk1.7.0_60/jre
Using CLASSPATH: /root/atlassian-jira-4.4.5-standalone/bin/bootstrap.jar
Using CATALINA_PID: /root/atlassian-jira-4.4.5-standalone/work/catalina.pid
[[email protected] atlassian-jira-4.4.5-standalone]#
3.3,配置jira資料庫
點選下一步,錄入各項資訊,準備建立DB
3.4,報錯資訊
JIRA Startup Failed |
Gadget Directory Plugin (com.atlassian.gadgets.directory) Atlassian OAuth Admin Plugin (com.atlassian.oauth.admin)Atlassian JIRA - Plugins - Shared Application Access Layer (SAL) Plugin (com.atlassian.sal.jira)Atlassian JIRA - Plugins - Look And Feel Logo Upload Plugin (com.atlassian.jira.lookandfeel)Atlassian REST - Module Types (com.atlassian.plugins.rest.atlassian-rest-module)Atlassian JIRA - Plugins - REST Plugin (com.atlassian.jira.rest)Opensocial Plugin (com.atlassian.gadgets.opensocial) |
重新關閉啟動,報錯如下:
……
Using CATALINA_BASE: /root/atlassian-jira-4.4.5-standalone
Using CATALINA_HOME: /root/atlassian-jira-4.4.5-standalone
Using CATALINA_TMPDIR: /root/atlassian-jira-4.4.5-standalone/temp
Using JRE_HOME: /usr/lib/jvm/jdk1.7.0_60/jre
Using CLASSPATH: /root/atlassian-jira-4.4.5-standalone/bin/bootstrap.jar
Using CATALINA_PID: /root/atlassian-jira-4.4.5-standalone/work/catalina.pid
Existing PID file found during start.
Tomcat appears to still be running with PID 32194. Start aborted.
[[email protected] logs]#
Kill 掉已經存在的程序32194
[[email protected] logs]# kill -9 32194
[[email protected] logs]#
再重新啟動jira程序,啟動資訊如下:
Using CATALINA_BASE: /root/atlassian-jira-4.4.5-standalone
Using CATALINA_HOME: /root/atlassian-jira-4.4.5-standalone
Using CATALINA_TMPDIR: /root/atlassian-jira-4.4.5-standalone/temp
Using JRE_HOME: /usr/lib/jvm/jdk1.7.0_60/jre
Using CLASSPATH: /root/atlassian-jira-4.4.5-standalone/bin/bootstrap.jar
Using CATALINA_PID: /root/atlassian-jira-4.4.5-standalone/work/catalina.pid
Existing PID file found during start.
Removing/clearing stale PID file.
[[email protected] logs]#
檢視日誌檔案,有如下資訊:
[[email protected] logs]# more catalina.out
九月 11, 2014 5:41:41 下午 org.apache.catalina.core.AprLifecycleListener init
資訊: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/l
ib64:/lib:/usr/lib
九月 11, 2014 5:41:41 下午 org.apache.coyote.http11.Http11Protocol init
資訊: Initializing Coyote HTTP/1.1 on http-8080
九月 11, 2014 5:41:41 下午 org.apache.catalina.startup.Catalina load
資訊: Initialization processed in 1007 ms
九月 11, 2014 5:41:41 下午 org.apache.catalina.realm.JAASRealm setContainer
資訊: Set JAAS app name Catalina
九月 11, 2014 5:41:41 下午 org.apache.catalina.core.StandardService start
資訊: Starting service Catalina
九月 11, 2014 5:41:41 下午 org.apache.catalina.core.StandardEngine start
資訊: Starting Servlet Engine: Apache Tomcat/6.0.32
2014-09-11 17:41:43,504 main INFO [jira.config.database.SystemTenantDatabaseConfigurationLoader] Reading database configuration from/usr/lib/jvm/jdk1.7.0_60/dbconfig.xml
2014-09-11 17:41:44,076 main INFO [atlassian.jira.startup.JiraStartupLogger]
刪除這個dbconfig.xml,關閉jira,然後再重新啟動,這回啟動正常了,如下所示:
看見這個頁面就表示JIRA服務正常啟動了,接下來是根據安裝嚮導配置安裝的過程。
3.5,重新配置DB過程
看Database Configuration,有Internal和External二個選擇項,我們要使用External,選擇外部資料庫。
先建立jira資料庫以及賬號密碼:
mysql>
mysql> create database jira445;
Query OK, 1 row affected (0.00 sec)
mysql>
mysql> GRANT ALL ON jira445.* TO [email protected]'%' IDENTIFIED BY 'jira_user1809';
Query OK, 0 rows affected (0.16 sec)
mysql>
在介面配置好資料庫連線資訊,如下圖所示:
隨手點選一下“Test Connection”測試下資料庫連線,連線正常,如下所示:
點選下一按鈕,報錯如下:
javax.servlet.ServletException: com.atlassian.util.concurrent.LazyReference$InitializationException: com.opensymphony.module.propertyset.PropertyImplementationException: SQL Exception while executing the following:SELECT ID, ENTITY_NAME, ENTITY_ID, PROPERTY_KEY, propertytype FROM propertyentry WHERE ENTITY_NAME=? AND ENTITY_ID=? (Table 'jira445.propertyentry' doesn't exist)
去下載:
# wget -c href="http://cdn.mysql.com/Downloads/Connector-J/mysql-connector-java-5.1.29.tar.gz
# tar zxvf mysql-connector-java-5.1.29.tar.gz
將解壓後目錄中的mysql-connector-java-5.1.29-bin.jar拷貝到JIRA的lib目錄/opt/atlassian-jira-4.4.5-standalone/lib/中
重啟jira,還是報一樣的錯誤。
去檢視jira的error log資訊,看到如下資訊:
[[email protected] logs]# more /root/atlassian-jira-4.4.5-standalone/logs/catalina.out
……
CREATE TABLE portletconfiguration (ID DECIMAL(18,0) NOT NULL, PORTALPAGE DECIMAL(18,0), PORTLET_ID VARCHAR(255), COLUMN_NUMBER DECIMAL(9,0), positionseq DECIMAL(9,0), GADGET_XML TEXT, COLOR V
ARCHAR(255), CONSTRAINT PK_portletconfiguration PRIMARY KEY (ID))
Error was: java.sql.SQLException: The MySQL server is running with the --read-only option so it cannot execute this statement
【】將資料庫設定成不是read-only的方式。
mysql> set global read_only =0;
Query OK, 0 rows affected (0.01 sec)
mysql>
之後重建jira445庫,重啟jira,再重新初始化資料庫:
在下一頁麼,輸入授權碼:
授權碼為:
AAABMQ0ODAoPeJxtUMlOwzAQvfsrLHF2laSlVStZwiQ+hGZTFlS4mTAFo8SJbKeif0/StAcQ0lxm3
rxl5q4cABfQY3c91m652a022C9K7DnuCgVgai17KztFn8KcoS+pxSIZ2jfQ6bEyoA0lLvI1iGknE
BboRCTOlrhr5HfKitomogXaNxN3Fhhn8gTU6gFuOzwWsqFWthPd2breg+3aRd21iJ9EM1zk6VE0B
maJSNagDJTnHi7yfhrHPPdDFv3C+bu8MHlS8jzLw4KjZkaex+wT4qHRWVlQQtXAv3upz/MZy+WGu
B7x7lHBE/qSVjhme45jjhkuWIAzlgRsgVL9IZQ0c8C+wRaMRQXoE+gwoI9pdSD8wPYkfQ0zcogyj
q7RRjQKg1v3v3M26PpTGPjz2B8tAYyAMCwCFGiKwG9qA+2ksL7mkMIrV80z+un8AhRu0CryeqTv8
LIZstOPg/B3240BnQ==X02fb
點選“下一”按鈕,進行下一步操作,設定管理員賬戶,使用者名稱admin密碼admin
下一步,暫時不設定郵件通知:
點選下一步,報錯如下3.6小節所示:
3.6,JIRA Access Constraints 錯誤處理
You cannot access JIRA at present.
描述 | Time | Level | Exception |
進入 https://my.atlassian.com/license/evaluation頁面,登入進去,選擇Licen 進去,
選擇Jira(Server)
然後下一步,再輸入Server ID和Organization Name的值,點選“Generate License”按鈕,建立授權碼,如下所示:
之後然後生成授權碼,Evaluations New Evaluation License,點選後面的New Evaluation License,進去看到右邊的授權碼:
AAABBw0ODAoPeNptkFtLxDAQhd/zKwI+R9Kwy66FPKxthGhvtF0p4kuso0a6sUwvuP/edissyj4MD
HPOfHOYqzu0tICWeoJy4a+FzzkNwpIK7q1ICF2Ntu3tl5P3Ot89+1SNphnMPCEBwqkJTQ9y9jN+w
zxBPi2a68jW4DpQr/a0rZJS5VmuC0XOBNnjAH/s5bGFxBxABmkcqzzQu2jRTd3bEZaFZvE+AnYzR
JDYWNeDM64G9d1aPJ4TeXxOlOK7cbZbjrbNgkyGwwtg+rbvJpBkHikAR0Adytt0XzFV7R5Y+qQzV
kWZIoVK5FQsWq03YrvdkN/Ekz3S4SXlcpRswPrDdPD/aT+P1nzDMC0CFQCM9+0LlHVNnZQnSTwuR
O3eK+2gVgIUCteTs4Q3khIgrnsY64hxYB/d8bM=X02dh
然後把啟用授權碼copy出來,錄入到授權碼輸入框,點選Proceed按鈕,出現如下提示,表示成功:
Update License |
Your license has been successfully updated. Please restart your server so that all necessary changes can take effect. Changes will not take place until server is restarted. Click here when the server is restarted. |
3.7,訪問報錯
JIRA Startup Failed | ||
You cannot access JIRA at present. Look at the table below to identify the reasons | ||
|
去檢視後臺tomcat日誌
2014-09-12 16:48:46,012 main ERROR [atlassian.plugin.manager.PluginEnabler] Unable to enable plugin com.atlassian.sal.jira
java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.Comparable
at org.apache.felix.framework.resolver.CandidateComparator.compare(CandidateComparator.java:46)
at org.apache.felix.framework.resolver.CandidateComparator.compare(CandidateComparator.java:26)
at java.util.TreeMap.compare(TreeMap.java:1188)
at java.util.TreeMap.put(TreeMap.java:531)
at java.util.TreeSet.add(TreeSet.java:255)
at java.util.AbstractCollection.addAll(AbstractCollection.java:342)
at java.util.TreeSet.addAll(TreeSet.java:312)
at org.apache.felix.framework.FelixResolverState.getCandidates(FelixResolverState.java:759)
google找到原因是:
This appears to have been caused by running on Java 1.7.0_3.
Running on Java 1.6.0_25 works fine.
下載地址2:http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html
分割命令:
tar czvf jdk-6u35-linux-x64.bin.tar.gz jdk-6u35-linux-x64.bin
split -b 40M ./jdk-6u35-linux-x64.bin.tar.gz ./jdk-6u35-linux-x64.bin.tar.gz.
合併命令:
cat jdk-6u35-linux-x64.bin.tar.gz.a* > jdk-6u35-linux-x64.bin.tar.gz
tar xf jdk-6u35-linux-x64.bin.tar.gz
增加可執行許可權
chmod +x jdk-6u35-linux-x64.bin
解壓
./jdk-6u35-linux-x64.bin
將解壓好的jdk1.6.0_35資料夾用最高許可權複製到/usr/lib/jvm目錄中:
$ sudo cp -R jdk1.6.0_35 /usr/lib/jvm
(注意:
如果:不存在jvm目錄,請以最高許可權建立jvm目錄:
$ sudo mkdir /usr/lib/jvm
)
在$HOME的.profile檔案中設定環境變數JAVA_HOME:
$ cd ~
$ vi /etc/profile
(
新增:
export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_35
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH)
引數立即生效
source /etc/profile
驗證java版本號碼
[[email protected] java]# java -version
java version "1.6.0_35"
Java(TM) SE Runtime Environment (build 1.6.0_35-b10)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)
[[email protected] java]# javac -version
javac 1.6.0_35
[[email protected] java]#
然後修改jira的jdk版本為jdk6:
[[email protected] java]# vim /root/atlassian-jira-4.4.5-standalone/atlassian-jira/WEB-INF/classes/jira-application.properties
# Do not modify this file unless instructed. It is here to store the location of the JIRA home directory only and is typically written to by the installer.
jira.home = /usr/lib/jvm/jdk1.6.0_35
~
解決好JDK,重複3.1到3.7的步驟,最後幾個步驟如下:
3.8,登入報錯
The Gadget Dashboard bundled plugin is not available. To ensure the Gadget Dashboard plugin is enabled, please contact your <a href="/secure/ContactAdministrators!default.jspa">JIRA administrators.
如果你認為這個資訊是錯誤的, 請聯絡你的 please contact your JIRA administrators管理員{1} 以得到需要的許可權.
Jira需要重新編譯安裝,以為之前是在jdk7下安裝的,現在jdk版本換到了jdk6,所以jira也需要重新編譯安裝一下,重複之前的所有步驟1—>3,最後登入介面如下:
3.9,JIRA重啟報錯
JIRA Startup Failed | ||
You cannot access JIRA at present. Look at the table below to identify the reasons | ||
|
原因就是沒有使用shutdown.sh來關閉jira,所以最好是使用start-jira.sh啟動,使用shutdown.sh關閉,那麼下次啟動就不會有問題了。若安裝目錄找不到 .jira-home.lock檔案(所在目錄不一定是你的安裝路徑),可以使用搜索功能搜尋,如下所示:
[[email protected] logs]# find / -name .jira-home.lock
/usr/lib/jvm/jdk1.6.0_35/.jira-home.lock
[[email protected] logs]#
[[email protected] logs]# rm -rf /usr/lib/jvm/jdk1.6.0_35/.jira-home.lock
[[email protected] logs]#
4,備份JIRA3.6.2
4.1,選擇備份路徑
找到資料備份目錄,每個登入使用者的選單欄是不一樣的,我這裡是“首頁”-> “管理”-> “備份”,就進入備份頁面,輸入備份檔案(帶上全路徑),這個路徑是在jira安裝伺服器上面,linux伺服器就用linux路徑/tmp/jira_pl_3.6.2.xml,windows伺服器就採用windows的路徑:D:\ jira_pl_3.6.2.xml。
4.2,開始備份
點選Backup按鈕,開始備份,jira資料多的話,時間有些長,備份完,頁面顯示如下表示備份成功:
Backup JIRA data |
Data exported to: D:\jira_pl_3.6.2.xml. |
5,在4.4.5上恢復jira3.6.2版本資料
把Step#4備份的檔案copy到/usr/lib/jvm/jdk1.6.0_35/import目錄下,然後登入進入4.4.5的jira面板,找到“System”-> “Restore System”,錄入恢復檔案路徑以及3.5小節中的License,點選“Restore”按鈕開始恢復。
恢復報錯如下:
<span color:#333333;"="" style="word-wrap: break-word; font-size: 10pt;">Either create the paths shown below and reimport, or reimport using default paths. |
錯誤 · The index path /usr/lib/jvm/jdk1.6.0_35/D:\JIRA_file\index specified in the backup file is not valid. · The attachment path /usr/lib/jvm/jdk1.6.0_35/D:\JIRA_file\attach specified in the backup file is not valid. |
VIM開啟備份檔案,找到vim jira_pl_3.6.2.xml,找到D:\JIRA_file\字串,換成/usr/lib/jvm/jdk1.6.0_35/import/,如下所示:
<OSPropertyString id="10006" value="/usr/lib/jvm/jdk1.6.0_35/import/index"/>
<OSPropertyString id="10007" value="/usr/lib/jvm/jdk1.6.0_35/import/attach"/>
<OSPropertyString id="10009" value="/usr/lib/jvm/jdk1.6.0_35/import/backUp"/>
然後,建3個目錄
[[email protected] import]# mkdir /usr/lib/jvm/jdk1.6.0_35/import/index
[[email protected] import]# mkdir /usr/lib/jvm/jdk1.6.0_35/import/attach
[[email protected] import]# mkdir /usr/lib/jvm/jdk1.6.0_35/import/backUp
[[email protected] import]#
然後重新匯入,OK,沒有報錯資訊,開始慢慢匯入資料,如下顯示:
最後,經過50分鐘,終於恢復完畢,如下所示:
6,在4.4.5上備份資料匯入的舊版本3.6.2的資料
在上一步匯入完畢之後,重新在4.4.5版本上面把新的資料進行備份,進入
備份完成,如下所示:
7,在6.0.8上做jira恢復
包括資料恢復和附件恢復
7.1恢復資料
把上一步驟備份的jira_4.4.5.zip解壓縮
[[email protected] export]# unzip jira_4.4.5.zip
Archive: jira_4.4.5.zip
inflating: entities.xml
inflating: activeobjects.xml
[[email protected] export]#
將解壓縮出來的xml備份檔案copy到Jira6.0.8的伺服器上,開始恢復,如下所示:
大概耗時40分鐘,恢復完後,如下所示:
7.2,恢復附件
去“管理員介面”->“系統”,開啟如下所示:
點開後,再拉到左邊最下面,點選“附件”選項,就會看到附件路徑,把Jira3.6.2版本下的附件檔案直接copy過來到這個目錄下,如下所示:
OK,最後,JIRA從舊版本3.6.2到新版本6.0.8升級完畢。
參考文章地址: