michihide's blog

技術メモおよび雑感

Flash Media Serverインストールメモ

まずはダウンロードしてインストール

# unzip Flashmedia3_5_Int_Strm_ALP.zip
# tar xzf Flashmedia3_5_Int_Strm_ALP/FlashMediaServer3.5.tar.gz
# cd FMS_3_5_1_r516/
# ./installFMS
(デフォルトからの変更分のみ記載)
Please enter the Adobe Flash Media Server port(s), comma-separated
Default [1935,80]: 1935
Do you want to install apache? (y/n)
Default [y]: n
Do you want to start the Adobe Flash Media Server
after the installation is done? (y/n)
Default [y]: n

インストール結果

Installation directory         = /opt/adobe/fms
Flash Media Server Port        = 1935
Flash Media Admin Server Port  = 1111
Administrative username        = admin_name
Administrative password        = secret_password
service owner                  = nobody
service user                   = nobody
service group                  = nobody
Run as daemon                  = Yes

システムの httpd を使うように調整

fms 側で HTTPPROXY を無効に。
# vi /opt/adobe/fms/conf/fms.ini
# HTTPPROXY.HOST = :8134 (コメントアウト
httpd 側でポート 80 を VirtualHost 化
# vi /etc/httpd/conh/httpd.conf
(前略)
#Include conf.d/*.conf(コメントアウト)
(中略)
Listen 80
(中略)
NameVirtualHost *:80
Include conf.d/*.conf
ポート 80 の設定(fms.example.com は前もって DNS に登録してあること)
# cat /etc/httpd/conf.d/fms.conf
# Flash Media Server

   ServerAdmin     root@example.com
   ServerName      fms.example.com
   DocumentRoot    /opt/adobe/fms/webroot
   CustomLog       logs/fms-access_log combined
   ErrorLog        logs/fms-error_log

Flash Media Server起動

# service httpd start
# service fms start
# tail -f /var/log/messages
Jul 28 14:31:26 corolla Service[24437]: Server starting...
Jul 28 14:31:26 corolla Service[24437]: Server started (/opt/adobe/fms/conf/Server.xml).
Jul 28 14:31:26 corolla Adaptor[24457]: Listener started ( _defaultRoot__edge1 ) : localhost:19350/v4
Jul 28 14:31:27 corolla Adaptor[24457]: Listener started ( _defaultRoot__edge1 ) : 1935/v4
Jul 28 14:31:31 corolla Service[24720]: Server starting...
Jul 28 14:31:31 corolla Adaptor[24720]: Listener started ( FCSAdminIpcProtocol ) : localhost:11110/v4
Jul 28 14:31:32 corolla Adaptor[24720]: Listener started ( FCSAdminAdaptor ) : 1111/v4
Jul 28 14:31:33 corolla Service[24720]: Server started (./conf/Server.xml).

正常動作時のソケット状態

root@corolla:~# netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 127.0.0.1:11110             0.0.0.0:*                   LISTEN      24720/fmsadmin
tcp        0      0 127.0.0.1:19350             0.0.0.0:*                   LISTEN      24457/fmsedge
tcp        0      0 0.0.0.0:1111                0.0.0.0:*                   LISTEN      24720/fmsadmin
tcp        0      0 0.0.0.0:1935                0.0.0.0:*                   LISTEN      24457/fmsedge
tcp        0      0 :::80                       :::*                        LISTEN      24152/httpd
(ldap / postfix / sshd 等は割愛)

動作確認

別ホスト(Windows)から http://fms.example.com に接続

トラブルシュート(必ずブラウザのキャッシュをクリアしてから確認すること!!)

  • 動画を再生しているが、画面で丸がくるくる回っている
    • クライアント側のキャッシュを再生している
  • 動画再生をクリックしても、何も起こらない
    • httpd が停止している
  • 動画再生をクリックすると、HTTP は OK だが RTMP は NG
    • httpd は動いているが、fms が止まっている