歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux綜合 >> Linux安裝

在RHEL6.4下安裝Wowza Media Server

1 軟硬件環境 1.1 硬件環境

CPU

 

Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz

 

內存

 

8GB

 

硬盤

 

80GB

 

網卡

 

Atheros Communitions PCI-E Gigabit Etherent Controller (NDIS 6.20)

 
1.2 軟件環境

操作系統

 

RHEL6.4_x86_64

 

Media Server

 

WowzaMediaServer-3.6.2(試用版)

 

Media Client

 

Firefox;

ffplay;

VLC Player

 
2 安裝配置 2.1 安裝前准備 2.1.1 選擇部署方式

Wowza Server可以單獨部署在一台服務器上,也可以作為集群環境部署到多台服務器上。本次僅簡單部署到一台機器上。

推薦閱讀:

2.1.2 下載Wowza Server軟件包

下載地址:。

下載的文件為:WowzaMediaServer-3.6.2.rpm.bin

2.1.3 准備Wowza Server License key

對於Wowza Server試用版,在Wowza官方網站上申請一個30天試用版本的License Key即可。地址:。

2.1.4 安裝Java

Wowza Media Server 3.5 是一個基於Java 6 (也就是 1.6) 和Java 7 (也就是 1.7)的應用程序,需要先安裝Java Runtime Environment (JRE) 6 或以上版本。如果要開發服務端應用, 那就需要先安裝Java Development Kit (JDK) 6或以上版本。服務器也實現了Java Management Extensions (JMX) 接口,用於對服務器進行管理和監控。JConsole是一個很流行的JMX控制台,它被包含在JDK中。

因此,這意味著什麼呢?如果你想要開發服務端應用或監控一個本地或遠程的Wowza Media Server,你必須先安裝JDK version 6 (也就是 1.6)或更高版本。如果你僅僅是部署Wowza Media Server用於使用,那麼你只需要安裝JRE version 6 (也就是1.6) 或更高版本。 我們推薦你為自己的平台安裝最新的Java JDK 或JRE版本。如果你使用的是64位操作系統,請確認也選擇64位的Java安裝包。

你可以從Oracle的官網下載Java?。

如果你需要驗證是否已經正確地安裝並運行了Java 6 (也就是 1.6) 或Java 7 (也就是 1.7),你可以打開命令行提示窗口,並輸入以下命令:

java -version

如果Java已經被正確的安裝和配置,系統會返回一個等於或大於1.6的版本號。

2.2 安裝步驟

直接執行解壓出來的文件就可以進行安裝了:./WowzaMediaServer-3.6.2.rpm.bin(如果提示沒有權限執行的話,為其加上可執行權限:chmod +x WowzaMediaServer-3.6.2.rpm.bin)。

[root@yuanhuan install_softwares]# ./WowzaMediaServer-3.6.2.rpm.bin

WOWZA MEDIA SOFTWARE

END USER LICENSE AGREEMENT ("EULA") VERSION 3.6

NOTICE: BY DOWNLOADING, INSTALLING, COPYING OR

OTHERWISE USING THE SOFTWARE, YOU AGREE TO BE BOUND BY

THE TERMS OF THIS EULA. IF YOU DO NOT AGREE TO THE

TERMS OF THIS EULA, YOU MAY NOT DOWNLOAD, INSTALL, COPY

OR USE THE SOFTWARE. "YOU" MEANS (1) THE NATURAL PERSON

OR THE ENTITY THAT IS AGREEING TO BE BOUND BY THIS

EULA; (2) YOUR EMPLOYEES AND THIRD PARTY CONTRACTORS

THAT PROVIDE SERVICES TO YOU; AND (3) ANY OF YOUR

CUSTOMERS USING THE SOFTWARE OR ANY SERVICE BASED UPON

THE SOFTWARE, AS PERMITTED IN THIS AGREEMENT. YOU SHALL

BE LIABLE FOR ANY FAILURE BY SUCH EMPLOYEES, THIRD

