Last-modified: 2020-02-15 (土) 20:06:13
Moloch/アップデート

概要

Moloch 1.8.0から2.2.1へのアップデート手順です。
Moloch/インストール で構築した環境を前提としています。


molochは主にelasticsearchと依存関係があります。
アップデート元バージョンと先バージョンに前提条件があるので、作業前に必ず公式のドキュメントを参照してください。
https://molo.ch/faq
https://molo.ch/faq#how_do_i_upgrade_to_moloch_2

手順

  1. 最新パッケージ取得, ファイル更新
    Everything is expanded.Everything is shortened.
      1
      2
    
     
     
    
    curl -L -O https://files.molo.ch/builds/ubuntu-18.04/moloch_2.2.1-1_amd64.deb
    apt install ./moloch_2.2.1-1_amd64.deb
  2. バックアップ
    Everything is expanded.Everything is shortened.
      1
    
     
    
    /data/moloch/db/db.pl http://127.0.0.1:9200 backup pre20
  3. moloch停止
    Everything is expanded.Everything is shortened.
      1
      2
    
     
     
    
    systemctl stop molochcapture
    systemctl stop molochviewer
  4. アップデート
    Everything is expanded.Everything is shortened.
      1
      2
      3
      4
      5
      6
      7
      8
      9
    
     
     
     
    -
    |
    |
    -
    |
    |
    
    /data/moloch/db/db.pl http://127.0.0.1:9200 upgrade
     
    It is STRONGLY recommended that you stop ALL moloch captures and viewers before proceeding.  Use 'db.pl http://127.0.0.1:9200 backup' to backup db first.
    There is 1 elastic search data node, if you expect more please fix first before proceeding.
    Currently using Elasticsearch version  6.8.2  6.8.5 or newer is recommended
    Trying to upgrade from version 60 to version 64.
    Type "UPGRADE" to continue - do you want to upgrade??
     
    <UPGRADEと入力>
  5. moloch起動
    Everything is expanded.Everything is shortened.
      1
      2
      3
      4
      5
      6
    
     
     
     
    -
    !
     
    
    systemctl start molochcapture
    systemctl start molochviewer
     
    # 確認
    systemctl status molochcapture
    systemctl status molochviewer
  6. ブラウザでmolochにアクセスして動作確認

補足


必要に応じてmoloch以外のアップデートも行います。
公式ドキュメント上molochのアップデート前に必要なら、公式ドキュメントに従いアップデートを行います。
今回は必須要件ではないので、molochアップデート後に行いました。

  1. moloch停止
    Everything is expanded.Everything is shortened.
      1
      2
    
     
     
    
    systemctl stop molochcapture
    systemctl stop molochviewer
  2. アップデート
    Everything is expanded.Everything is shortened.
      1
      2
      3
      4
      5
      6
    
     
     
    -
    !
    -
    !
    
    apt update
     
    # elasticsearchのみの場合
    apt install elasticsearch --only-upgrade
    # システム全ての場合
    apt upgrade
  3. アップデート関連サービスorシステム再起動
    Everything is expanded.Everything is shortened.
      1
      2
      3
      4
      5
    
    -
    !
     
    -
    !
    
    # アップデート関連サービスの再起動
    systemctl restart <アップデート関連サービス>
     
    # システム再起動
    reboot
  4. moloch起動
    Everything is expanded.Everything is shortened.
      1
      2
      3
      4
      5
      6
      7
    
    -
    !
     
     
    -
    !
     
    
    # システムを再起動していれば、自動起動しているので不要
    systemctl start molochcapture
    systemctl start molochviewer
     
    # 確認
    systemctl status molochcapture
    systemctl status molochviewer
  5. ブラウザでmolochにアクセスして動作確認

検証時の環境

参考