您查看的文章来源于http://www.oklinux.cn
Ample是一个实用的网络音乐服务器,它工作在Linux环境下,通过它我们可以轻松实现Linux网络下的MP3音乐点播。Ample使用的P2P技术全称叫做“Peer-to-peer”对等互联网络技术(点对点网络技术)。它让用户可以直接连接到其它用户的计算机上,进行文件共享与交换。另外P2P在深度搜索、分布计算、协同工作等方面也大有用途。P2P不但可以通过网络将所有电脑组建成一个对等的大型网络,还拥有自己独有的搜索特性。简单来说就是把所有用户的机器透过Internal连接起来,组成一个大的局域网,让用户在上面共享文件。
系统要求内核(Kenerl)至少在2.2以上,KDE 2.0或GNOME 1.4,XFree86 3.36以上,中央处理器为奔腾II350以上,内存64MB、硬盘的大小要看你存放Mp3的文件数量。
1、软件下载:http://public.planetmirror.com/pub/SF/ample/ample-0.5.6.tar.gz
2、安装软件:
执行解压缩后产生的一个名为configure的可执行脚本程序。它是用于检查系统是否有编译时所需的库,以及库的版本是否满足编译的需要等安装所需要的系统信息。为随后的编译工作做准备。
#gunzip ample-0.5.6.tar.gz
#tar xvf ample-0.5.6.tar
#.configure
|
出现图-1 这个“SUCCESS”标志后进行编译
在/usr/local/etc/目录下建立新配置文件:ample.conf 内容如下:
.TH AMPLE.CONF 5 "JANUARY 2002" Ample "User Manual"
.SH NAME
ample.conf \- configuration file for Ample
.SH DESCRIPTION
This file, by default
.IR "@sysconfdir@/ample.conf" ","
is read by Ample at startup.
There are three categories of values
than can be defined: strings, numbers
and boolean values. Valid boolean
values are (case insensitive) yes, no,
true and false. Lines that start
with # are considered to be comments and ignored.
.SH EXAMPLE
.IP
.nf
# An example of a Ample config file
#
# Port number to use
port =1234
# Should files be ordered when playing a mixed stream?
order = true
# Amount of simultaneous clients allowed
clients = 5
# Path to logfile if syslog isn't used
logfile = /var/log/ample
# Path(s) to MP3 dir/file or M3U file
mp3path = /home/mp3 #mp3文件放在这个目录下
mp3path = /home/moremp3/zztop.mp3
mp3path = /home/favourites.m3u
# Path to the HTML file to use as a template
htmlfile = /etc/ample.html
# Should the MP3 dir(s) be recursively scanned?
recursive = true
# Name of the server
# (displayed to clients here and there)
servername = Ample
# Address of the server
# (only if your server can't be resolved)
serveraddress = 192.168.0.1
# Username and password, if these are specified, Ample
# will automatically ask for username/password
username = MusicLover
password = Pekaboo
# Filter to pass each music file through
# (before they are sent to the client)
filter = /usr/bin/lame -b64 --quiet "@FPATH@" -
servername = hutuworm Internet
Radio http://192.168.0.1.:1234/
# 你的Linux服务器地址:端口号
# The end
|
5.将MP3文件拷贝到/home/mp3目录下。
6. 运行:
#/usr/local/bin/ample
Ample的参数
-p, --port=NUMBER Linux服务器广播断口号、缺省为1234
-o, --order play MP3 files in alphabetical order
-c, --clients=NUMBER 连接多少Client端缺省值为 5
-h, --help display this help and exit
-d, --debug[=NUMBER] 打印调试信息
-v, --version 结束广播时输出版本信息
|
然后就可用XMMS,winamp,Media Player等客户端软件访问http://192.168.0.1:1234/ 收听MP3。
(责任编辑:赵纪雷)