采用 snapshots
版本, 需要注意的是此版本是没有luci的,个人不是很喜欢带luci.
squashfs-factory.bin
是出厂版本(?), 如果是新的机器,个人比较推荐此版本。
squashfs-sysupgrade.bin
为升级版本,如果路由器已经是op系统了,下载这个版本,下面是链接。
squashfs-factory.bin squashfs-sysupgrade.bin
相关的bin下载后校验一下md5,已防止变砖,factory版本请到路由后台进行升级,不要断电. sysupgrade版本请随意,可以到luci后台更新,或者点我.
刷机成功之后用网线和你的笔电链接,然后看下面
# 登录路由器
$ telnet 192.168.1.1
BusyBox v1.19.4 (2015-01-19 21:01:13 MST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
# 设置root密码
root@OpenWrt:/# passwd
# 然后退出,重新登录(输入密码)
$ ssh root@192.168.1.1
# 备份配置文件
root@OpenWrt:/# cp /etc/config ~/ -r
# 设置hostname
root@OpenWrt:/# vi /etc/config/system
config system
option hostname Your_Hostnae
option timezone 'UTC'
option log_ip '192.168.1.200'
# 设置PS1, 添加PS1
# export PS1='\[\e[1;32m\]\u\[\e[m\] \[\e[1;33m\]\w\[\e[m\] \[\e[0;31m\]\$ \[\e[m\]\[\e[0;32m\]'
root@OpenWrt:/# vi /etc/profile
# SSH KEY免密码登录
root@OpenWrt:/# vi /etc/dropbear/authorized_keys # 输入你的 pub key
root@OpenWrt:/# chmod 0600 /etc/dropbear/authorized_keys
编辑/etc/config/wireless
, 注释掉option disabled 1, 作用是开启wifi
编辑/etc/config/networt
# vi /etc/config/networt
# lan网络
config interface 'lan'
# option ifname 'eth0' # 注释掉此行,eth0作为wan口
option type 'bridge'
option proto 'static'
option ipaddr '192.168.20.1'
option netmask '255.255.255.0'
option dns '114.114.114.114 8.8.8.8'
# wan网络
config interface 'wan'
option ifname 'eth0' # 作为接入点
option proto 'dhcp' # dhcp
# 无线网络
# vi /etc/config/wireless
# 修改config wifi-iface部分
option mode ap
option ssid openwrt
option encryption psk2
option key 'some passphrase'
# opkg update
# opkg install nano
opkg install kmod-usb-storage block-mount kmod-fs-ext4
opkg install fdisk usbutils