linux(debian) 下安装ample搭建局域网共享音乐服务器。

加班太累。。。到了晚上在同事旁边调试的时候,想播放下自己机器里面的音乐。这个时候搭建一个音乐服务器就很有必要了。这里我们使用ample#apt-get install ample然后配置它在/etc/ample/ample.conf 里面配置非常简单。

# An example of Ample config file## Port number to use 端口号port = 40404# Should files be ordered when playing a mixed stream? order = false# Amount of simaltaneous client allowed #允许链接的客户端数clients = 5# Path to logile if syslog isn't used #日志logfile /var/log/ample.log# Path(s) to MP3 dir/files or M3U file#Add your MP3 path here#mp3path = /usr/share/mp3#mp3path = /home/moremp3  #这里填你的服务器的音乐文件夹mp3path = /home/media/music/other# Path to the HTML file to use as a template#htmlfile = /home/ample.html# Should the MP3 dir(s) be recursively scanned? recursive = true# Name of the server# (displayed to clients here and there) #共享的IPserveraddress = 192.168.20.68#音乐服务器的名字servername = Tom's Music Centre# 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@" -

修改好后,保存重启下ample#/etc/init.d/ample restart最后在局域网同事的机器上打开vlc, 在网络地址那里填上我们自定义的。

比如我的http://192.168.20.68:40404/就可以了.vlc支持切换上下一首。还可以支持自定义的播放列表m3u. 这样客户端就可以选歌了。

也可以通过网页端来播放, 直接访问 http://192.168.20.68:40404/index.html

如果启动ample后并没有运行, 检查下/var/log/ample.log 并且查看下给的音乐文件夹是否有权限, 是否路径是对的,这些可以去/var/log/syslog 看见对应的错误。修复完这些错误后/etc/init.d/ample force-reload 即可

或者可以直接在命令行启动,

#ample -p40404-c5 -f /etc/ample/ample.conf -d

-p是端口, -c5 是指定几个人链接, -f 是指定配置文件 -d是print debug

enjoy!!勇于接受自己的失败,告诉自己,这就是自己的现实,

linux(debian) 下安装ample搭建局域网共享音乐服务器。

相关文章:

你感兴趣的文章:

标签云: