您的位置:首页 > 运维架构 > Linux

ubuntu12.04-32位-安装Darwin Streaming Server6.0.3流媒体服务器

2014-07-29 20:22 429 查看
参考blog:

[1] http://wangheng.org/install-darwin-streaming-server-6-0-3-on-linux.html
[2] http://blog.csdn.net/heartlesstoanyone/article/details/14050991
1、获得软件

从http://dss.macosforge.org/官网下载Darwin Streaming Server,或其他方式获得。

本文使用的版本是DarwinStreamingSrvr6.0.3-Source.tar

2、安装

(1)参考blog[1],解压软件包后执行./Buildit,报错,如下提示:



出现很多类型错误,上图为截取的错误片段。

需要修改源码,按照参考blog[1],下载Darwin流媒体服务器的patch补丁包,地址:http://www.abrahamsson.com/dss-6.0.3.patch

或到此处下载:http://download.csdn.net/detail/zhangjs0322/7034217

(2)patch补丁

将补丁放到源码目录下,并执行patch -p1 < dss-6.0.3.patch



(3)再次执行./Buildit,生成libCommonUtilitiesLib.a库时,出现找不到dlopen、dlclose、dlsym错误,如下:



参考blog[2],修改DarwinStreamingSrvr6.0.3-Source目录下的Makefile.POSIX,在LIBS后添加-ldl。

(4)再次执行./Buildit

错误如下:

Building QTFileInfo for Linux.i686 with gcc

gcc -o QTFileInfo  QTFileInfo.o ../../RTPMetaInfoLib/RTPMetaInfoPacket.o -D_REENTRANT -D__USE_POSIX -D__linux__ -pipe -L../../CommonUtilitiesLib -L../../QTFileLib -lpthread -ldl -lstdc++ -lm -lcrypt -lCommonUtilitiesLib  -lQTFileExternalLib ../../CommonUtilitiesLib/libCommonUtilitiesLib.a 

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSFileSource.o): In function `memset':

/usr/include/i386-linux-gnu/bits/string3.h:82: warning: memset used with constant zero length parameter; this could be due to transposed parameters

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSMutex.o): In function `MutexAttrInit':

/home/zhangjianshun/soft/DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSMutex.cpp:78: undefined reference to `pthread_mutexattr_init'

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSMutex.o): In function `OSMutex':

/home/zhangjianshun/soft/DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSMutex.cpp:63: undefined reference to `pthread_once'

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSMutex.o): In function `OSMutex::RecursiveTryLock()':

/home/zhangjianshun/soft/DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSMutex.cpp:145: undefined reference to `pthread_mutex_trylock'

collect2: ld returned 1 exit status

make: *** [QTFileInfo] Error 1

Building QTFileTest for Linux.i686 with gcc

gcc -o QTFileTest  QTFileTest.o ../../SafeStdLib/InternalStdLib.o ../../RTPMetaInfoLib/RTPMetaInfoPacket.o -D_REENTRANT -D__USE_POSIX -D__linux__ -pipe -L../../CommonUtilitiesLib -L../../QTFileLib -lpthread -ldl -lstdc++ -lm -lcrypt -lCommonUtilitiesLib  -lQTFileExternalLib
../../CommonUtilitiesLib/libCommonUtilitiesLib.a ../../QTFileLib/libQTFileExternalLib.a 

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSFileSource.o): In function `memset':

/usr/include/i386-linux-gnu/bits/string3.h:82: warning: memset used with constant zero length parameter; this could be due to transposed parameters

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSMutex.o): In function `MutexAttrInit':

/home/zhangjianshun/soft/DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSMutex.cpp:78: undefined reference to `pthread_mutexattr_init'

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSMutex.o): In function `OSMutex':

/home/zhangjianshun/soft/DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSMutex.cpp:63: undefined reference to `pthread_once'

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSMutex.o): In function `OSMutex::RecursiveTryLock()':

/home/zhangjianshun/soft/DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSMutex.cpp:145: undefined reference to `pthread_mutex_trylock'

collect2: ld returned 1 exit status

make: *** [QTFileTest] Error 1

Building QTRTPFileTest for Linux.i686 with gcc

make: Nothing to be done for `all'.

Building QTRTPGen for Linux.i686 with gcc

make: Nothing to be done for `all'.

Building QTSDPGen for Linux.i686 with gcc

