小米路由ssh管理

 

  • 自定义hosts

/etc/custom_hosts
127.0.0.1 a.a.a
127.0.0.1 a.b.b

/etc/init.d/dnsmasq reload

  • home目录

mkdir -p /userdisk/root/
rc.local添加
mount /userdisk/root/ /root/

创建
.bashrc
.profile

 

  • 停用访客WiFi

ifconfig wl3 down

 

  • 禁用迅雷

/etc/init.d/xunlei disable

 

  • qos

/etc/config/miqos

  • wifi

/etc/config/wireless

 

 

 

 

一、安装opkg

 

mkdir -p /userdisk/xxx/opt

mount -o bind /userdisk/xxx/opt /opt

cd /userdisk/xxx

wget http://pkg.entware.net/binaries/mipsel/installer/installer.sh

chmod +x installer.sh

./installer.sh

 

xxx可以换成自己喜欢的文件夹名。

运行opkg,安装软件:

export PATH=/opt/sbin:/opt/bin:$PATH
opkg update
opkg install xxxx

 

二、开机自动mount

不开机自动mount的话,重启后用opkg安装的软件不能正常运行
编辑/etc/rc.local, vi /etc/rc.local
在exit 0之前加入一行:
mount -o bind /userdisk/xxx/opt /opt

三、设置环境变量

不设置环境变量,重启后运行时找不到软件
编辑/etc/profile, vi /etc/profile
加入一行:
export PATH=/opt/sbin:/opt/bin:$PATH

posted @ 2020-03-01 16:45  ahuo  阅读(841)  评论(0编辑  收藏  举报