zeuux-universe  - 讨论区

标题:[zeuux-universe] 家中使用的小服务器选项

2010年11月07日 星期日 11:15

Zhang Weiwu zhangweiwu在realss.com
星期日 十一月 7 11:15:25 CST 2010

 On 10/11/2010 01:35 AM, Zhang Weiwu wrote:
>
>    1. 运行我早年自己修改的一个http服务端软件(bozohttpd),我有些网站是
>       依赖我改出来的特殊功能的,所以一般的web 服务器不行。
>

再次提供下文。热心的samuel昨天在coding4fun聚会的时候帮我编译了这个http服
务端软件使之在路由器上运行。

此外我们还做了一个有趣的设置。

家中路由器上插有一个USB声卡,连在家中音响上。我们在coding4fun远程安装了
mpd,使路由器(上面带有300G古典音乐)可以直接 播放音乐,用PC或iPhone点歌
都可以。

当然iPhone点歌时要绕很大一圈,先由iPhone上3G,进入Internet,登录家中路由
器。看似用iPhone对着路由器,其实信号 围北京转了约一圈了。

方法记录在这里:

第零步是安装声卡内核模块。

第一是在路由器安装mpd

    先创建一个安装目的的,路由器上8M闪存不够装这个。往 /etc/opkg.conf里添加 
    dest mpd /home/mpd
    然后可以装了:
    root在mesopotamia:~# opkg -d mpd install mpd
    Installing mpd (0.15.8-5) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/mpd_0.15.8-5_brcm47xx.ipk.
    Installing alsa-lib (1.0.21a-1) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/alsa-lib_1.0.21a-1_brcm47xx.ipk.
    Installing libaudiofile (0.2.7-1) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libaudiofile_0.2.7-1_brcm47xx.ipk.
    Installing libfaad2 (2.7-1) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libfaad2_2.7-1_brcm47xx.ipk.
    Installing libmad (0.15.1b-3) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libmad_0.15.1b-3_brcm47xx.ipk.
    Installing glib2 (2.22.2-1) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/glib2_2.22.2-1_brcm47xx.ipk.
    Installing libiconv (1.11-1) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libiconv_1.11-1_brcm47xx.ipk.
    Installing libintl (0.17-1) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libintl_0.17-1_brcm47xx.ipk.
    Installing libcurl (7.19.6-1) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libcurl_7.19.6-1_brcm47xx.ipk.
    Installing libopenssl (0.9.8m-3) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libopenssl_0.9.8m-3_brcm47xx.ipk.
    Installing libflac (1.2.1-1) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libflac_1.2.1-1_brcm47xx.ipk.
    Installing libmms (0.5-1) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libmms_0.5-1_brcm47xx.ipk.
    Installing libshout (2.2.2-2) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libshout_2.2.2-2_brcm47xx.ipk.
    Installing libspeex (1.2beta3.2-2) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libspeex_1.2beta3.2-2_brcm47xx.ipk.
    Installing libtheora (1.0-3) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libtheora_1.0-3_brcm47xx.ipk.
    Installing libogg (1.1.4-2) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libogg_1.1.4-2_brcm47xx.ipk.
    Installing libvorbisidec (1.0.2+svn14261-1) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libvorbisidec_1.0.2+svn14261-1_brcm47xx.ipk.
    Installing libvorbis (1.2.3-1) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libvorbis_1.2.3-1_brcm47xx.ipk.
    Installing libid3tag (0.15.1b-3) to mpd...
    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc3/brcm47xx/packages/libid3tag_0.15.1b-3_brcm47xx.ipk.
    Configuring libogg.
    Configuring libtheora.
    Configuring alsa-lib.
    Configuring libiconv.
    Configuring libintl.
    Configuring glib2.
    Configuring libvorbisidec.
    Configuring libopenssl.
    Configuring libcurl.
    Configuring libmms.
    Configuring libaudiofile.
    Configuring libflac.
    Configuring libspeex.
    Configuring libfaad2.
    Configuring libmad.
    Configuring libshout.
    Configuring libvorbis.
    Configuring libid3tag.
    Configuring mpd.

第二是添加audio用户组(对,我也不知道为什么包管理器不包办此事)

    # echo audio:x:29:root >> /etc/group

第三是修改mpd.conf(需注意的是USB默认输出不一定是PCM,用alsamixer一查看
可知)。

第四是启动mpd

    # LD_LIBRARY_PATH=/home/mpd/usr/lib /home/mpd/usr/bin/mpd /home/mpd/etc/mpd.conf

    用/etc/init.d/mpd start不管用的,因为有意将mpd安装在路由器闪存外了。


完成了。我试了Ubuntu上的点播客户端Ario,因为它排第一(头文字A)。可以
用,就没再试别的了。

播放ogg时约占 WL-500G v1的一半CPU资源,samuel说这很不错了,因为这路由器
里没有协处理器,ogg需要浮点运算转换成整数运算。




[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-universe]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2024

    京ICP备05028076号