PARTY CONTRACTORS OR CUSTOMERS TO COMPLY WITH THE TERMS

OF THIS EULA. THIS EULA IS ENFORCEABLE AGAINST ANY

PERSON OR ENTITY THAT DOWNLOADS, INSTALLS, COPYS OR

USES THE SOFTWARE AND ANY PERSON OR ENTITY THAT

DOWNLOADS, INSTALLS, COPYS OR USES THE SOFTWARE ON

ANOTHER PERSON?S OR ENTITY?S BEHALF. YOU AGREE THAT

THIS EULA IS LIKE ANY WRITTEN NEGOTIATED AGREEMENT

SIGNED BY YOU.

1. DEFINITIONS

1.1 "AddOn" means any one (1) of the additional

software features offered by Wowza as more fully

described in the applicable documentation for such

features.

1.2 "Channel" means one (1) unique media stream for

input into one (1) unique Instance of the Software.

1.3 "Concurrent Connections" means the total number of

simultaneous connections to the Software.

Do you agree to the above license terms? [yes or no]

yes

Preparing... ########################################### [100%]

1:WowzaMediaServer ########################################### [100%]

Install Location:

/usr/local/WowzaMediaServer

To enter license key:

cd /usr/local/WowzaMediaServer/bin

./startup.sh

 

此安裝是采用rpm方式安裝的,所有配置都是采用默認的。

按照提示執行startup.sh腳本:

cd /usr/local/WowzaMediaServer/bin

./startup.sh

 

首次執行,會提示輸出License key:

[root@yuanhuan install_softwares]# cd /usr/local/WowzaMediaServer/bin/

[root@yuanhuan bin]# ./startup.sh

Configure logging: file:///usr/local/WowzaMediaServer/conf/log4j.properties

Please enter your License Key in this format:

XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX[-XXXXXXXXXXXX]

SVRT3-xmE4t-rTB9a-f93VB-ZGvek-dDwE9-7QVEVQxhdFFa

INFO server server-start Wowza Media Server 3 Trial Edition (Expires: 八月 17,

2013) 3.6.2 build5334 -

INFO server comment - Server License Key: SVRT3-XXXXX-XXXXX-XXXXX-XXXXX-dDwE9

INFO server comment - Maximum Connections: Unlimited

INFO server comment - Transcoder Streams Available: Unlimited

INFO server comment - Transcoder Watermark: Yes

INFO server comment - nDVR Available: Yes

INFO server comment - DRM Available: Yes

INFO server comment - Hardware Available Processors: 4

INFO server comment - Hardware Physical Memory: 6537MB/7966MB

INFO server comment - Max File Descriptor Count: 20000

INFO server comment - Open File Descriptor Count: 52

INFO server comment - OS Name: Linux

INFO server comment - OS Version: 2.6.32-358.el6.x86_64

INFO server comment - OS Architecture: amd64

INFO server comment - Java Name: OpenJDK 64-Bit Server VM

INFO server comment - Java Vendor: Oracle Corporation

INFO server comment - Java Version: 1.7.0_09-icedtea

INFO server comment - Java VM Version: 23.2-b09

INFO server comment - Java Spec Version: 1.7

INFO server comment - Java Home:

/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre

INFO server comment - Java Max Heap Size: 1066MB

INFO server comment - Java Architecture: 64

INFO server comment - Java Locale[user.language]: zh

INFO server comment - Java Locale[user.country]: CN

INFO server comment - Java Locale[file.encoding]: UTF-8

INFO server comment - Java Timezone[user.timezone]: Asia/Shanghai

INFO server comment - Java Args[0]: -Xmx1200M

INFO server comment - Java Args[1]: -Djava.net.preferIPv4Stack=true

INFO server comment - Java Args[2]: -Dcom.sun.management.jmxremote=true

INFO server comment - Java Args[3]: -Dcom.wowza.wms.runmode=standalone

INFO server comment - Java Args[4]: -Dcom.wowza.wms.native.base=linux

INFO server comment - Java Args[5]:

