用openwrt有一年多了, 数据传输一直使用wget从外部的webserver取. 这样的方法我个人认为还算轻松.
可是调试的多了,写大型一点的程序,总是这样就有点麻烦了.
安装软件也是如此.
前几天无意中看到了opkg.conf, 认为这个能够让少输入一些地址.
改动opkg.conf文件例如以下
root@OpenWrt:/etc# cat opkg.conf
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
//代码效果参考:http://www.zidongmutanji.com/bxxx/573268.html
src/gz barrier_breaker_base http://192.168.202.110/base
src/gz barrier_breaker_base http://downloads.openwrt.org/barrier_breaker/14.07/ramips/mt7620a/packages/base
src/gz barrier_breaker_luci http://downloads.openwrt.org/barrier_breaker/14.07/ramips/mt7620a/packages/luci
src/gz barrier_breaker_management http://downloads.openwrt.org/barrier_breaker/14.07/ramips/mt7620a/packages/management
src/gz barrier_breaker_oldpackages http://downloads.openwrt.org/barrier_breaker/14.07/ramips/mt7620a/packages/oldpackages
src/gz barrier_breaker_packages http://downloads.openwrt.org/barrier_breaker/14.07/ramips/mt7620a/packages/packages
src/gz barrier_breaker_routing http://downloads.openwrt.org/barrier_breaker/14.07/ramips/mt7620a/packages/routing
src/gz barrier_breaker_telephony http://downloads.openwrt.org/barrier_breaker/14.07/ramips/mt7620a/packages/telephony
例如以下所看到的: 运行安装
root@OpenWrt:/etc# opkg update
root@OpenWrt:/etc# opkg install nano
root@OpenWrt:/etc# opkg remove nano