make: Nothing to be done for `all'.

Building QTSampleLister for Linux.i686 with gcc

gcc -o QTSampleLister  QTSampleLister.o ../../SafeStdLib/InternalStdLib.o ../../RTPMetaInfoLib/RTPMetaInfoPacket.o -D_REENTRANT -D__USE_POSIX -D__linux__ -pipe -L../../CommonUtilitiesLib -L../../QTFileLib -lpthread -ldl -lstdc++ -lm -lcrypt -lCommonUtilitiesLib
 -lQTFileExternalLib ../../CommonUtilitiesLib/libCommonUtilitiesLib.a ../../QTFileLib/libQTFileExternalLib.a 

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSFileSource.o): In function `memset':

/usr/include/i386-linux-gnu/bits/string3.h:82: warning: memset used with constant zero length parameter; this could be due to transposed parameters

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSMutex.o): In function `MutexAttrInit':

/home/zhangjianshun/soft/DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSMutex.cpp:78: undefined reference to `pthread_mutexattr_init'

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSMutex.o): In function `OSMutex':

/home/zhangjianshun/soft/DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSMutex.cpp:63: undefined reference to `pthread_once'

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSMutex.o): In function `OSMutex::RecursiveTryLock()':

/home/zhangjianshun/soft/DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSMutex.cpp:145: undefined reference to `pthread_mutex_trylock'

collect2: ld returned 1 exit status

make: *** [QTSampleLister] Error 1

Building QTTrackInfo for Linux.i686 with gcc

gcc -o QTTrackInfo  QTTrackInfo.o ../../SafeStdLib/InternalStdLib.o ../../RTPMetaInfoLib/RTPMetaInfoPacket.o -D_REENTRANT -D__USE_POSIX -D__linux__ -pipe -L../../CommonUtilitiesLib -L../../QTFileLib -lpthread -ldl -lstdc++ -lm -lcrypt -lCommonUtilitiesLib  -lQTFileExternalLib
../../CommonUtilitiesLib/libCommonUtilitiesLib.a ../../QTFileLib/libQTFileExternalLib.a 

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSFileSource.o): In function `memset':

/usr/include/i386-linux-gnu/bits/string3.h:82: warning: memset used with constant zero length parameter; this could be due to transposed parameters

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSMutex.o): In function `MutexAttrInit':

/home/zhangjianshun/soft/DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSMutex.cpp:78: undefined reference to `pthread_mutexattr_init'

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSMutex.o): In function `OSMutex':

/home/zhangjianshun/soft/DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSMutex.cpp:63: undefined reference to `pthread_once'

../../CommonUtilitiesLib/libCommonUtilitiesLib.a(OSMutex.o): In function `OSMutex::RecursiveTryLock()':

/home/zhangjianshun/soft/DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSMutex.cpp:145: undefined ref
c187
erence to `pthread_mutex_trylock'

collect2: ld returned 1 exit status

make: *** [QTTrackInfo] Error 1

Building StreamingLoadTool for Linux.i686 with gcc

make: Nothing to be done for `all'.

从错误提示信息中得知,以上4个模块QTFileInfo、QTFileTest 、QTSampleLister 、QTTrackInfo中出现pthread_mutexattr_init、pthread_once、pthread_mutex_trylock函数未定义的错误。是因为缺少了-lpthread参数导致的。

分别进入以上四个模块目录中,修改其Makefile.POSIX,在LIBS后添加-lpthread参数。



(5)再次./Buildit

编译完成。

(6)生成DSS安装包

执行./buildtarball,成功后,生成DarwinStreamingSrvr-Linux.tar.gz文件。

(7)解压生成的DSS安装包

解压DarwinStreamingSrvr-Linux.tar.gz文件,并进入。

修改Install文件,修改-M为-m。



(8)安装

执行./Install,qtss提示信息如下:

Installing Darwin Streaming Server

Checking for and Killing currently running Darwin Streaming Server

kill: No such process

Removing previous versions of Darwin Streaming Server

Backing up previous config files

backing up /etc/streaming/qtusers to /etc/streaming/qtusers.backup

backing up /etc/streaming/qtgroups to /etc/streaming/qtgroups.backup

Inserting path to perl into scripts..

Creating unprivileged user to run the server = "qtss".

copying DarwinStreamingServer to /usr/local/sbin/DarwinStreamingServer

copying PlaylistBroadcaster to /usr/local/bin/PlaylistBroadcaster

