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

编程入门 行业动态 更新时间:2024-10-08 06:17:46

linux(debian) 下安装ample搭建<a href=https://www.elefans.com/category/jswz/34/1769448.html style=局域网共享音乐服务器。"/>

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) #共享的IP
serveraddress = 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搭建局域网共享音乐服务器。

本文发布于:2024-02-13 14:12:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1759273.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:局域网   服务器   音乐   linux   debian

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!