<b>Ubuntu下架设流媒体服务器的基本流程</b>[Linux安全]
本文“<b>Ubuntu下架设流媒体服务器的基本流程</b>[Linux安全]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
目前主流的流媒体服务器有微软的windows media server、RealNetworks的Helixserver和苹果公司的Darwin Streaming Server. 微软的windows media server只能在windows2000 server和windows 2003 server下利用,不在考虑之列.RealNetworks的Helixserver是一款跨平台的软件,功效也很强盛,但并非免费软件,只能cut掉了.苹果公司的Darwin StreamingServer是一款跨平台的开源流媒体服务器软件,由苹果公司出品,其品质不用猜疑了,并且还免费.所以在架设流媒体服务器时就挑选了DarwinStreaming Server.
Darwin Streaming Server利用尺度的及时传输协议/及时流媒体协议(RTP/RTSP),通过互联网及时传送媒体.Darwin Streaming Server 也能供应对传送 H.264、MPEG-4 和3GPP 文件的固有支持——因此,你可以在 Mac 和 Linux、Windows上的任何与尺度兼容的媒体播放器上履行你的内容,当然还包含手机和接纳盒等各种兼容尺度的设备.不但如此,它还答应你利用 Icecast兼容协议,通过 HTTP 传送尺度的 MP3 文件到 MP3 客户端.
1、软件安装
首先上http://dss.macosforge.org/下载源代码,当前最新版本为6.0.3,但我挑选了5.5.5版本,因为这个版本供应了针对linux的安装脚本.下载DarwinStreamingSrvr5.5.5-Linux.tar.gz文件后,解紧缩,然后运行以下号令安装:
- ~/tmp/DarwinStreamingSrvrlinux-Linux___FCKpd___0nbsp;chmod +x Install
- ~/tmp/DarwinStreamingSrvrlinux-Linux___FCKpd___0nbsp;sudo ./Install
- [sudo] password for keensword007:
- Installing Darwin Streaming Server
- Checking for and Killing currently running Darwin Streaming Server
- Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
- Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
- Removing previous versions of Darwin Streaming Server
- Backing up previous config files
- 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
- creating /usr/local/sbin/StreamingServerModules directory
- copying createuserstreamingdir to /usr/local/bin/createuserstreamingdir
- creating /etc/streaming directory
- Generating a new prefs file at /etc/streaming/streamingserver.xml
- INFO: Module Loaded...QTSSRefMovieModule [dynamic]
- INFO: Module Loaded...QTSSHomeDirectoryModule [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
- creating /usr/local/movies directory
- creating /var/streaming/playlists directory
- 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 group qtss
- Installation Complete
- Darwin Streaming Server Setup
- Inorder to administer the Darwin Streaming Server you must
create anadministrator user [Note: The administrator user name
cannot containspaces, or single or double quote characters, and
cannot be more than255 characters long].- Please enter a new administrator user name: keensword007
- Youmust also enter a password for the administrator user [Note:
Theadministrator password cannot contain spaces, or quotes,
either singleor double, and cannot be more than 80 characters long].- Please enter a new administrator Password:
- Re-enter the new administrator password:
- Adding userName keensword007
- chown: invalid user: `qtss'
- Setup Complete!
从提醒信息上看,应当是qtss用户未能成立造成的,查看了一下Install脚本,发现成立用户的脚本是这样的:
- if [ $INSTALL_OS = "Linux" ]; then
- /usr/sbin/useradd -M qtss > /dev/null 2>&1
- else
- /usr/sbin/useradd qtss > /dev/null 2>&1
- fi
但是useradd并没有-M的号令行参数,应当为-m,将-M改正成-m后,再履行Install脚本,安装成功.此时服务已经启动,可以利用以下号令肯定服务能否已经启动:
- ~/tmp/DarwinStreamingSrvrlinux-Linux___FCKpd___2nbsp;ps aux | grep Darwin
- root 10963 0.0 0.0 4368 456 ? Ss 21:23 0:00 /usr/local/sbin/DarwinStreamingServer
- qtss 10964 0.0 0.0 38032 2456 ? Sl 21:23 0:00 /usr/local/sbin/DarwinStreamingServer
- 1000 11003 0.0 0.0 3004 760 pts/1 R+ 21:24 0:00 grep Darwin
假如但愿机械启动后自动运行流媒体服务器,输入以下号令:
- ~/tmp/DarwinStreamingSrvrlinux-Linux___FCKpd___3nbsp;cd /etc/rc3.d
- /etc/rc3.d___FCKpd___3nbsp;sudo ln -s /usr/local/sbin/streamingadminserver.pl s20streamingserver
假如要手动启动服务,运行streamingadminserver.pl程序.
2、配置
Darwin Streaming Server采取了web管理情势,可以在本机的浏览器中输入:http://127.0.0.1:1220 .然后输入在安装流媒体服务器时设置的用户名称和密码.
第一次登录时,接着会呈现设置向导.首先是一个MP3 广播密码设置对话框,在其“New Password”和“Re-enter New Password”输入自己想设置的密码.然后点击“Next”按钮持续.
为了保证数据传输的安全需求您可以在这里钩选“Secure Administration(SSL)”(安全管理),前提是您已经有了可用的SSL 证书.普通可以不选.直接点击“Next”按钮持续.
接下来要设置的是媒体文件的存放主目录.这个目录要记着,在服务器中今后增添媒体文件时就要加在这个目录中.设置完毕点击“Next”按钮持续.
最后设置默许传输端口,假如设置了“Streaming on Port80”则此服务器的拜候可以冲破防火墙,但假如您在此服务器上同时建有Apache 等占用80端口的服务.则倡议您不要设置此端口.这里假如您没有什么特别要求的话,利用缺省配置便可.直接点击“Finish”按钮.
自此流媒体服务器的设置就告一段落,假如您要作进一步的设置,可以通过此管理页面,在其左侧点击呼应的选项,举行设置.也可以通过此对前面所做的设置举行更改.
3、在线播放
流媒体服务器布置完毕后,我们便可以利用自己喜好的播放器在线播放了.比方,在本机上翻开Movie Player, 在地址栏输入:
- rtsp://127.0.0.1/sample_100kbit.mp4
便可以看到一段QuickTime演示视频.
以上是“<b>Ubuntu下架设流媒体服务器的基本流程</b>[Linux安全]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |