參考:http://www.miui.com/thread-2205749-1-1.html
1.建立app資料夾 (app 資料夾可自行更名)
進入app資料夾
在建立bin資料夾
在x:/app/bin 放置opkg
2.ssh
cd /extdisks/sda1/
mkdir app (app 資料夾可自行更名)
cd app
mkdir bin
cd bin
wget https://drive.google.com/file/d/0Bx2A-Jefadp8NThYZnpOVWtnaXM/view?usp=sharing (想辦法放到哪裡下載下來吧XD)
確認檔案存在
/extdisks/sda1/app/bin/opkg
修改opkg設定檔
備份
cp /etc/opkg.conf /etc/opkg.conf.bak
編輯
vi /etc/opkg.conf
設定如下
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_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
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
dest root /extdisks/sda1/app
dest ram /tmp
lists_dir ext /extdisks/sda1/app/opkg-lists
option overlay_root /extdisks/sda1/app
dest usb /extdisks/sda1/app
儲存ESC :wq
cp /etc/profile /etc/profile.bak
修改
vi /etc/profile
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/extdisks/sda1/app/bin/:/extdisks/sda1/app/usr/sbin/:/extdisks/sda1/app/usr/bin/:/extdisks/sda1/python/bin/
export LD_LIBRARY_PATH=/opt/lib:/opt/usr/lib:/lib:/usr/lib:/extdisks/sda1/app/lib/:/extdisks/sda1/app/usr/lib/
設定完後重新登入SSH
讓他吃到環境變數
echo -e "\ndefault_postinst() {\n\
\treturn 0\n\
}\n\
default_prerm() {\n\
\treturn 0\n\
}" >> /extdisks/sda1/app/lib/functions.sh
裝了php gcc ffmpeg python...
看起來還正常
不能RUN的就自己編或放棄吧~~~
*須開啟ssh跟使用USB儲存設備
1.opkg設定
在USB設備上建立目錄1.建立app資料夾 (app 資料夾可自行更名)
進入app資料夾
在建立bin資料夾
在x:/app/bin 放置opkg
2.ssh
cd /extdisks/sda1/
mkdir app (app 資料夾可自行更名)
cd app
mkdir bin
cd bin
wget https://drive.google.com/file/d/0Bx2A-Jefadp8NThYZnpOVWtnaXM/view?usp=sharing (想辦法放到哪裡下載下來吧XD)
確認檔案存在
/extdisks/sda1/app/bin/opkg
修改opkg設定檔
備份
cp /etc/opkg.conf /etc/opkg.conf.bak
編輯
vi /etc/opkg.conf
設定如下
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_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
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
dest root /extdisks/sda1/app
dest ram /tmp
lists_dir ext /extdisks/sda1/app/opkg-lists
option overlay_root /extdisks/sda1/app
dest usb /extdisks/sda1/app
儲存ESC :wq
進行更新
/extdisks/sda1/app/bin/opkg update
2.設定環境變數
備份cp /etc/profile /etc/profile.bak
修改
vi /etc/profile
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/extdisks/sda1/app/bin/:/extdisks/sda1/app/usr/sbin/:/extdisks/sda1/app/usr/bin/:/extdisks/sda1/python/bin/
export LD_LIBRARY_PATH=/opt/lib:/opt/usr/lib:/lib:/usr/lib:/extdisks/sda1/app/lib/:/extdisks/sda1/app/usr/lib/
設定完後重新登入SSH
讓他吃到環境變數
3.安裝方式
opkg -d usb install <套件名>
不能裝就先去
不能裝就先去
https://downloads.openwrt.org/barrier_breaker/14.07/ramips/mt7620a/
或
https://downloads.openwrt.org/chaos_calmer/15.05/ramips/mt7620/packages/
找套件
cd /extdisks/sda1/app
使用 wget 下載下來
opkg -d usb install <套件名.ipk>
或
https://downloads.openwrt.org/chaos_calmer/15.05/ramips/mt7620/packages/
找套件
cd /extdisks/sda1/app
使用 wget 下載下來
opkg -d usb install <套件名.ipk>
裝完後
cd /extdisks/sda1/app/etc/init.d/
需要一個一個手動修改路徑位子
設定到 /extdisks/sda1/app/
不然設定檔抓不到
cd /extdisks/sda1/app/etc/init.d/
需要一個一個手動修改路徑位子
設定到 /extdisks/sda1/app/
不然設定檔抓不到
直接無視錯誤XD
\treturn 0\n\
}\n\
default_prerm() {\n\
\treturn 0\n\
}" >> /extdisks/sda1/app/lib/functions.sh
5.結語
裝了php gcc ffmpeg python...
看起來還正常
不能RUN的就自己編或放棄吧~~~
留言
張貼留言