[转载]Darwin Streaming Serve流媒体服务器安装笔记

一 安装软件 

      首先上http://dss.macosforge.org/post/previous-releases/下载压缩文件,当前最新版本为6.0.3,但我选择了5.5.5版本,因为这个版本提供了针对linux的安装脚本。下载了DarwinStreamingSrvr5.5.5-Linux.tar.gz文件后,解压缩。 

解压命令为: 

~/tmp/$ tar -zxvf  DarwinStreamingSrvr5.5.5-Linux.tar.gz 

然后运行如下命令安装: 

~/tmp/DarwinStreamingSrvrlinux-Linux$ chmod +x Install  //如果已经有执行权限了这步自然就不用了 
~/tmp/DarwinStreamingSrvrlinux-Linux$ sudo ./Install 

输出为: 

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 DarwinStreaming Server you must create anadministrator user [Note: Theadministrator user name cannot containspaces, or single or double quotecharacters, and cannot be more than255 characters long]. 
Please enter a new administrator user name: keensword007 


Youmust also enter a password forthe administrator user [Note: Theadministrator password cannot containspaces, or quotes, either singleor double, and cannot be more than 80characters 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脚本。 



输出中发现仍有问题,部分输出为: 

emoving old version of html from /var/streaming/AdminHtml 
copying Admin HTML to /var/streaming/AdminHtml directory 




Launching streamingadminserver.pl 
Cannot switch to group 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]. 




服务无法启动Cannot switch to group qtss。查阅网络和书籍,执行如下命令: 

root@root:~# grep -n qtss /etc/shadow /etc/passwd /etc/group /etc/gshadow 

/etc/shadow:28:qtss:!:14753:0:99999:7::: 
/etc/passwd:28:qtss:x:1001:100::/home/qtss:/bin/sh 




root@root:~# groups qtss 
qtss : users 





发现问题为qtss用户组根本就没有建立,建立的qtss用户被默认设置users为初始用户组。于是进行如下修改: 

root@root:~# groupadd -g 1001 qtss   //建个立用户组qtss,指定GID为1001 

root@root:~# usermod  -g 1001 qtss   //修改qtss用户的初始用户组为1001(即qtss用户组) 




启动服务: 

root@root:/etc# cd /usr/local/sbin/ 

root@root:/usr/local/sbin# ls 

DarwinStreamingServer  streamingadminserver.pl  StreamingServerModules 

root@root:/usr/local/sbin# ./streamingadminserver.pl 




使用如下命令确定服务是否已经启动: 

root@root:~# ps aux|grep Darwin 

root      7509  0.0  0.0   4036   512 ?        Ss   22:07   0:00 /usr/local/sbin/DarwinStreamingServer 

qtss      7510  0.0  0.1  29488  3064 ?        Sl   22:07   0:00 /usr/local/sbin/DarwinStreamingServer 

1000      7772  0.0  0.0   2896   816 pts/1    S+   23:01   0:00 grep Darwin 







如果希望机器启动后自动运行流媒体服务器,输入如下命令: 

~/tmp/DarwinStreamingSrvrlinux-Linux$ cd /etc/rc3.d 

/etc/rc3.d$ sudo ln -s /usr/local/sbin/streamingadminserver.pl s20streamingserver 

。如果要手动启动服务,运行streamingadminserver.pl程序。 



二、配置 

Darwin Streaming Server采用了web管理模式,可以在本机的浏览器中输入:http://服务器IP:1220 。然后输入在安装流媒体服务器时设置的用户名称和密码。 

第一次登录时,接着会出现设置向导。首先是一个如图所示的MP3 广播密码设置对话框,在其“New Password”和“Re-enter New Password”输入自己想设置的密码。然后点击“Next”按钮继续。 

为了保证数据传输的安全需要您可以在这里钩选“Secure Administration(SSL)”(安全管理),前提是您已经有了可用的SSL 证书。一般可以不选,如图 所示。直接点击“Next”按钮继续。 

接下来要设置的是媒体文件的存放主目录, 其默认的目录为“如图所示。这个目录要记住,在服务器中以后添加媒体文件时就要加在这个目录中。设置完毕点击“Next”按钮继续。 

最后设置默认传输端口,如果设置了“Streaming onPort80”则此服务器的访问可以突破防火墙,但如果您在此服务器上同时建有Apache等占用80端口的服务。则建议您不要设置此端口。这里如果您没有什么特殊要求的话,使用缺省配置即可,如图9 所示。直接点击“Finish”按钮。 

自此流媒体服务器的设置就告一段落,如果您要作进一步的设置,可以通过此管理页面,在其左侧点击相应的选项,进行设置。也可以通过此对前面所做的设置进行更改。 

三、在线播放 

流媒体服务器部署完毕后,我们就可以使用自己喜欢的播放器在线播放了。例如,在本机上打开Movie Player, 在地址栏输入: 

rtsp://服务器IP/sample_100kbit.mp4 

就可以看到一段QuickTime演示视频。 







相关文章: 

http://cha.homeip.net/blog/archives/2007/06/darwin_streamin.html 

http://hi.baidu.com/realvvzx/blog/item/b81c784f2329e035aec3ab31.html 

http://tech.lmtw.com/quicktime/200506/10298.html 

http://www.linuxjournal.com/article/6720?page=0,1 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值