copying MP3Broadcaster to /usr/local/bin/MP3Broadcaster

copying qtpasswd to /usr/local/bin/qtpasswd

copying createuserstreamingdir to /usr/local/bin/createuserstreamingdir

Generating a new prefs file at /etc/streaming/streamingserver.xml

INFO: Module Loaded...QTSSHomeDirectoryModule [dynamic]

INFO: Module Loaded...QTSSRefMovieModule [dynamic]

INFO: Module Loaded...QTSSFileModule [static]

INFO: Module Loaded...QTSSReflectorModule [static]

INFO: Module Loaded...QTSSRelayModule [static]

INFO: Module Loaded...QTSSAccessLogModule [static]

INFO: Module Loaded...QTSSFlowControlModule [static]

INFO: Module Loaded...QTSSPosixFileSysModule [static]

INFO: Module Loaded...QTSSAdminModule [static]

INFO: Module Loaded...QTSSMP3StreamingModule [static]

INFO: Module Loaded...QTSSAccessModule [static]
WARNING: No users file found at /etc/streaming/qtusers.

WARNING: No groups file found at /etc/streaming/qtgroups.

chown: invalid user: `qtss'

copying relayconfig.xml-Sample to /etc/streaming/relayconfig.xml-Sample

copying qtusers to /etc/streaming/qtusers

chown: invalid user: `qtss'

copying qtgroups to /etc/streaming/qtgroups

chown: invalid user: `qtss'

copying readme.txt to /var/streaming/readme.txt

copying 3rdPartyAcknowledgements.rtf to /var/streaming/3rdPartyAcknowledgements.rtf

copying sample_100kbit.mov into /usr/local/movies/sample_100kbit.mov

copying sample_300kbit.mov into /usr/local/movies/sample_300kbit.mov

copying sample_100kbit.mp4 into /usr/local/movies/sample_100kbit.mp4

copying sample_300kbit.mp4 into /usr/local/movies/sample_300kbit.mp4

copying sample.mp3 into /usr/local/movies/sample.mp3

copying sample_50kbit.3gp into /usr/local/movies/sample_50kbit.3gp

copying sample_h264_100kbit.mp4 into /usr/local/movies/sample_h264_100kbit.mp4

copying sample_h264_300kbit.mp4 into /usr/local/movies/sample_h264_300kbit.mp4

copying sample_h264_1mbit.mp4 into /usr/local/movies/sample_h264_1mbit.mp4

copying StreamingLoadTool to /usr/local/bin/StreamingLoadTool

copying streamingloadtool.conf to /etc/streaming/streamingloadtool.conf

copying streamingadminserver.pl into /usr/local/sbin/streamingadminserver.pl

copying Admin HTML to /var/streaming/AdminHtml directory
chown: invalid user: `qtss'

chown: invalid user: `qtss'

chown: invalid user: `qtss'

Launching streamingadminserver.pl

Cannot switch to user qtss

Installation Complete

Darwin Streaming Server Setup

In order to administer the Darwin Streaming Server you must create an administrator user [Note: The administrator user name cannot contain spaces, or single or double quote characters, and cannot be more than 255 characters long].

Please enter a new administrator user name: hopen

You must also enter a password for the administrator user [Note: The administrator password cannot contain spaces, or quotes, either single or double, and cannot be more than 80 characters long].

Please enter a new administrator Password: 

Re-enter the new administrator password: 

Adding userName hopen
chown: invalid user: `qtss'

Setup Complete!

出现以上信息的原因是qtss用户和组没有创建。

(9)qtss用户和组

通过cat /etc/passwd | grep qtss查看是否存在qtss用户

通过cat /etc/group | grep qtss查看是否存在qtss组

不存在则分别创建。

本文的qtss组存在,用户不存在,则只需添加qtss新用户到qtss组,如下:



添加qtss完成后,再次执行./Install,提示输入管理员名和密码。

(10)验证是否安装成功

执行ps aux | grep Darwin命令查看启动的进程。



已启动两个服务进程,安装成功。

也可手动启动DarwinStreamingServer。

3、web管理

浏览器中输入:http://Darwin流媒体服务器所在IP:1220

利用安装时提示输入的管理员用户和密码,登陆server



首次登陆,会提示进行一些配置,例如视频所在目录等等。

登陆后主界面如下:



转载自:http://blog.csdn.net/zhangjs0322/article/details/21023101
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息