打造自己的流媒体服务器:安装Helix快速学习
作者:heiyeluren
博客:http://blog.csdn.net/heiyehuwu
时间:2006-11-04
Helix是Real Network公司开发的流媒体服务器软件,能够运行在 Linux/FreeBSD/Windows 等平台上面,主要支持的是Real Audio等为主的各种多媒体格式。我今天就要安装一个流媒体服务器玩玩。
操作系统: Fedora Core 1
Linux内核: 2.4.22
Helix版本: Helix DNA Server 10.1
下载地址: http://www.linuxfans.org/nuke/modules.php?name=Site_Downloads&op=geninfo&did=2045&expand=level1
(说明:这个版本是破解版,无需Real的License,整个程序2MB左右大小)
【安装】
下载安装文件到 /root/download 目录下,解压:
# tar zxvf Helix_DNA_Server_10.1.tar.gz
# cd Helix_DNA_Server_10.1
# chmod +x ./*
# ./servinst_plus_linux-2.2-libc6-i586-server.bin
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/download/Helix_DNA_Server_10.1]: /usr/local/Helix10
输入Helix的安装目录,我输入: /usr/local/Helix10
Please enter a username and password that you will use
to access the web-based Helix DNA Server Administrator and monitor.
Username []: heiyeluren
Password []:
Confirm Password []:
上面是输入管理用户名和密码,我分别输入 heiyeluren 和 123456
Please enter a port on which Helix DNA Server will listen for
PNA connections. These connections have URLs that begin
with "pnm://"
Port [7070]:
上面是Helix将监听的PNA连接的端口,缺省是7070,不改变,直接回车。
Please enter a port on which Helix DNA Server will listen for
RTSP connections. These connections have URLs that begin
with "rtsp://"
Port [554]:
这个是RTSP的端口,默认是554,不改变,这个是我们看流媒体的主要端口。
Please enter a port on which Helix DNA Server will listen for
HTTP connections. These connections have URLs that begin
with "http://"
Port [80]: 8080
这个是HTTP的端口,默认是80,如果你没有安装其他类似Apache的程序占用此端口,可以不用改变,我改成8080。
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 [17456]:
后台管理的端口,这个端口是随机的,如果你不改变这个端口,记得记录下这个端口号,不然登录不了后台,我不改变。
You have selected the following Helix DNA Server configuration:
Admin User/Password: heiyeluren/****
Monitor Password: ****
RTSP Port: 554
HTTP Port: 8080
PNA Port: 7070
Admin Port: 17456
Destination: /usr/local/Helix10
Enter [F]inish to begin copying files, or [P]revious to go
back to the previous prompts: [F]:
显示一遍之前填写的资料,如果觉得需要修改,按P返回,如果确定,则按F进行文件的复制,我按F。
Copying Helix DNA Server files...
Helix DNA Server installation is complete.
Cleaning up installation files...
Done.
安装完成。
【配置】
# cd /usr/local/Helix10/
# ls -l
drwxr-sr-x 6 root root 4096 11?? 4 19:58 adm_b_db
drwxr-sr-x 2 root root 4096 11?? 4 19:58 Bin
drwxr-sr-x 3 root root 4096 11?? 26 2003 Commerce
drwxr-sr-x 5 root root 4096 11?? 26 2003 Content
-rw------- 1 root root 12237 11?? 4 19:58 default.cfg
drwxr-sr-x 4 root root 4096 11?? 26 2003 HelixAdministrator
-rw------- 1 root root 2237 11?? 4 19:58 hlxserverplus.cfg
drwxr-sr-x 2 root root 4096 11?? 26 2003 License
drwxr-sr-x 3 root root 4096 11?? 26 2003 Logs
drwxr-sr-x 2 root root 4096 11?? 26 2003 Plugins
drwxr-sr-x 2 root root 4096 11?? 26 2003 Secure
我们看一下这几个文件。
Bin/ 目录下是我们的主要执行程序,Content/是我们流媒体文件保存的目录,HelixAdministrator/是我们后台的管理程序文件,hlxserverplus.cfg是我们Helix的主要配置文件,是一个XML文件,Logs/目录保存了运行日志和当前运行Helix Server的pid,adm_b_db目录下保存了能够访问流媒体服务器的用户和密码,我们查看一个用户文件:
# cat adm_b_db/users/heiyeluren
123456;*;1
文件名是用户名,文件内容是密码和部分权限信息。
【运行】
现在我们来运行一下我们的Helix Server,并且查看我们的流媒体服务器能不能正常工作。
我先拷贝了一部电影《公寓》(韩国恐怖片),是RMVB格式的,拷贝电影到 /usr/local/Helix10/Content 目录下,文件名叫做 gy.rmvb。然后运行我们的Helix Server:
# cd /usr/local/Helix10
# ./Bin/hlxserverplus ./hlxserverplus.cfg &
[1] 2078
[root@fedora1 Helix]# Helix DNA Server (c) 1995-2003 RealNetworks, Inc. All righ ts reserved.
Version: Helix DNA Server 10.1 (10.1.1.67) (Build 25942/746)
Platform: linux-2.2-libc6-i586-server
Using Config File: ./hlxserverplus.cfg
Creating Server Space...
Server has allocated 256 megabytes of memory
Starting PID 2081, procnum 1 (timer)
Calibrating timers...
Interval timer enabled (10ms resolution).
Starting PID 2082, procnum 2 (core)
Starting Helix DNA Server 10.1 Core...
1 CPU Detected...
Linux kernel version 2.4.22-1.2115.nptl detected
Testing File Descriptors...
Setting per-process descriptor capacity to 677(1011), 11...
Testing Mutex...(375.06 ops/usec)
Testing AtomicOps...(43.33 ops/usec)
I: Loading Plugins from /usr/local/Helix/Plugins...
I: slicensepln.so 0x4018ac60 RealNetworks Licensing Plugin
I: mp3fformat.so 0x401aedf0 RealNetworks MP3 File Format Plugin
I: smlfformat.so 0x401cdb20 RealNetworks SMIL File Format Plugin
I: smplfsys.so 0x401e4310 RealNetworks Local File System
I: httpfsys.so 0x402125f0 RealNetworks HTTP File System with CHTTP Support
I: httpfsys.so 0x402125f0 RealNetworks RFC 2397 Data Scheme File System
I: adminfs.so 0x4026a2a0 RealNetworks Admin File System
[root@fedora1 Helix]# I: shelfsys.so 0x402ae314 RealNetworks Shell File System
I: ramplin.so 0x402bb310 RealNetworks Ramgen File System
I: hxsdp.so 0x402cc7bc RealNetworks SDP Stream Description Plugin
I: authmgr.so 0x402fbc60 Helix Authentication Manager
I: pplyplin.so 0x4032cb00 RealNetworks Scalable Multicast Plugin
I: qtbcplin.so 0x40362ac0 RealNetworks QuickTime Live Broadcast Plugin
I: tmplgpln.so 0x40385280 RealNetworks Custom Logging Plugin
I: ppvallow.so 0x403b3764 RealNetworks Pay Per View Allowance Plugin
I: ppvbasic.so 0x403d77a4 RealNetworks FlatFile Database Plugin
I: bascauth.so 0x403f1b20 RealNetworks Basic Authenticator
I: dbmgr.so 0x4040ca30 RealNetworks Database Manager
I: smonplin.so 0x40427ab0 RealNetworks System Monitor
I: rmfformat.so 0x40447750 RealNetworks RealMedia File Format Plugin
I: brcvplin.so 0x404a2330 RealNetworks Broadcast Reception Plugin
I: meiffpln.so 0x404fa630 RealNetworks Media Export File Format Plugin
I: meiplin.so 0x4051a030 RealNetworks Media Export Interface Plugin
I: allow.so 0x4053eec8 RealNetworks Basic Allowance Plugin
Starting PID 2083, procnum 3 (rmplug)
Loading Helix Server License Files...
Starting PID 2084, procnum 4 (rmplug)
Starting PID 2085, procnum 5 (rmplug)
Starting PID 2086, procnum 6 (rmplug)
Starting PID 2087, procnum 7 (rmplug)
Starting PID 2088, procnum 8 (rmplug)
Starting PID 2089, procnum 9 (rmplug)
Starting PID 2090, procnum 10 (memreap)
Starting PID 2091, procnum 11 (streamer)
现在打开我们本地的 RealPlayer 10 的播放器,输入播放地址:
rtsp://192.168.0.3/gy.rmvb
呵呵,正常播放了,运行成功。
现在再来看看后台是否能够正常访问,打开浏览器,记住我们上面的管理端口17456,输入:
http://192.168.0.3:17456/admin/index.html
出现登录提示,输入我们的用户名heiyeluren和密码123456,正确登录。现在就可以开始后台管理了,具体后台的功能以及如何管理,这里不详述。
【其他】
1. 本文只是入门讲解,更复杂功能,需要自己去发现
2. 后台能够汉化成中文,网上有汉化包,搜索一下应该能够找到
3. 后台相关的配置功能比较强大,可以自行仔细学习和配置
4. Helix Server自带没有防止盗链的功能,建议使用 Auth Plug 之类的防盗链插件来防止盗链
5. Helix 的多服务器负载功能必须借助 Helix Proxy 来完成,有兴趣可以自己去研究
【图片】
输入电影播放地址:
播放电影:
后台登录:
后台主界: