|
本帖最后由 ayachen 于 2018-2-10 14:37 编辑
路由器型号:Asus rt-n16
AdvancedTomato版本:1.28.0000 MIPSR2-140 K26 USB AIO
参考了这个教程:https://github.com/Entware-ng/En ... ll-on-the-TomatoUSB,安装的时候稍作修改。
因为之前已经插入U盘并且已经做了samba、FTP等的测试,也用了BitTorrent下载了一些文件和NGINX Web挂了网页,不想重新格式化U盘。
所以在U盘(卷标EXTRA)新建文件夹ENTWARE然后- mount /opt /tem/mnt/EXTRA/ENTWARA
复制代码
用来安装entware-ng,用迅雷下载
http://pkg.entware.net/binaries/mipsel/installer/installer.sh,再用WinSCP上传至U盘,然后在putty中运行安装,具体如下:
- Tomato v1.28.0000 MIPSR2-140 K26 USB AIO
- ========================================================
- Welcome to the Asus RT-N16 [TomatoUSB]
- Uptime: 13:32:00 up 2:13
- Load average: 0.12, 0.17, 0.16
- Mem usage: 31.2% (used 38.65 of 123.78 MB)
- WAN : 192.168.110.103/24 [url=home.php?mod=space&uid=162986]@[/url] BC:AE:C5:E7:AF:81
- LAN1 : 192.168.120.1/24 @ DHCP: 192.168.120.100 - 192.168.120.149
- WL0 : 2,4GHz @ TomatoAsus @ channel: 6 @ BC:AE:C5:E7:AF:82
- ========================================================
- root@TomatoAsus:/tmp/home/root# cd /tmp/mnt/Extra
- root@TomatoAsus:/tmp/mnt/Extra# sh installer.sh
- Info: Creating folders...
- mkdir: can't create directory '/opt/bin': Read-only file system
- mkdir: can't create directory '/opt/etc/': Read-only file system
- mkdir: can't create directory '/opt/lib/': Read-only file system
- mkdir: can't create directory '/opt/sbin': Read-only file system
- mkdir: can't create directory '/opt/share': Read-only file system
- mkdir: can't create directory '/opt/tmp': Read-only file system
- mkdir: can't create directory '/opt/usr': Read-only file system
- mkdir: can't create directory '/opt/var/': Read-only file system
- mkdir: can't create directory '/opt/var/': Read-only file system
- mkdir: can't create directory '/opt/var/': Read-only file system
- Info: Deploying opkg package manager...
- Downloading /opt/bin/opkg... wget: can't open '/opt/bin/opkg': No such file or d irectory
- failed!
- root@TomatoAsus:/tmp/mnt/Extra#
复制代码 意思应该/opt文件夹只有只读属性,不能写入。
用notepad++打开installer.sh,内容如下:
- #!/bin/sh
- export PATH=/opt/sbin:/opt/bin:$PATH
- unset LD_LIBRARY_PATH
- unset LD_PRELOAD
- URL=http://pkg.entware.net/binaries/mipsel/installer
- echo 'Info: Creating folders...'
- for folder in bin etc/init.d lib/opkg sbin share tmp usr var/log var/lock var/run
- do
- if [ -d "/opt/$folder" ]
- then
- echo "Warning: Folder /opt/$folder exists! If something goes wrong please clean /opt folder and try again."
- else
- mkdir -p /opt/$folder
- fi
- done
- dl () {
- # $1 - URL to download
- # $2 - place to store
- # $3 - 'x' if should be executable
- echo -n "Downloading $2... "
- wget -q $1 -O $2
- if [ $? -eq 0 ] ; then
- echo 'success!'
- else
- echo 'failed!'
- exit 1
- fi
- [ -z "$3" ] || chmod +x $2
- }
- echo 'Info: Deploying opkg package manager...'
- dl $URL/opkg /opt/bin/opkg x
- dl $URL/opkg.conf /opt/etc/opkg.conf
- dl $URL/profile /opt/etc/profile x
- dl $URL/rc.func /opt/etc/init.d/rc.func
- dl $URL/rc.unslung /opt/etc/init.d/rc.unslung x
- echo 'Info: Basic packages installation...'
- opkg update
- opkg install ldconfig findutils
- ldconfig > /dev/null 2>&1
- [ -f /etc/TZ ] && ln -sf /etc/TZ /opt/etc/TZ
- cat << EOF
- Congratulations! If there are no errors above then Entware-ng is successfully initialized.
- Found a Bug? Please report at https://github.com/Entware-ng/Entware-ng/issues
- Type 'opkg install <pkg_name>' to install necessary package.
- EOF
复制代码 应该是安装路径是直接安装到/opt文件夹上。
操作过程中有什么不对的地方吗?刚自学Linux,很多命令和原理还不是很熟悉,请大家帮忙分析一下。
|
|