安装完成后
一、挂载目录
# cd /
# mkdir /data
# mount /dev/sdb /data
# cd /data
# mkdir video
# mkdir video/ssdcached
# mount /dev/sdc /data/video/ssdcached
二、修改Apache的监听端口
# cd /opt/adobe/ams/Apache2.2/conf
# vim httpd.conf
...
#Listen 80
Listen 8134
...
【保存并退出】
三、修改AMS的主配置文件
1. 添加80监听端口
# cd /opt/adobe/ams/conf
# vim ams.ini
...
# IP address and port(s) Adobe Media Server should listen on
# For example:
# ADAPTOR.HOSTPORT = :1935,80
#
ADAPTOR.HOSTPORT = :1935,80
...
2. 指定VOD的文件路径
# VOD_COMMON_DIR denotes the full path of sample "VOD" application's
# folder for storing onDemand and Progressive Download .flv/.mp3 files.
# File stored in this folder can be streamed and are also PD-able.
# Note : If you are using the default installation of Apache as a webserver,
# and if you modify VOD_COMMON_DIR, please change the document root
# accordingly in httpd.conf.
# For example:
# VOD_COMMON_DIR = <AMS_Installation_Dir>\webroot\vod
#
#VOD_COMMON_DIR = /opt/adobe/ams/webroot/vod
VOD_COMMON_DIR = /data/stream
VOD_SSD_DIR = /data/video/ssdcached/stream
VOD_RAM_DIR = /data/video/hotvideo
【保存并退出】
四、配置应用
# cd /opt/adobe/ams/applications/vod/
# vim Application.xml
<Application>
<StreamManager>
<VirtualDirectory>
<!-- Specifies application specific virtual directory mapping for recorded streams. -->
<Streams>/;${VOD_COMMON_DIR}</Streams>
<Streams>/;${VOD_DIR}</Streams>
</VirtualDirectory>
</StreamManager>
...
<Bandwidth>
<!-- Specified in bytes/sec -->
<ServerToClient>2500000</ServerToClient>
<!-- Specified in bytes/sec -->
<ClientToServer>2500000</ClientToServer>
</Bandwidth>
...
</Application>
【保存并退出】
五、重启服务
# service ams restart
六、验证所有配置和优化
所有配置与优化完成后,使用如下命令作验证:
# cd /opt/adobe/ams/tools
# ./amscheck --host 192.168.1.81 --port 80 --app vod/_definst_ --play mp4:20140612/xxxx.mp4 30 90 --logfile 128.txt;cat 128.txt
#Version 5,0,3,3029
#2014-06-11 16:03:25
#Software: Adobe Media Server Check 5,0,3,3029
#2014-06-11
#Fields: date time x-event x-sname
2014-06-11 16:03:25 Connect rtmp://192.168.1.81:80/vod/_definst_
2014-06-11 16:03:25 NetConnection.Connect.Success Connection succeeded.
2014-06-11 16:03:25 Success StreamCreated
2014-06-11 16:03:25 Success StreamCreated
2014-06-11 16:03:25 NetStream.Play.Reset Playing and resetting 20140612/xxxx.mp4
82138N4.mp4.
2014-06-11 16:03:25 NetStream.Play.Start Started playing 20140612/xxxx.mp4.
2014-06-11 16:03:25 NetStream.Data.Start -
2014-06-11 16:03:25 NetStream.Play.Stop Stopped playing 20140612/xxxx.mp4.
2014-06-11 16:03:25 Program complete successful -
表示一切都配置和优化成功;
一、挂载目录
# cd /
# mkdir /data
# mount /dev/sdb /data
# cd /data
# mkdir video
# mkdir video/ssdcached
# mount /dev/sdc /data/video/ssdcached
二、修改Apache的监听端口
# cd /opt/adobe/ams/Apache2.2/conf
# vim httpd.conf
...
#Listen 80
Listen 8134
...
【保存并退出】
三、修改AMS的主配置文件
1. 添加80监听端口
# cd /opt/adobe/ams/conf
# vim ams.ini
...
# IP address and port(s) Adobe Media Server should listen on
# For example:
# ADAPTOR.HOSTPORT = :1935,80
#
ADAPTOR.HOSTPORT = :1935,80
...
2. 指定VOD的文件路径
# VOD_COMMON_DIR denotes the full path of sample "VOD" application's
# folder for storing onDemand and Progressive Download .flv/.mp3 files.
# File stored in this folder can be streamed and are also PD-able.
# Note : If you are using the default installation of Apache as a webserver,
# and if you modify VOD_COMMON_DIR, please change the document root
# accordingly in httpd.conf.
# For example:
# VOD_COMMON_DIR = <AMS_Installation_Dir>\webroot\vod
#
#VOD_COMMON_DIR = /opt/adobe/ams/webroot/vod
VOD_COMMON_DIR = /data/stream
VOD_SSD_DIR = /data/video/ssdcached/stream
VOD_RAM_DIR = /data/video/hotvideo
【保存并退出】
四、配置应用
# cd /opt/adobe/ams/applications/vod/
# vim Application.xml
<Application>
<StreamManager>
<VirtualDirectory>
<!-- Specifies application specific virtual directory mapping for recorded streams. -->
<Streams>/;${VOD_COMMON_DIR}</Streams>
<Streams>/;${VOD_DIR}</Streams>
</VirtualDirectory>
</StreamManager>
...
<Bandwidth>
<!-- Specified in bytes/sec -->
<ServerToClient>2500000</ServerToClient>
<!-- Specified in bytes/sec -->
<ClientToServer>2500000</ClientToServer>
</Bandwidth>
...
</Application>
【保存并退出】
五、重启服务
# service ams restart
六、验证所有配置和优化
所有配置与优化完成后,使用如下命令作验证:
# cd /opt/adobe/ams/tools
# ./amscheck --host 192.168.1.81 --port 80 --app vod/_definst_ --play mp4:20140612/xxxx.mp4 30 90 --logfile 128.txt;cat 128.txt
#Version 5,0,3,3029
#2014-06-11 16:03:25
#Software: Adobe Media Server Check 5,0,3,3029
#2014-06-11
#Fields: date time x-event x-sname
2014-06-11 16:03:25 Connect rtmp://192.168.1.81:80/vod/_definst_
2014-06-11 16:03:25 NetConnection.Connect.Success Connection succeeded.
2014-06-11 16:03:25 Success StreamCreated
2014-06-11 16:03:25 Success StreamCreated
2014-06-11 16:03:25 NetStream.Play.Reset Playing and resetting 20140612/xxxx.mp4
82138N4.mp4.
2014-06-11 16:03:25 NetStream.Play.Start Started playing 20140612/xxxx.mp4.
2014-06-11 16:03:25 NetStream.Data.Start -
2014-06-11 16:03:25 NetStream.Play.Stop Stopped playing 20140612/xxxx.mp4.
2014-06-11 16:03:25 Program complete successful -
表示一切都配置和优化成功;