-Dcom.wowza.wms.AppHome=/usr/local/WowzaMediaServer

INFO server comment - Java Args[6]: -Dcom.wowza.wms.ConfigURL=

INFO server comment - Java Args[7]:

-Dcom.wowza.wms.ConfigHome=/usr/local/WowzaMediaServer

INFO server comment - Server runmode: standalone

INFO server comment - Server native.platform: linux

INFO server comment - Server threads[h/t]: 10/10

INFO server comment - CMDInterface now listening: [any]:8083

INFO vhost vhost-start _defaultVHost_ -

INFO server comment - _defaultVHost_ threads[h/t]:120/80

home:/usr/local/WowzaMediaServer

INFO vhost comment _defaultVHost_ Bind attempt ([any]:1935:4)

INFO vhost comment _defaultVHost_ Bind successful ([any]:1935)

INFO vhost comment _defaultVHost_ Bind attempt ([any]:8086:1)

INFO vhost comment _defaultVHost_ Bind successful ([any]:8086)

INFO server comment - Server.startShutdownHook: Start server shutdown hook

INFO server comment - Wowza Media Server is started!

 
2.3 檢查安裝結果 2.3.1 檢查端口號

以root用戶登錄Linux系統,執行如下命令:netstat -anp |grep "LISTEN "檢查端口號。

[root@yuanhuan WowzaMediaServer]# netstat -anp |grep "LISTEN "

tcp 0 0 0.0.0.0:1935 0.0.0.0:* LISTEN 6024/java

tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1660/rpcbind

tcp 0 0 0.0.0.0:8083 0.0.0.0:* LISTEN 6024/java

tcp 0 0 0.0.0.0:8086 0.0.0.0:* LISTEN 6024/java

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1932/sshd

tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1781/cupsd

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2015/master

tcp 0 0 0.0.0.0:46878 0.0.0.0:* LISTEN 6024/java

tcp 0 0 0.0.0.0:57415 0.0.0.0:* LISTEN 1678/rpc.statd

tcp 0 0 :::111 :::* LISTEN 1660/rpcbind

tcp 0 0 :::22 :::* LISTEN 1932/sshd

tcp 0 0 ::1:631 :::* LISTEN 1781/cupsd

tcp 0 0 ::1:25 :::* LISTEN 2015/master

tcp 0 0 :::58145 :::* LISTEN 1678/rpc.statd

 

紅色部分表示Wowza Server所監聽的端口號都啟起來了。

2.3.2 檢查進程

執行如下命令檢查Wowza Server啟動的進程:ps -ef |grep java。

[root@yuanhuan WowzaMediaServer]# ps -ef |grep java

root 6024 6022 1 13:11 pts/4 00:00:17 java -server -Xmx1200M -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote=true -Dcom.wowza.wms.runmode=service -Dcom.wowza.wms.native.base=linux -Dcom.wowza.wms.AppHome=/usr/local/WowzaMediaServer -Dcom.wowza.wms.ConfigURL= -Dcom.wowza.wms.ConfigHome=/usr/local/WowzaMediaServer -cp /usr/local/WowzaMediaServer/bin/wms-bootstrap.jar com.wowza.wms.bootstrap.Bootstrap start

 
2.3.3 檢查Wowza Server是否開機自啟動

執行chkconfig --list |grep -i rmserver進行檢查:

[root@yuanhuan AMS_5_0_1_r1076]# chkconfig --list |grep -i WowzaMediaServer

 

可以發現,此命令是沒有輸出的,說明Wowza Server沒有注冊成為Linux服務。此時可以執行下面的命令注冊為Linux 服務:

chkconfig --add WowzaMediaServer

chkconfig --level WowzaMediaServer on

 
2.3.4 播放Wowza Server自帶的視頻來檢查是否運行正常

Wowza Server自帶了一個樣例,地址為rtmp://10.120.112.35:1935/vod/mp4:sample.mp4,可以將其在播放器裡面進行播放以進行測試。

Copyright © Linux教程網 All Rights Reserved