首页 > 代码库 > Centos 6.3 install Darwin Streaming Server 6.0.3
Centos 6.3 install Darwin Streaming Server 6.0.3
网上说的天花乱坠,都是抄来抄去,没有一个是经过自己试验,然后才写的
周氏一族,整理技术文档,给下一代留点教程......
1、服务器系统准备
2、安装文件准备
2.1 源码文件,请上官网,下载,或者用我下面的地址也可以。
http://dss.macosforge.org/downloads/DarwinStreamingSrvr6.0.3-Source.tar
2.2 下载附件 dss_patch 【里面有两个文件 dss-6.0.3.patch 和 dss-hh-20080728-1.patch】
3、上传所有文件,开始安装 【为了方便起见,我把所有文件,上传到/usr/tmp目录】
[root@New_server ~]# cd /usr/tmp/
[root@New_server tmp]# ls
DarwinStreamingSrvr6.0.3-Source.tar dss-6.0.3.patch dss-hh-20080728-1.patch
[root@New_server tmp]#
4、解压 源文件包
[root@New_server tmp]# tar xvf DarwinStreamingSrvr6.0.3-Source.tar
5、把解压出来的文件,挪成后缀名为 orig 的【为什么要这么做?请看后面】
[root@New_server tmp]# mv DarwinStreamingSrvr6.0.3-Source DarwinStreamingSrvr6.0.3-Source.orig
6、加载patch路径 [请保持第五步骤的疑问]
[root@New_server tmp]# patch -p0 < dss-6.0.3.patch
我们不妨,查看一下这个dss-6.0.3.patch是什么东西来的
哇,你现在知道,为什么要做第五步的操作了吧,因为,patch里面文件,就是要去找 orig这个文件,所以得挪一下,不然是不行的,那不妨,我们继续看下 dss-hh-20080728-1.patch 这个文件
不难发现,dss-hh-20080728-1.patch 这个文件,它又不用orig的,而是直接普通的目录进,所以,我们还得再做一次操作,就是把orig后缀的目录挪回来,让他变成正常
7、把orig后缀的目录挪回来,让他变成正常
[root@New_server tmp]# mv DarwinStreamingSrvr6.0.3-Source.orig DarwinStreamingSrvr6.0.3-Source
[root@New_server tmp]# patch -p0 < dss-hh-20080728-1.patch
8、创建 Darwin 用户qtss
[root@New_server tmp]# groupadd qtss
[root@New_server tmp]# useradd qtss -g qtss
9、进入Darwin目录,编译Buildit
[root@New_server tmp]# cd DarwinStreamingSrvr6.0.3-Source
[root@New_server DarwinStreamingSrvr6.0.3-Source]# ./Buildit
如果这一步有error,就得根据error来解决,一般不会有问题,除非是你环境太糟糕,很多开发工具没装上
10、执行 ./buildtarball 生成linux下的dss安装包
[root@New_server DarwinStreamingSrvr6.0.3-Source]# ./buildtarball
很多人,都是漏了这一步,然后装不成功,就在那里吹水说6.0.3不稳定等等情况,建议装5.x的
这一步,执行之后,你ls一下,会发现多了很多东西,比较明显的是 DarwinStreamingSrvr-Linux.tar.gz
11、解压 DarwinStreamingSrvr-Linux.tar.gz
[root@New_server DarwinStreamingSrvr6.0.3-Source]# tar xzvf DarwinStreamingSrvr-Linux.tar.gz
这里得解释下,不然很多人搞不懂,我们下载的文件"DarwinStreamingSrvr6.0.3-Source.tar",它是一个源文件,但是它又没跟你说是linux下面的,它包含很多种系统,所以我们要 ./buildtarball 编译一下,生成 我们要的 压缩包,然后再解压我们要的压缩包,再进去安装才行
12、进入该目录
13、编辑Install,查找 Linux,然后你会发现,在下面,这里 -M qtss,改成 -m
# Add the unprivileged user qtss as the server‘s run user
echo "Creating unprivileged user to run the server = \"qtss\"."
if [ $INSTALL_OS = "Linux" ]; then
/usr/sbin/groupadd qtss > /dev/null 2>&1
/usr/sbin/useradd -M qtss > /dev/null 2>&1
else
/usr/sbin/groupadd qtss > /dev/null 2>&1
/usr/sbin/useradd qtss > /dev/null 2>&1
fi
因为 -M 是执行不了,得改成 -m 才能执行
14、改完之后,就./Install 了,没什么好讲的,但是,它会提示你输入用户名和密码,就是网页的验证,你随便设就行了,具体我贴出来代码如下:
[root@New_server DarwinStreamingSrvr-Linux]# ./Install
Installing Darwin Streaming Server
Checking for and Killing currently running Darwin Streaming Server
kill 3461: No such process
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.
copying relayconfig.xml-Sample to /etc/streaming/relayconfig.xml-Sample
copying qtusers to /etc/streaming/qtusers
copying qtgroups to /etc/streaming/qtgroups
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
Launching streamingadminserver.pl
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: zhou
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 zhou
Setup Complete!
[root@New_server DarwinStreamingSrvr-Linux]#
15、到此结束,安装完成,那么,检测一下是不是OK
[root@New_server ~]# ps aux |grep Da
root 3516 0.0 0.0 22028 604 ? Ss 14:32 0:00 /usr/local/sbin/DarwinStreamingServer
qtss 3517 0.6 0.2 412140 4848 ? Sl 14:32 0:01 /usr/local/sbin/DarwinStreamingServer
root 27706 0.0 0.0 103236 884 pts/0 S+ 14:36 0:00 grep Da
[root@New_server ~]# netstat -nl |grep 1220
tcp 0 0 0.0.0.0:1220 0.0.0.0:* LISTEN
[root@New_server ~]#
很明显,一切正常,1220端口起来,这个端口是用来网页登陆的 ,Darwin进程也起来
16、好了,都搞定了,那我们现在就开始来应用他,这个是流媒体服务器,肯定就是播放电影的啦,毫无疑问
输入你刚才设置的账户密码
它叫你设置广播密码,这样能保证你流媒体安全,测试我就不设置密码了
设置连接安全,一般是用ssl,但是很少用的,不设置
流媒体电影,存放的地址,像360,腾讯,他们都是直接把这个目录,mount到集群存储,然后来观看的
它叫你吧端口改成80,你看着办咯,看你个人喜欢
17、好了,现在可以来测试一下
我用这个VLC media player 来播放一下视频,至于视频,肯定就是自己上传,或者demo自带的咯
媒体(M)-->打开网络串流(N),切换到 "网络" 选项卡
输入链接 rtsp://192.168.0.202/sample_50kbit.3gp
一切正常
题外话:
其实,这个流媒体,可以用来当做安卓手机 "视频通话",所以我才会下功夫来研究他,希望有人研究出来的,也贡献一下,哈哈!
本文出自 “周氏一族” 博客,谢绝转载!