FreeBSD6.1流媒体的安装及使用

时间:2007-01-03 21:27:35   来源:  作者:whsong  点击:次  出处:技术无忧
关键字:Free

本文讲述如何在FreeBSD unix上安装使用Helix DNA Server,实现远程点播。
首先申明:本文是根据网上的一些文章和我的使用经验写的,如有错误请原谅;
服务器环境:FreeBSD 6.1,内网IP:192.168.0.2,外网IP:60.17.219.66。
客户机环境:windowsXP+real播放器,能上网。

一、服务器上的安装设置helix-server

1、下载helix-server (也可在下面的附件中下载)
首先去realnetwork的社区注册一个免费账号,然后下载开源的helix-server,目前helix-server的版本中没有支持FreeBSD 6.x on x86。
https://helix-server.helixcommunity.org/2005/devdocs/builds
所以选择Helix DNA Server Version 10 (SERVER_10_1_STABLE branch) 下的

servinstplus -- Helix DNA Plus Server 10 Installers based on RPSL/RCSL source code with extra ("Plus") binary add-ons provided by RealNetworks.(Version: 10.1.1.67; Tag: servdistall-112603-746; Build Date: 2003-Nov-26). FreeBSD 5.x on x86

由于这是FreeBSD 5.x on x86 的版本,所以运行在6.x上不是很稳定,本文只是用来说明helix-server的安装过程及使用 ,读者有兴趣可以自行在5.x的FreeBSD上安装测试。

2、安装helix-server
localhost# chmod 744 servinst_plus_freebsd-5.0-i586
localhost# ./servinst_plus_freebsd-5.0-i586
Extracting files for Helix installation........................

Welcome to the Helix DNA Server 10.1 (10.1.1.67) Setup for UNIX
Setup will help you get Helix DNA Server running on your computer.
Press [Enter] to continue...
敲回车键,

Enter the complete path to the directory where you want Helix DNA Server to be installed. You must specify the full pathname of the directory and have write privileges to the chosen directory. Directory: [/root]
接下来,在提示符后输入相关信息,可以敲回车键使用缺省值...
安装路径 Directory:/usr/local/realserver
Please enter ausername and password that you will use
to access the web-based Helix DNA Server Administrator and Monitor.
Username []:admin /*管理员帐号*/

Password []:         /*密码:本例中使用123456*/
Confirm Password []:   /*确认密码*/

接下来的 Port [7070]: 等等回车就行了
Please enter a port on which Helix DNA Server will listen for
PNA connections. These connections have URLs that begin
with "pnm://"
Port [7070]:

Please enter a port on which Helix DNA Server will listen for
RTSP connections. These connections have URLs that begine
with "rtsp://"
Port [554]:

Please enter a port on which Helix DNA Server will listen for
HTTP connections. These connections have URLs that begine
with "http://"
Port [80]:
 

Helix DNA Server will listen for Administrator requests on the
port shown. This port has been initialized to a random value
for security. Please verify now that this pre-assigned port
will not interfere with ports already in use on your system;
you can change it if necessary.

Port [21940]:

Port 80 is currently in use. Use this port anyway? (y/n) [y]:
Port 80正在使用,你就选 n ,然后改成其它没使用中的port,比如8080,这个port要记住...
还有AdminPort 21940 这个是随机产生的,也要记住...

最后会给你个总结性的确认:(没有错误就选F完成,如需要更改按P,重复以上步骤。)
You have selected the following Helix DNA Server configuration:

