1. 首先到以下网址下载最新版本的固件:
下载这个是中文的
http://downloads.openwrt.org.cn/zjhzzyf_img/TL-WR1041Nv2/openwrt-ar71xx-generic-tl-wr1041n-v2-squashfs-factory.rar
添加luci的web管理界面
1.。固件默认中文
2.。.默认用户名 root 密码admin
3.。添加按钮复位功能,方便大家折腾,配置错误后还能救回来。
4.。其它功能未添加
这个是官方的(建议用这个)
1、下载地址:
http://downloads.openwrt.org/snapshots/trunk/ar71xx/
WR1041N是8MB Flash,,建议下载此版本: openwrt-ar71xx-generic-tl-wr1041n-v2-squashfs-factory.bin
2. 登录WR1041N的升级界面,上传刚才下载的openwrt固件升级。这里不详细讲过程了。升级过程比较慢,建议通过打开DOS窗口,执行:
ping 192.168.1.1 -t
直到最终看到稳定的结果才代表升级成功。
3. 升级结束后,大家发现 http://192.168.1.1 不能访问。不是的。因为官方版本没有内置Web管理界面的。怎么办?下面教大家。
打开TELNET工具(secureCRT),输入地址:192.168.1.1 类型选择:telnet (如果忘记了,默认是SSH。你也可以试试会出现什么画面)。然后确认,这时出现以下界面:
=== IMPORTANT ============================
Use 'passwd' to set your login password
this will disable telnet and enable SSH
------------------------------------------
BusyBox v1.19.4 (2012-05-28 11:39:51 PDT) 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
-----------------------------------------------------
ATTITUDE ADJUSTMENT (Bleeding Edge, r31954)
-----------------------------------------------------
* 1/4 oz Vodka Pour all ingredients into mixing
* 1/4 oz Gin tin with ice, strain into glass.
* 1/4 oz Amaretto
* 1/4 oz Triple sec
* 1/4 oz Peach schnapps
* 1/4 oz Sour mix
* 1 splash Cranberry juice
-----------------------------------------------------
root@OpenWrt:/#passwd
Changing password for root
New password:
Retype password:
Password for root changed by root
(我们先重置一次密码(需要输入2次),然后我们用 vi 文本编辑程序先拨号把网络连上。记住,进入 vi 后,先按键盘的【Insert】键,编辑以下项目:)
root@OpenWrt:/# vi /etc/config/network
config interface 'wan'
option ifname 'eth0.2'
option proto 'pppoe'
option username '你的ADSL帐号'
option password '你的ADSL密码'
然后我们开始拨号,更新可选工具包,安装Luci管理界面,安装Luci 中文包,multiwan多拨管理,启动管理界面:
本帖隐藏的内容
root@OpenWrt:/#/etc/init.d/network restart
root@OpenWrt:/#opkg update
root@OpenWrt:/#opkg install luci
root@OpenWrt:/#opkg install luci-i18n-chinese
root@OpenWrt:/#opkg install luci-app-multiwan
root@OpenWrt:/#/etc/init.d/uhttpd enable
root@OpenWrt:/#/etc/init.d/uhttpd start
刷OPEN WRT 后WIFI故障解决
vi /etc/config/wireless #删除或注释掉option disabled 1这句
只要执行这一句就可以一般的话
如果不行的话
root@OpenWrt:~# rm /etc/config/wireless #重建无线配置文件
root@OpenWrt:~# wifi detect > /etc/config/wireless
root@OpenWrt:~# vi /etc/config/wireless #删除或注释掉option disabled 1这句 (如果看)
root@OpenWrt:~# wifi up
\
看看运行日志
=== IMPORTANT ============================ Use 'passwd' to set your login password this will disable telnet and enable SSH ------------------------------------------ BusyBox v1.19.4 (2013-07-11 10:30:19 PDT) 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 ----------------------------------------------------- BARRIER BREAKER (Bleeding Edge, r37237) ----------------------------------------------------- * 1/2 oz Galliano Pour all ingredients into * 4 oz cold Coffee an irish coffee mug filled * 1 1/2 oz Dark Rum with crushed ice. Stir. * 2 tsp. Creme de Cacao ----------------------------------------------------- root@OpenWrt:/# passwd Changing password for root New password: Bad password: too short Retype password: Password for root changed by root root@OpenWrt:/# ls bin dev etc lib mnt overlay proc rom root sbin sys tmp usr var www root@OpenWrt:/# ls -ltr dr-xr-xr-x 40 root root 0 Jan 1 00:00 proc dr-xr-xr-x 11 root root 0 Jan 1 00:00 sys drwxr-xr-x 4 root root 1100 Jan 1 00:00 dev drwxrwxrwt 12 root root 340 Jan 1 00:00 tmp drwxr-xr-x 4 root root 0 Jan 1 00:00 overlay drwxr-xr-x 1 root root 0 Jan 1 00:01 etc drwxr-xr-x 2 root root 3 Jul 11 2013 www drwxr-xr-x 2 root root 3 Jul 11 2013 root drwxr-xr-x 2 root root 3 Jul 11 2013 mnt drwxr-xr-x 6 root root 74 Jul 11 2013 usr drwxr-xr-x 11 root root 624 Jul 11 2013 lib lrwxrwxrwx 1 root root 4 Jul 11 2013 var -> /tmp drwxr-xr-x 2 root root 687 Jul 11 2013 sbin drwxr-xr-x 2 root root 703 Jul 11 2013 bin drwxr-xr-x 16 root root 211 Jul 11 2013 rom root@OpenWrt:/# vi /etc/config/network option netmask '255.0.0.0' option ula_prefix 'fd44:2621:80f2::/48' option ip6assign '60' option proto 'dhcp' option proto 'dhcpv6' option enable_vlan '1' option ports '0t 2 3 4 5' option ports '0t 1' ~ ~ ~ ~ ~ config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config globals 'globals' option ula_prefix 'fd44:2621:80f2::/48' config interface 'lan' option ifname 'eth0.1' option type 'bridge' option proto 'static' option ipaddr '192.168.1.1' option netmask '255.255.255.0' option ip6assign '60' config interface 'wan' option ifname 'eth0.2' option proto 'dhcp' config interface 'wan6' option ifname '@wan' option proto 'dhcpv6' config switch option name 'switch0' option reset '1' option enable_vlan '1' config switch_vlan option device 'switch0' option vlan '1' option ports '0t 2 3 4 5' config switch_vlan option device 'switch0' option vlan '2' option ports '0t 1' option proto 'pppoe' option proto 'dhcpv6' option enable_vlan '1' option ports '0t 2 3 4 5' option ports '0t 1' option username '051288635066' option proto 'dhcpv6' option enable_vlan '1' option ports '0t 2 3 4 5' option ports '0t 1' root@OpenWrt:/# ls -ltr dr-xr-xr-x 40 root root 0 Jan 1 00:00 proc dr-xr-xr-x 11 root root 0 Jan 1 00:00 sys drwxr-xr-x 4 root root 1100 Jan 1 00:00 dev drwxrwxrwt 12 root root 340 Jan 1 00:00 tmp drwxr-xr-x 4 root root 0 Jan 1 00:00 overlay drwxr-xr-x 1 root root 0 Jan 1 00:01 etc drwxr-xr-x 2 root root 3 Jul 11 2013 www drwxr-xr-x 2 root root 3 Jul 11 2013 root drwxr-xr-x 2 root root 3 Jul 11 2013 mnt drwxr-xr-x 6 root root 74 Jul 11 2013 usr drwxr-xr-x 11 root root 624 Jul 11 2013 lib lrwxrwxrwx 1 root root 4 Jul 11 2013 var -> /tmp drwxr-xr-x 2 root root 687 Jul 11 2013 sbin drwxr-xr-x 2 root root 703 Jul 11 2013 bin drwxr-xr-x 16 root root 211 Jul 11 2013 rom root@OpenWrt:/# cd /etc/ root@OpenWrt:/etc# ls TZ dnsmasq.conf hosts modules-boot.d passwd rc.button shadow banner dropbear hotplug-preinit.json modules.d passwd- rc.common shadow- config ethers hotplug.d mtab ppp rc.d shells crontabs firewall.user hotplug.json openwrt_release preinit rc.local sysctl.conf defconfig fstab init.d openwrt_version profile resolv.conf sysupgrade.conf diag.sh group inittab opkg.conf protocols services uci-defaults root@OpenWrt:/etc# cd network /bin/ash: cd: can't cd to network root@OpenWrt:/etc# ls TZ dnsmasq.conf hosts modules-boot.d passwd rc.button shadow banner dropbear hotplug-preinit.json modules.d passwd- rc.common shadow- config ethers hotplug.d mtab ppp rc.d shells crontabs firewall.user hotplug.json openwrt_release preinit rc.local sysctl.conf defconfig fstab init.d openwrt_version profile resolv.conf sysupgrade.conf diag.sh group inittab opkg.conf protocols services uci-defaults root@OpenWrt:/etc# cd config root@OpenWrt:/etc/config# ls 6relayd dhcp dropbear firewall network system ubootenv wireless root@OpenWrt:/etc/config# ls -ltr -rw-r--r-- 1 root root 486 Jan 1 00:00 wireless -rw-r--r-- 1 root root 373 Jan 1 00:00 system -rw-r--r-- 1 root root 0 Jan 1 00:00 ubootenv -rw-r--r-- 1 root root 824 Jan 1 00:05 network -rw-r--r-- 1 root root 3887 Jul 11 2013 firewall -rw-r--r-- 1 root root 708 Jul 11 2013 6relayd -rw-r--r-- 1 root root 885 Jul 11 2013 dhcp -rw-r--r-- 1 root root 134 Jul 11 2013 dropbear root@OpenWrt:/etc/config# vi network option netmask '255.0.0.0' option ula_prefix 'fd44:2621:80f2::/48' option ip6assign '60' option password '25211621' option proto 'dhcpv6' option enable_vlan '1' option ports '0t 2 3 4 5' option ports '0t 1' ~ ~ ~ root@OpenWrt:/etc/config# cd .. root@OpenWrt:/etc# ls TZ dnsmasq.conf hosts modules-boot.d passwd rc.button shadow banner dropbear hotplug-preinit.json modules.d passwd- rc.common shadow- config ethers hotplug.d mtab ppp rc.d shells crontabs firewall.user hotplug.json openwrt_release preinit rc.local sysctl.conf defconfig fstab init.d openwrt_version profile resolv.conf sysupgrade.conf diag.sh group inittab opkg.conf protocols services uci-defaults root@OpenWrt:/etc# cd init.d root@OpenWrt:/etc/init.d# ls 6relayd cron dnsmasq dropbear led network sysntpd umount boot defconfig done firewall log sysctl telnet usb root@OpenWrt:/etc/init.d# ls -ltr -rwxr-xr-x 1 root root 318 Oct 10 2012 defconfig -rwxr-xr-x 1 root root 102 Oct 10 2012 umount -rwxr-xr-x 1 root root 586 Oct 10 2012 sysntpd -rwxr-xr-x 1 root root 2015 Nov 26 2012 led -rwxr-xr-x 1 root root 160 Dec 21 2012 usb -rwxr-xr-x 1 root root 126 Apr 10 2013 sysctl -rwxr-xr-x 1 root root 308 May 27 2013 done -rwxr-xr-x 1 root root 576 Jun 15 2013 network -rwxr-xr-x 1 root root 1906 Jul 11 2013 boot -rwxr-xr-x 1 root root 1099 Jul 11 2013 log -rwxr-xr-x 1 root root 262 Jul 11 2013 firewall -rwxr-xr-x 1 root root 4096 Jul 11 2013 6relayd -rwxr-xr-x 1 root root 12818 Jul 11 2013 dnsmasq -rwxr-xr-x 1 root root 4061 Jul 11 2013 dropbear -rwxr-xr-x 1 root root 878 Jul 11 2013 telnet -rwxr-xr-x 1 root root 385 Jul 11 2013 cron root@OpenWrt:/etc/init.d# network restart /bin/ash: network: not found root@OpenWrt:/etc/init.d# ./network restart 'radio0' is disabled 'radio0' is disabled 'radio0' is disabled 'radio0' is disabled root@OpenWrt:/etc/init.d# cd / root@OpenWrt:/# dir /bin/ash: dir: not found root@OpenWrt:/# ls bin dev etc lib mnt overlay proc rom root sbin sys tmp usr var www root@OpenWrt:/# opkg update Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz. Updated list of available packages in /var/opkg-lists/barrier_breaker. root@OpenWrt:/# opkg install luci Installing luci (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci_svn-r9868-1_ar71xx.ipk. Installing uhttpd (2013-06-01-87c52f8461fa74733572f4efc53bc30a64ca8575) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/uhttpd_2013-06-01-87c52f8461fa74733572f4efc53bc30a64ca8575_ar71xx.ipk. Installing uhttpd-mod-ubus (2013-06-01-87c52f8461fa74733572f4efc53bc30a64ca8575) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/uhttpd-mod-ubus_2013-06-01-87c52f8461fa74733572f4efc53bc30a64ca8575_ar71xx.ipk. Installing luci-mod-admin-full (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-mod-admin-full_svn-r9868-1_ar71xx.ipk. Installing luci-mod-admin-core (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-mod-admin-core_svn-r9868-1_ar71xx.ipk. Installing luci-lib-web (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-lib-web_svn-r9868-1_ar71xx.ipk. Installing luci-lib-core (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-lib-core_svn-r9868-1_ar71xx.ipk. Installing lua (5.1.5-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/lua_5.1.5-1_ar71xx.ipk. Installing liblua (5.1.5-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/liblua_5.1.5-1_ar71xx.ipk. Installing libuci-lua (2013-06-11.1-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libuci-lua_2013-06-11.1-1_ar71xx.ipk. Installing libubus-lua (2013-05-30-f72dca720bb50d45b1b01bab5b01cb80c78c5230) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libubus-lua_2013-05-30-f72dca720bb50d45b1b01bab5b01cb80c78c5230_ar71xx.ipk. Installing luci-lib-sys (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-lib-sys_svn-r9868-1_ar71xx.ipk. Installing luci-lib-nixio (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-lib-nixio_svn-r9868-1_ar71xx.ipk. Installing luci-sgi-cgi (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-sgi-cgi_svn-r9868-1_ar71xx.ipk. Installing luci-proto-core (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-proto-core_svn-r9868-1_ar71xx.ipk. Installing luci-i18n-english (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-i18n-english_svn-r9868-1_ar71xx.ipk. Installing luci-lib-ipkg (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-lib-ipkg_svn-r9868-1_ar71xx.ipk. Installing luci-theme-bootstrap (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-theme-bootstrap_svn-r9868-1_ar71xx.ipk. Installing luci-theme-base (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-theme-base_svn-r9868-1_ar71xx.ipk. Installing luci-app-firewall (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-app-firewall_svn-r9868-1_ar71xx.ipk. Installing luci-proto-ppp (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-proto-ppp_svn-r9868-1_ar71xx.ipk. Installing libiwinfo-lua (46) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libiwinfo-lua_46_ar71xx.ipk. Installing libiwinfo (46) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libiwinfo_46_ar71xx.ipk. Configuring luci-lib-sys. Configuring liblua. Configuring libuci-lua. Configuring lua. Configuring libubus-lua. Configuring luci-lib-core. Configuring luci-lib-nixio. Configuring luci-sgi-cgi. Configuring luci-lib-web. Configuring luci-proto-core. Configuring luci-i18n-english. Configuring luci-mod-admin-core. Configuring libiwinfo. Configuring libiwinfo-lua. Configuring luci-theme-base. Configuring luci-theme-bootstrap. Configuring luci-app-firewall. Configuring luci-lib-ipkg. Configuring luci-proto-ppp. Configuring luci-mod-admin-full. Configuring uhttpd. Configuring uhttpd-mod-ubus. Configuring luci. root@OpenWrt:/# opkg install luci-i18n-chinese Installing luci-i18n-chinese (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-i18n-chinese_svn-r9868-1_ar71xx.ipk. Configuring luci-i18n-chinese. root@OpenWrt:/# opkg intall luci-app-multiwan opkg: unknown sub-command intall usage: opkg [options...] sub-command [arguments...] where sub-command is one of: Package Manipulation: update Update list of available packages upgrade <pkgs> Upgrade packages install <pkgs> Install package(s) configure <pkgs> Configure unpacked package(s) remove <pkgs|regexp> Remove package(s) flag <flag> <pkgs> Flag package(s) <flag>=hold|noprune|user|ok|installed|unpacked (one per invocation) Informational Commands: list List available packages list-installed List installed packages list-upgradable List installed and upgradable packages list-changed-conffiles List user modified configuration files files <pkg> List files belonging to <pkg> search <file|regexp> List package providing <file> find <regexp> List packages whose name or description matches <regexp> info [pkg|regexp] Display all info for <pkg> status [pkg|regexp] Display all status for <pkg> download <pkg> Download <pkg> to current directory compare-versions <v1> <op> <v2> compare versions using <= < > >= = << >> print-architecture List installable package architectures depends [-A] [pkgname|pat]+ whatdepends [-A] [pkgname|pat]+ whatdependsrec [-A] [pkgname|pat]+ whatrecommends[-A] [pkgname|pat]+ whatsuggests[-A] [pkgname|pat]+ whatprovides [-A] [pkgname|pat]+ whatconflicts [-A] [pkgname|pat]+ whatreplaces [-A] [pkgname|pat]+ Options: -A Query all packages not just those installed -V[<level>] Set verbosity level to <level>. --verbosity[=<level>] Verbosity levels: 0 errors only 1 normal messages (default) 2 informative messages 3 debug 4 debug level 2 -f <conf_file> Use <conf_file> as the opkg configuration file --conf <conf_file> --cache <directory> Use a package cache -d <dest_name> Use <dest_name> as the the root directory for --dest <dest_name> package installation, removal, upgrading. <dest_name> should be a defined dest name from the configuration file, (but can also be a directory name in a pinch). -o <dir> Use <dir> as the root directory for --offline-root <dir> offline installation of packages. --add-arch <arch>:<prio> Register architecture with given priority --add-dest <name>:<path> Register destination with given path Force Options: --force-depends Install/remove despite failed dependencies --force-maintainer Overwrite preexisting config files --force-reinstall Reinstall package(s) --force-overwrite Overwrite files from other package(s) --force-downgrade Allow opkg to downgrade packages --force-space Disable free space checks --force-postinstall Run postinstall scripts even in offline mode --force-remove Remove package even if prerm script fails --noaction No action -- test only --download-only No action -- download only --nodeps Do not follow dependencies --nocase Perform case insensitive pattern matching --force-removal-of-dependent-packages Remove package and all dependencies --autoremove Remove packages that were installed automatically to satisfy dependencies -t Specify tmp-dir. --tmp-dir Specify tmp-dir. regexp could be something like 'pkgname*' '*file*' or similar e.g. opkg info 'libstd*' or opkg search '*libop*' or opkg remove 'libncur*' root@OpenWrt:/# opkg install luci-app-multiwan Installing luci-app-multiwan (svn-r9868-1) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/luci-app-multiwan_svn-r9868-1_ar71xx.ipk. Installing multiwan (1.0.22-2) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/multiwan_1.0.22-2_ar71xx.ipk. Installing ip (3.9.0-3) to root... Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/ip_3.9.0-3_ar71xx.ipk. Installing iptables-mod-conntrack-extra (1.4.19.1-1) to root... Configuring ip. Configuring multiwan. Collected errors: * verify_pkg_installable: Only have 4kb available on filesystem /overlay, pkg iptables-mod-conntrack-extra needs 8 * opkg_install_cmd: Cannot install package luci-app-multiwan. root@OpenWrt:/# /etc/init.d/uhttpd enable ln: /etc/rc.d/S50uhttpd: No space left on device root@OpenWrt:/# cd /etc/init.d root@OpenWrt:/etc/init.d# ls 6relayd done luci_dhcp_migrate sysntpd boot dropbear luci_fixtime telnet cron firewall multiwan uhttpd defconfig led network umount dnsmasq log sysctl usb root@OpenWrt:/etc/init.d# ./uhttpd enable ln: /etc/rc.d/S50uhttpd: No space left on device root@OpenWrt:/etc/init.d# ./uhttpd start root@OpenWrt:/etc/init.d# exit