こんにちは streampack チームの木村です。

ウチのチームではメンバー持ち回りで週に一回なんか記事を投稿しなくてはならないというルールを作ってしまったのですが、次回は何を書こうかなと思案していたところ、検証で使っている Wowza Streaming Engine のアップデートを知らせるメールが届いた(2018/2/13)ので、今回はこれをネタにします。

Wowza からのメール

詳しいことは書いてないけど 4.7.1-4.7.3.01 使っているとライセンス認証で問題が発生して使えなくなるかもよ!ってことらしい。

環境

仕事がら Wowza はいくつか使っていますが、AWS Market Place から起こした時間課金版についてアップデートしてみます。
BYOL 版でも、ローカルにインストールした Wowza でも手順は同様です。

https://aws.amazon.com/marketplace/pp/B012BW3WB8?qid=1518597563891&sr=0-1&ref_=srh_res_product_title

アップデートプログラムの入手

既存の環境からバージョンアップする場合、Wowza のサイトにログインしてアップデートプログラムを入手する必要があります。(要 Wowza アカウント)

https://store.wowza.com/portal/account

ここからログインして My Downloads ページに行くとダウンロードリンクが取得できます。
Wowza Streaming Engine 4.7.4 の部分がリンクになっています。

アップデート作業

それでは EC2 インスタンスにログインしてアップデートしていきます。

まずは [Install Dir]/updates ディレクトリーに移動して、ディレクトリーを作成します。
名前は何でも良いですが、WowzaStreamingEngine-Update-4.7.4 としてみました。

$ cd /usr/local/WowzaStreamingEngine/updates/
$ sudo mkdir WowzaStreamingEngine-Update-4.7.4
$ cd WowzaStreamingEngine-Update-4.7.4

Wowza ポータルサイトで取得したアップデートファイルのダウンロードリンクを利用してローカルにダウンロードします。

$ sudo wget https://store.wowza.com/downloads/user/{伏せ字}/WowzaStreamingEngine-Update-4.7.4.zip
$ ls
WowzaStreamingEngine-Update-4.7.4.zip

zip を展開します。

$ sudo unzip WowzaStreamingEngine-Update-4.7.4.zip
$ ls
actions           lib    README.txt
files             linux  windows
Instructions.txt  osx    WowzaStreamingEngine-Update-4.7.4.zip

Amazon Linux で稼働しているので linux ディレクトリーに移動します。

$ cd linux/
$ ls -al
total 16
drwxr-xr-x 2 root root 4096 Jan 30 16:32 .
drwxr-xr-x 8 root root 4096 Feb 14 11:15 ..
-rw-r--r-- 1 root root  618 Jan 30 16:32 updatepermissions.sh
-rw-r--r-- 1 root root 2623 Jan 30 16:32 update.sh

update.sh に実行権を付与します。

$ sudo chmod +x update.sh

さてさて、Wowza プロセスが動いているとアップデートできない為、Wowza & Manager プロセスを殺します。

$ sudo /etc/init.d/WowzaStreamingEngine stop
$ sudo /etc/init.d/WowzaStreamingEngineManager stop

アップデート開始!

$ sudo ./update.sh
Verifying running as administrative user
Locating Wowza Streaming Engine installation directory
Running Wowza Streaming Engine update installer
Path: /usr/local/WowzaStreamingEngine-4.6.0/updates/WowzaStreamingEngine-Update-4.7.4/linux/..

This will update your installation at: /usr/local/WowzaStreamingEngine-4.6.0

Currently installed version           : Wowza Streaming Engine 4.7.1 - Build 20635

This will update your installation to : Wowza Streaming Engine 4.7.4 - Build 21380

Are you sure you want to continue? (y/n)
y
Changes in Wowza Streaming Engine 4.7.4 Build 21380
========================================

   * Fixed rtpbuffered stream target to allow multiple streams to start immediately
   * Added Application/Properties property dvrConverterTimeType (String, default="utc"). Selects the timebase for live to VOD conversion. Values can be "utc" or "dvr"

{中略}

Press Enter to continue.

Detected operating system: linux
Checking file versions.
Backing up current files.
Successfully created backup: /usr/local/WowzaStreamingEngine-4.6.0/updates/backup/4.7.4.zip
Updating installation.
The update process completed successfully.
Keep a copy of this update zipfile.  It is needed in case you want to restore to the previous version.
Only this version of the update will restore the prior version replaced by this update.

終わったら Wowza & Manager プロセスを起こします。

$ sudo /etc/init.d/WowzaStreamingEngine start
$ sudo /etc/init.d/WowzaStreamingEngineManager start

Wowza はプロセス起動時にアクセスログに Version が出力されるので、更新されたかどうか確認します。

$ vi /usr/local/WowzaStreamingEngine/logs/wowzastreamingengine_access.log

{抜粋}

#Version: 1.0
#Start-Date: 2018-02-14 11:19:28 JST
#Software: Wowza Streaming Engine 4.7.4 build21380
#Date: 2018-02-14
#Fields: date   time    tz      x-event x-category      x-severity      x-status        x-ctx   x-comment       x-vhost x-app   x-appinst       x-duration      s-ip    s-port  s-uri   c-ip    c-proto c-referrer      c-user-agent    c-client-id     cs-bytes        sc-bytes        x-stream-id     x-spos  cs-stream-bytes sc-stream-bytes x-sname x-sname-query   x-file-name     x-file-ext      x-file-size     x-file-length   x-suri  x-suri-stem     x-suri-query    cs-uri-stem     cs-uri-query
2018-02-14      11:19:29        JST     comment server  INFO    200     -       com.wowza.amazonaws.ec2.AWSEC2_METADATA_AMI_ID: ami-e52cc583

ちゃんと v4.7.4 になっていますね。

まとめ

Wowza は数ヶ月に一回程度マイナーバージョンが更新されるので、忘備録用にまとめてみました。

元記事はこちら

Wowza Streaming Engine をアップデートしてみた(4.7.1→4.7.4)