Admin User/Password: admin/****
Monitor Password: ****
RTSP Port: 554
HTTP Port: 8080
PNA Port: 7070
MMS Port: 1755
Admin Port: 21940
Destination: /usr/local/realserver

Enter [F]inish to begin copying files, or [P]revious to go
back to the previous prompts: [F]:
Copying Helix DNA Server files...

Helix DNA Server installation is complete.
Cleaning up installation files...
Done.
安装完成!

3、所有的文件都在/usr/local/realserver下
localhost# ll
total 46
drwxr-xr-x 2 root wheel 512 Aug 15 17:47 Bin <---启动realserver和广播的程序
drwxr-xr-x 3 root wheel 512 Nov 26 2003 Commerce
drwxr-xr-x 5 root wheel 512 Nov 26 2003 Content <---默认的播放内容
drwxr-xr-x 4 root wheel 2048 Nov 26 2003 HelixAdministrator <---客户端web管理要用到的网页程序帮助等
drwxr-xr-x 2 root wheel 512 Nov 26 2003 License <---许可证
drwxr-xr-x 3 root wheel 512 Nov 26 2003 Logs
drwxr-xr-x 2 root wheel 512 Nov 26 2003 Plugins
drwxr-xr-x 2 root wheel 512 Nov 26 2003 Secure
drwxr-xr-x 6 root wheel 512 Aug 15 17:47 adm_b_db
-rw------- 1 root wheel 12320 Aug 15 17:47 default.cfg <---服务器配置文件,缺省值
-rw------- 1 root wheel 12320 Aug 15 17:47 hlxserverplus.cfg <---与default.cfg相同

安装时的设置都在default.cfg里。它会自动copy一个为hlxserverplus.cfg,有port设置,管理员帐号,bind的IP等。
可以手动修改hlxserverplus.cfg来设置realserver的环境.

4、启动realserver
localhost# pwd
/usr/local/realserver

localhost#cp hlxserverplus.cfg Bin

localhost#cd Bin
localhost# ./hlxserverplus hlxserverplus.cfg &


[1] 851
# Helix DNA Server (c) 1995-2003 RealNetworks, Inc. All rights reserved.
Version: Helix Server 10.1 (10.1.1.67)(Build 25942/746)
Platform: freebsd-5.0-i586

Using Config file: hlxserverplus.cfg
......(等等一大串信息)
localhost# ps -ax | grep -c hlxserverplus
15

可见有15个hlxserverplus进程启动了...
这样其它电脑就可以通过real播放器连接到这台realserver了...
比如有:
localhost# ls /usr/local/realserver/Content/*.rmvb
ghz.rmvb

那么客户机就可以
rtsp://60.17.219.66/ghz.rmvb看到这个节目...

注意,realserver开始是自动寻找服务器的固定IP地址,然后把服务端口绑定到这个固定IP。
它不能自动找到拨号上网的IP,比如tun得到的IP。可以通过netstat看到结果...
比如:
localhost# netstat -an | grep 554
tcp4 0 0 127.0.0.1.554 *.* LISTEN
tcp4 0 0 192.168.0.2.554 *.* LISTEN


5、关闭hlxserverplus
localhost# killall hlxserverplus

二、通过web界面设置realserver
如果是内网的就像http://192.168.0.2:21940/admin/index.html
注意它不能自动搜索index.html文件,要手动输入。
提示管理帐号,如前面所述,为admin:123456就进入web管理界面了
这里可以设置和监视realserver服务器。
以下讲述常见的设置

1、Server Setup -- Ports 为用到的realserver端口。

2、Server Setup -- IP Binding 可以bind到固定的IP,比如拨号得到的tun0的IP:60.17.219.66
这里改动并apply后,会提示realserver要重新启动,用菜中的restart server重新启动real服务器,然后重新连接到web管理界面。
比如用http://60.17.219.66:21940/admin/index.html连接

3、Security -- Authentication 设置和管理帐号。

4、Logging & Monitoring -- Server Monitor 可以监视目前连接到realserver的情况。
在Files里可以看到目前使用的文件名等等...


三、其它地方可以提一下的。

1、服务器上hlxserverplus.cfg里,如果设置了Bind的IP就会在最后有如下一段:
<List Name="IPBindings">
<Var Address_1="60.17.219.66"/>
</List>
这里IP可以改为域名哟,对态IP用户如果设第一次设置的外网IP,
那么下次启动时要手动修此处,否则无法正常启动realserver。

2、由于本人只有一台电脑,配置也不是很高,广播等其他内容无法给大家测试 。

3、最近比较忙,有关Helix DNA Server的图文设置等我有时间会另开一贴写给大家。

4、安装中有问题的,可以到网上去搜索,也可以在此跟贴,我看到后可以解答的会尽快回贴。

讨论 http://bbs.pc51.net


文章评论

共有 0 位网友发表了评论 此处只显示部分留言 点击查看完整评论页面