Luxorのアップグレード手順
Luxor Ver.2.3.0より前バージョン(Ver.1.X.X系)からアップグレード手順とLuxor Ver.2.0以降のバージョンよりアップグレードする際の手順に分けて説明します。
Ver.1.Xよりアップグレードする手順
注意
1.Luxor Ver.2.0からインデックスのデータ構造が変更となりました。Ver.2.0より前のバージョン からアップグレードする場合はインデックス移行作業が必要となります。詳細は『インデックス移行』を参照してください。
2.移行作業が必要なため、2つのLuxor環境が必要となります。通常は別サーバでの作業を推奨します。
表 Luxor Ver.2.3.0へのアップグレード流れ
下表で記載する流れは、Luxor Ver.2.0より前の全てのバージョンが対象となります。
※ Ver.2.3.0を例にしています。
作業内容 | 説明 | 手順 |
---|---|---|
Luxor Ver.2.3.0サーバ構築 | 旧Luxorサーバと別に、新たにLuxor Ver.2.3.0のサーバを構築する。 | 構築手順は『Luxorのインストール作業手順』を参照してください。 |
インデックスの移行 | 旧LuxorサーバのインデックスをLuxor Ver.2.3.0で使えるように移行する。 | インデックス移行手順は『インデックス移行』の章を参照してください。 |
Luxorサーバの切替 | インデックス移行後、Luxorサーバを新規構築した2.3.0サーバへ切替する。 | ・INSUITE®及びSm@rtDBサーバを停止する ・INSUITE®の設定ファイルdomain.datのluxor_domainとluxor_allow_ipを旧Luxorサーバから新Luxorサーバへ設定変更する。 ・Sm@rtDBの設定ファイルhibiki.xmlのwebServiceHostsの値を旧Luxorサーバから新Luxorサーバへ設定変更する。 ・Sm@rtDB設定ファイルdefault.xmlのcontextUrlを旧Luxorサーバから新Luxorサーバへ設定変更する。 ・INSUITE®、Sm@rtDBサーバを起動し、設定反映する。 |
一定期間後、旧Luxorサーバを廃棄する | 一定期間で新Luxorサーバを使ってから、旧Luxorの廃棄を検討してください。 | 手順:特になし |
Ver.2.Xよりアップグレードする手順
Luxor Ver.2.Xよりアップグレードする場合、サーバ構築後のインデックス移行は不要です。
※ Ver.2.3.0にアップグレードする手順を例にしています。各リビジョンに合わせ、読み替えてください。
注意
1.Luxorの設定ファイルsetup.confを変更する際、INSUITE®(V3.4.1以降)とSm@rtDBのサービス停止は不要です。
tomcatサービス停止は、次のコマンドを実行してください。
# service solrTomcat stop
2.下記アップグレード手順を実施する前に、事前のバックアップがお薦めです。サーバのスナップショットを取得するか、バックアップ方法は『Luxor_Ver.2.3_インストレーションガイド』の『Luxorのバックアップ方法』を参照してください。
[1] luxor.2.3.0.tbzを、Luxorサーバに転送
ここでは、/root 配下に転送したこととします。
[2] 転送したluxor.2.3.0.tbzを解凍
# cd /root
# tar jxvf luxor.2.3.0.tbz
# cd luxor.2.3.0
[3] 前バージョンのsetup.conf を最新バージョンのsetup.conf に反映
# sh setup.sh -mergeConf /root/luxor.2.2.0/setup.conf
※ 前バージョンのsetup.conf が /root/luxor.2.2.0/配下に存在する場合の指定方法です。この操作により前バージョンのsetup.conf の設定を取り込んだsetup.conf がカレントディレクトリに作成されます。
※ Ver.2.2.0からJavaのメディアファイルをインストーラーに同梱しないように対応しました。[setup.conf]の[javaMediaFile]と[javaDir]が廃棄され、[javaInstallDir]を新規追加しました。
[javaMediaFile]と[javaDir]が廃棄されても、上記のコマンド実施による自動削除が行われません。ご注意ください。廃棄された項目を削除する場合、手動でsetup.confを更新してください。
[4] カレントディレクトリの setup.conf を編集
tomcatMediaFileとjavaInstallDirが、下記に記載しているバージョンを利用中の場合、手順[5]、[6]を外して、手順[7]に進んでください。
# cd /root/luxor.2.3.0
# vi setup.conf
"tomcatMediaFile" をapache-tomcat-8.5.38.tar.gzに変更します。
"javaInstallDir" をJDK11のインストール先のフルパス(binの直接上位まで)に設定します。
※ setup.confの各パラメータの詳細は、「setup.conf」を参照してください。
[5] tomcatMediaFileを解凍
ここでは、apache-tomcat-8.5.38.tar.gzを/usr/local/luxor/ 配下に解凍します。
# cd /usr/local/luxor/
# tar zxvf /root/luxor.2.3.0/apache-tomcat-8.5.38.tar.gz
# rm -rf tomcat
# ln -s apache-tomcat-8.5.38 tomcat
# chown -R webadmin.webadmin apache-tomcat-8.5.38
# chown -R webadmin.webadmin tomcat
[6] Java11をインストール
正式なルートからJava11のインストールモジュールをダウンロードしてください。
ここでは、ダウンロードしたモジュールを/usr/local/luxor/ 配下に配布及びインストールします。
# cd /usr/local/luxor/
# tar zxvf /root/luxor.2.3.0/openjdk-11.X.X_linux-x64_bin.tar.gz
# chown -R root.root jdk-11.X.X
[/root/luxor.2.3.0/jdk-11.X.X](binの直接上位まで)を「setup.conf」の「javaInstallDir」に設定してください。
[7] バージョンアップとサービスの再起動
事前にINSUITE®のAPサーバ、管理サーバ及びSm@rtDBのAPサーバのhttpdを停止した場合は、ここで起動してください。
# cd /root/luxor.2.3.0
# sh setup.sh -homeOverwrite
# service solrTomcat start
※setup.shを実行すると以下のファイルが上書きされますので、事前にバックアップすることがお薦めです。また、チューニング等の理由により手動で修正している場合、再修正する必要があります。
/var/luxor/activemq.xml
/var/luxor/common_schema.xml
/var/luxor/filetype.txt
/var/luxor/log4j.xml
/var/luxor/luxor.xml
/var/luxor/solr.xml
/var/luxor/zoo.cfg
/var/luxor/insuite
/var/luxor/smartdb
/usr/local/luxor/tomcat/conf/server.xml
/usr/local/luxor/tomcat/conf/tomcat-users.xml
/usr/local/luxor/tomcat/webapps/solr/WEB-INF/web.xml
/usr/local/luxor/tomcat/webapps/solr/WEB-INF/classes/junit_systemtest.properties
/etc/init.d/solrTomcat
[8] コンフィグファイルのアップロード、INSUITE®及びSm@rtDBのCollections更新を行います。
下記のコマンドを任意のLuxorサーバで実施してください。
# sh setup.sh -upZkConfig
success in uploading the admin_guide config file to zookeeper.
success in uploading the board config file to zookeeper.
success in uploading the custom config file to zookeeper.
success in uploading the fa_schedule config file to zookeeper.
success in uploading the guide config file to zookeeper.
success in uploading the history-library config file to zookeeper.
success in uploading the history-share config file to zookeeper.
success in uploading the insuite_test config file to zookeeper.
success in uploading the library config file to zookeeper.
success in uploading the ml config file to zookeeper.
success in uploading the ns_board config file to zookeeper.
success in uploading the reminder config file to zookeeper.
success in uploading the report config file to zookeeper.
success in uploading the schedule config file to zookeeper.
success in uploading the share config file to zookeeper.
success in uploading the smart config file to zookeeper.
success in uploading the todo config file to zookeeper.
success in uploading the wflow config file to zookeeper.
success in uploading the cms config file to zookeeper.
success in uploading the binder config file to zookeeper.
success in uploading the document config file to zookeeper.
success in uploading the document_item config file to zookeeper.
success in uploading the imp config file to zookeeper.
success in uploading the process config file to zookeeper.
success in uploading the efficiency config file to zookeeper.
success in uploading the search_history config file to zookeeper.
# sh setup.sh -createCollections
Collection admin_guide already exists.
Collection board already exists.
Collection custom already exists.
Collection fa_schedule already exists.
Collection guide already exists.
Collection history-library already exists.
Collection history-share already exists.
Collection insuite_test already exists.
Collection library already exists.
Collection ml already exists.
Collection ns_board already exists.
Collection reminder already exists.
Collection report already exists.
Collection schedule already exists.
Collection share already exists.
Collection smart already exists.
Collection todo already exists.
Collection wflow already exists.
Collection cms already exists.
Collection binder already exists.
Collection document already exists.
Collection document_item already exists.
Collection imp already exists.
Collection process already exists.
Collection efficiency already exists.
Collection search_history already exists.
# sh setup.sh -reloadCollections
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int name="QTime">798</int></lst><lst name="success"><lst name="127.0.0.1:10080_solr"><lst name="responseHeader"><int name="status">0</int><int name="QTime">729</int></lst></lst></lst>
</response>
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int name="QTime">659</int></lst><lst name="success"><lst name="127.0.0.1:10080_solr"><lst name="responseHeader"><int name="status">0</int><int name="QTime">633</int></lst></lst></lst>
</response>
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int name="QTime">582</int></lst><lst name="success"><lst name="127.0.0.1:10080_solr"><lst name="responseHeader"><int name="status">0</int><int name="QTime">554</int></lst></lst></lst>
</response>
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int name="QTime">496</int></lst><lst name="success"><lst name="127.0.0.1:10080_solr"><lst name="responseHeader"><int name="status">0</int><int name="QTime">475</int></lst></lst></lst>
</response>
<?xml version="1.0" encoding="UTF-8"?>
... ...
... ...
注意
既にCollectionsが存在する状態でsh setup.sh -createCollectionsを実行すると下記のエラーメッセージが出力されますが、問題ありません。
エラーメッセージ出力例:common.SolrException
2018-07-06 13:34:53,313 ERROR [OverseerThreadFactory-6-thread-5-processing-n:127.0.0.1:10080_solr] common.SolrException (SolrException.java:159) : Collection: process operation: create failed:org.apache.solr.common.SolrException: collection already exists: process at org.apache.solr.cloud.CreateCollectionCmd.call(CreateCollectionCmd.java:85) at org.apache.solr.cloud.OverseerCollectionMessageHandler.processMessage(OverseerCollectionMessageHandler.java:226) at org.apache.solr.cloud.OverseerTaskProcessor$Runner.run(OverseerTaskProcessor.java:464) at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
[9] サービス再起動後の動作確認
動作確認コマンドを実行し、サービス再起動後の動作確認を行います。
※ About画面にて、全てのCoreが問題なくReloadされた(各Coreのサイズが表示される)ことを確認した上、installCheckを実行してください。
※ データ量やサーバのスペック状況によって、Solr各コアの起動時間が変わります。
# cd /root/luxor.2.3.0
# sh setup.sh -installCheck
<実行の結果>
(a) 問題がない場合、以下の内容が出力されます。
installCheck SUCCESS!
(b) 問題がある場合、以下の内容が出力されます。
installCheck failed. See ./installCheck.log
(c) Luxorインストールが問題なく、添付ファイルダウンロードやINSUITEあるいはSm@rtDBへ接続失敗の場合
installCheck SUCCESS! But can't connect to INSUITE or Sm@rtDB server, please see ./installCheck.log
※ installCheck.logの内容を確認してください。
問題が発生した場合のリストア手順について
バックアップからのリストア方法に関しては、『Luxor_Ver.2.3_インストレーションガイド』の「Luxorのバックアップ方法」を参照してください。