1.å¦ä½ç¼è¯OpenWrt
2.OpenWrt简明使用手册
å¦ä½ç¼è¯OpenWrt
ããOpenwrt å®æ¹æ£å¼çåè¡çæ¯å·²ç¼è¯å¥½äºçæ åæ件ï¼åç¼åbinætrxãtrx2ï¼ï¼æ¤æ åæ件å¯ä»Openwrtå®æ¹ç½ç«çä¸è½½é¡µé¢ä¸è½»æ¾è·åå°ï¼è¿æ¥å°å为 OpenWrtå®æ¹ç½ç«ãè¿äºç¼è¯å¥½çæ åæ件æ¯åºäºé»è®¤çé 置设置ï¼ä¸åªé对åæ¯æçå¹³å°æ设å¤çãå æ¤ï¼ä¸ºä»ä¹è¦æé ä¸ä¸ªèªå·±çæ åæ件ï¼çç±æ以ä¸åç¹ï¼
ããæ¨æ³æ¥æä¸ä¸ªä¸ªæ§åçé ç½®OpenWrtï¼å½°æ¾ä¸ªæ§ï¼å¨æåååéæ¾ææ¾æï¼å¼ä¸ªç©ç¬ï¼ï¼
ããæ¨æ³å¨å®éªæ§çå¹³å°ä¸æµè¯OpenWrtï¼
ããæ¨åä¸æµè¯æåä¸å¼åOpenWrtçå·¥ä½ï¼
ããæè ï¼æç®åçç®çå°±æ¯ä¸ºäºä¿æèªå·±çOpenwrt为ææ°çæ¬ï¼
ããè¥æ³å®ç°ä¸è¿°ç®çï¼å ¶å®å¾ç®åï¼æä¸è¿°æåå³å¯æåç¼è¯åºä¸ä¸ªæ¨çOpenwrtæ¥ã
ããåå¤å·¥ä½
ããå¨å¼å§ç¼è¯Openwrtä¹åéè¦æ¨åäºåå¤å·¥ä½ï¼ä¸å ¶ä»ç¼è¯è¿ç¨ä¸æ ·ï¼ç±»ä¼¼çç¼è¯å·¥å ·åç¼è¯ç¯å¢æ¯å¿ ä¸å¯å°çï¼
ããä¸ä¸ªæ建OpenWrtæ åçç³»ç»å¹³å°ï¼ç®å说就æ¯åå¤ä¸ä¸ªæä½ç³»ç»ï¼æ¯å¦UbuntuãDebiançï¼ï¼
ããç¡®ä¿å®è£ äºæéçä¾èµå ³ç³»åºï¼ ï¼å¨debianç³»ç»ä¸å°±æ¯å®è£ åç§éè¦ç软件å ï¼
ããOpenWrtæºä»£ç å¯æ¬
ããé¦å ï¼ å¼æºç»éå°æ¯æç¼è¯Openwrtçæä½ç³»ç»ï¼åºè¯äºï¼ãå®ä½æºæè èææº(Vmware æè Qemu)éçæä½ç³»ç»é½è¡ï¼è¿éæ¨è使ç¨Linuxç³»ç»ã bsdåmac osxç³»ç»ä¹å¯ä»¥ç¼ï¼ä½ä¸æ¨èï¼ä¸æªéªè¯æ¯å¦å¯ç¼è¯æåãä¸æåå®æ¨ä½¿ç¨çæ¯Debianæä½ç³»ç»ï¼ä½¿ç¨ apt-get æ¥ç®¡çå . æ¿ä»£çéæ©æ¯ Ubuntu (åæ¯ Kubuntu,码获 Xubuntu çå³å¯)ã
ãã第äºæ¥, å°±æ¯å®è£ æéè¦çåç§è½¯ä»¶å , å æ¬ç¼è¯å¨,解åå·¥å ·,ç¹å®çåºç. è¿äºå·¥ä½å¯ä»¥ç®åçéè¿é®å ¥ä»¥ä¸å½ä»¤ (é常éè¦root æè æ¯ sudo æé)ï¼ä»¥rootæéå®è£ ä¸å软件å (å¯è½å¹¶ä¸å®æ´ï¼ä¼ææ示ï¼æ示缺å°å³è£ å°±å¯ä»¥äºï¼:
ããä½(x)请æ§è¡ä¸åå½ä»¤:
ãã# apt-get install build-essential asciidoc binutils bzip2 gawk gettext \
ããgit libncurses5-dev libz-dev patch unzip zlib1g-dev
ãã
ããä½(x_)请æ§è¡ä¸åå½ä»¤ï¼å¤è£ äºåªäºåºæ软件å å¢ï¼è¯·æ¨ä»ç»çä¸çå¦ï¼:
ãã# apt-get install build-essential asciidoc binutils bzip2 gawk gettext \
ããgit libncurses5-dev libz-dev patch unzip zlib1g-dev ia-libs \
ããlibgcc1 libc6-dev-i
ãã
ããåè æ¬åè¡¨ä¸ æåçç¼è¯ç¯å¢æéè¦è½¯ä»¶å æåºã
ããæäºä¾èµç为åºæ软件å ä¹è®¸æä½ç³»ç»ä¸å·²ç»å®è£ è¿ï¼æ¤æ¶apt-getä¼ä½åºæ示ï¼æ示æ¨å¿½ç¥æéæ°å®è£ çï¼ï¼å«ç´§å¼ ï¼æ¾è½»æ¾äºï¼ç¼è¯Openwrtä¸ä¼åç¼è¯DDï¼WRTé£æ ·é¾çï¼è³å°æ¬äººæ¯ä½ä¼å°äºç¼è¯DDï¼WRTçé¾ï¼ã
ããæåä¸è½½ä¸ä»½å®æ´ç Openwrt æºç å°ç¼è¯ç¯å¢ä¸ãå ³äºOpenwrtçæºä»£ç ä¸è½½ï¼éå¾æäºï¼ä¸æ¯éè¿ svn ï¼ä¸æ¯éè¿ gitï¼å»ºè®®ä½¿ç¨ svn ï¼å 为Openwrt主è¦ä»¥ svn æ¥ç»´æ¤Openwrtç³»ç»ççæ¬ãå¦å¤ï¼è¯·æ³¨æOpenwrtä¸ä¸åçåæ¯çæ¬ï¼ä¸ä¸ªæ¯ç¨å¾è¾å¤çå¼åå¿«ç §ï¼ä¿ç§° trunkï¼äºæ¯ç¨³å®çï¼ä¿ç§° backfireã
ããå®è£ Subversion
ããè¥ä½ æ³éè¿svnä¸è½½æºä»£ç ,ä½ éå®è£ SubversionãSubversion,æ称SVN, æ¯OpenWrtçprojectä¸ç¨æ¥æ§å¶çæ¬çç³»ç»,å®é常类似ç CVSççé¢å使ç¨æ¡æ¬¾ã æ§è¡ä¸è¿°å½ä»¤å³å¯å®è£ SVNï¼å¾å®¹æçï¼
ãã# apt-get install subversion
ãã
ããSubversionå®è£ å®æ¯ï¼éè¿SVNå½ä»¤å¯è·åå¾å°ä¸ä»½OpenWrt纯åæºä»£ç ãæ¨è¿å¾å建ä¸ä¸ªç®å½ä»¥ä¾¿åæ¾è·åå¾å°çOpenwrtæºä»£ç ï¼è¦è·åæºä»£ç ä½ è¿å¾è¾å ¥subversionå½ä»¤æ¥è·å (svnéè¿ç§æä½ç§°ä¹ä¸º'check out') ãå½ä»¤å¾ç®åçï¼ç»§ç»çä¸å»å°±è½è§å°äºï¼å«çæ¥ï¼èå¿ç¹å¿ã
ããç¼è¯æµç¨
ããç¼è¯ä¸å±äºæ¨ç设å¤çç¹å®Openwrtåºä»¶ä»¥ä¸ä¸äºä¸ªæ¥éª¤ï¼
ããéè¿Subversionå½ä»¤è·å¾æºä»£ç ï¼
ããæ´æ°(æå®è£ ) package feedsãpackage feedsæ æ³ç¡®åç¿»è¯ï¼å¾ è¯å§ï¼ï¼
ããå建ä¸ä¸ªé»è®¤é 置以æ£æ¥ç¼è¯ç¯å¢æ¯å¦æå»ºå¥½äº (åå¦éè¦çè¯)ï¼
ããç¨Menuconfigæ¥é ç½®å³å°ç¼è¯çæçåºä»¶æ åæ件çé 置项ï¼
ããæåå¼å§ç¼è¯åºä»¶ï¼
ããä¸è½½æºä»£ç
ããæåï¼ä¸è½½ä¸ä»½å®æ´çOpenWrtæºä»£ç ãä½ å¯éæ©ï¼
ããä¸è½½ç¨³å®åè¡çï¼æ
ããä¸è½½å¼åç (ä¿ç§°"trunk"ç)ã
ãã使ç¨åè¡ççæºç
ããæªæ¢æ¬ææ¶, Openwrtå ¬å¼åè¡ç稳å®ç为 OpenWrt . "backfire"ãæ¤çæ¬æ¯æ稳å®çï¼ä½ä¹è®¸ä¸å æ¬ææ°æ´æ°çè¡¥ä¸æææ°ç¼åçåºçæ°åè½ã
ããä¸è¿°ä»£ç å³ä¸¾ä¾è¯´æäºéè¿svnä»brandkfireè·å¾backfireæºä»£ç ï¼æ¤çæ¬æææ¯ä»trunkåæ¯çè¡¥ä¸ä¹å¨backfireçæ¬ä¸äºï¼å³å å«ä¿®å¤è¡¥ä¸ï¼ï¼
ãã# mkdir OpenWrt/
ãã# cd OpenWrt/
ãã# svn co svn://svn.openwrt.org/openwrt/branches/backfire
ãã
ãã注解: ä¸è¿°svnå½ä»¤å°å¨å½åç®å½å建ä¸ä¸ª OpenWrt/backfire/ åç®å½ï¼æ¤ç®å½å å«æ¤å½ä»¤è·åå°çæºä»£ç ã
ããæ¨ä¹å¯ä»¥éè¿ä¸è¿°å½ä»¤ï¼ä¸è½½ä¸å«ä¿®å¤è¡¥ä¸çbackfireçåçæºç ï¼
ãã# svn co svn://svn.openwrt.org/openwrt/tags/backfire_.
ãã
ãã使ç¨å¼åçæºä»£ç
ããå½åçå¼åçæ¬åæ¯(trunk)å·²å å«ææ°çå®éªè¡¥ä¸ãæ¤åæ¯æ许è¿çªç ´äºOpenwrtåæ¥æä¸æ¯æç硬件设å¤çéå¶å¦ï¼æåçåæ¶ä¹æé£é©åå¨ãå æ¤ï¼ç¼è¯trunkçï¼æ ä¹ï½
ãã# mkdir OpenWrt/
ãã# cd OpenWrt/
ãã# svn co svn://svn.openwrt.org/openwrt/trunk/
ãã
ããæ´å¤è¯¦ç»èµæ详è§ï¼ binations might break the build process, so it can take some experimentation before the expected result is reached. Added to this, the OpenWrt developers are themselves only maintaining a smaller set of packages â which includes all default packages â but, the feeds-script makes it very simple to handle a locally maintained set of packages and integrate them in the build-process.
ããåå¦ä½ éè¦LuCI, è¦å°Administration èåé,å¨LuCIç»ä»¶çåèåä¸, 并éæ©: luci-admin-core, luci-admin-full, and luci-admin-miniç»ä»¶å ã
ããåå¦ä½ ä¸éè¦PPP,ä½ å¯å°Networkèåä¸åæ¶å¯¹å®çéæ©ï¼ä»¥ä¾¿ç¼è¯æ¶ä¸å å«æ¤ç»ä»¶ã
ããMenuconfigç¨æ³: ç¡®ä¿è¿äºç»ä»¶å æ¯ä»¥ '*'æå·æ è®°èä¸æ¯ 'M'æ è®°ã
ããå¦æä½ æ¯ä»¥æå· '*'æ 记该ç»ä»¶å , å该ç»ä»¶å å°ç¼è¯è¿æç»çæçOpenWrtåºä»¶ä¸ã
ããå¦æä½ ä» ä»¥ 'M'æ 记该ç»ä»¶å , å该ç»ä»¶å å°ä¸ä¼ç¼è¯è¿æç»çæçOpenWrtåºä»¶ä¸ã
ããThe final step before the process of compiling the intended image(s) is to exit 'menuconfig' â this also includes the option to save a specific configuration or load an already existing, and pre-configured, version.
ããExit and save.
ããSource Mirrors
ããThe 'Build system settings' include some efficient options for changing package locations which makes it easy to handle a local package set:
ããLocal mirror for source packages
ããDownload folder
ããIn the case of the first option, you simply enter a full URL to the web or ftp server on which the package sources are hosted. Download folder would in the same way be the path to a local folder on the build system (or network). If you have a web/ftp-server hosting the tarballs, the OpenWrt build system will try this one before trying to download from the location(s) mentioned in the Makefiles . Similar if a local 'download folder', residing on the build system, has been specified. The 'Kernel modules' option is required if you need specific (non-standard) drivers and so forth â this would typically be things like modules for USB or particular network interface drivers etc.
ããç¼è¯åºä»¶
ããä¸äºå ·å¤ï¼åªæ¬ ä¸é£,éè¿ä¸é¢ç®åçmakeå½ä»¤æ¥ç¼è¯:
ãã# make
ãã
ããå¨å¤æ ¸çµèä¸ç¼è¯
ããå ·æå¤æ ¸CPUå¤çå¨ççµèè¿è¡ç¼è¯ï¼ä½¿ç¨ä¸è¿°åæ°å¯ä»¤ç¼è¯è¿ç¨å éã 常è§ç¨æ³ä¸º <æ¨cpuå¤çå¨çæ°ç® + 1> â ä¾å¦ä½¿ç¨3è¿ç¨æ¥ç¼è¯ (å³åæ ¸CPU), å½ä»¤ååæ°å¦ä¸:
ãã# make -j 3
ãã
ããåå°ç¼è¯
ããè¥ä½ å¨è¿ä¸ªç³»ç»å ç¼è¯OpenWrtçåæ¶è¿å¤çå ¶ä»ï¼å¯ä»¥è®©é²ç½®çI/OåCPUæ¥å¨åå°ç¼è¯åºä»¶ (åæ ¸CPU):
ãã# ionice -c 3 nice -n make -j 2
ãã
ããç¼è¯ç®åçåºæ¬ç软件å
ããå½ä½ 为OpenWrtå¼åææå 软件å ,ç¼è¯ç®åçåºæ¬ç软件å å¯ä»¥å¾è½»æå°ç¼è¯è¯¥è½¯ä»¶å (ä¾å¦ï¼ 软件å cups):
ãã# make package/cups/compile V=
ãã
ããä¸ä¸ªå¨Feedséç软件å 大约æ¯è¿æ ·åç:
ãã# make package/feeds/packages/ndyndns/compile V=
ãã
ããç¼è¯é误
ããå¦æå æç§ä¸ç¥éçåå èç¼è¯å¤±è´¥,ä¸é¢æç§ç®åçæ¹æ³æ¥å¾ç¥ç¼è¯å°åºéå¨åªéäº:
ãã# make V= 2>&1 |tee build.log |grep -i error
ãã
ããä¸è¿°ç¼è¯å½ä»¤æ为ï¼Våæ°ï¼å°åºéä¿¡æ¯ä¿åå¨build.logï¼çæè¾åºå®æ´è¯¦ç»çå¯æ¬ï¼with stdout piped to stderrï¼ï¼åªæå¨å±å¹ä¸æ¾ç¤ºçé误ã
ãã举ä¾è¯´æ:
ãã# ionice -c 3 nice -n make -j 2 V= CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
ãã|tee build.log |egrep -i '(warn|error)'
ãã
ããThe above saves a full verbose copy of the build output (with stdout piped to stderr) in build.log and outputs only warnings and errors while building using only background resources on a dual core CPU.
ããä¸é®ç¼è¯
ããå³ä½¿ç¨èæ¬æ¥ç¼è¯Openwrtåºä»¶ã许å¤æåç¼è¯Openwrtæ¯ç¨çèæ¬æ¥ç¼è¯çï¼è¯¦è§: https://forum.openwrt.org/viewtopic.php?id=
ããçæçåºä»¶å¨åª
ããç¼è¯æååæçæçåºä»¶æ件ä½äºbinç®å½ä¸ï¼å¯ç¨å¦ä¸å½ä»¤æ¥çï¼
ãã# cd bin/
ãã# ls */
ãã
ããæ¸ ç
ããç¼è¯OpneWrtæ¶ä½ å¯è½éè¦ä¸ä¸ªæ¸ æ´å¹²åçç¼è¯ç¯å¢ã 以ä¸æä½æå©ç¨ç¼è¯å·¥ä½:
ããæ¸ æ´
ããæ¸ æ´trunk/ ç®å½ï¼å¨ç¼è¯è¿ç¨ä¸ä½¿ç¨âmake cleanâå½ä»¤å³å¯ã æ¤å½ä»¤å°å é¤binç®å½åbuild_dirç®å½ä¸çæææ件åæ件夹ã
ãã## See CAUTION below
ãã# make clean
OpenWrt简明使用手册
欢迎探索OpenWrt的魅力,这款强大的码获路由器固件,专为工业控制和智能家居设备量身打造。码获它的码获核心特性在于其模块化设计和高度自定义的Linux系统,让你能够根据需求轻松定制和扩展功能。码获OpenWrt不仅支持RIP和OSPF等多种路由协议,码获阅读hadoop源码还具备DMZ、码获VLAN以及全面的码获网络安全防火墙功能,确保您的码获网络连接稳定且安全。 要开始你的码获OpenWrt之旅,首先从GitHub仓库获取源代码,码获利用BuildRoot构建系统,码获这里你可以自由选择处理器平台和优化的码获抢麻将位置源码LuCI界面。更新固件既可以通过串口连接电脑,码获设置为波特率,码获按任意键中断固件加载,也可以通过Web界面方便操作,如登录..1.1进行刷新。而在VLAN配置上,云端云悟空源码OpenWrt支持细致的接口划分和管理,例如,使用uci set命令为eth1.1和eth1.2创建VLAN接口,设置静态IP和DHCP服务,然后将其加入到防火墙的lan区域,只需几个步骤即可完成。tomcat源码断点调试 具体操作如下:使用uci set配置VLAN接口,如:eth1.1: ..3.1/,eth1.2: 静态IP
在lan2接口上设置DHCP范围,如:dhcp lan2: start=, limit=, leasetime=h
将lan2加入防火墙lan区域
提交更改并重启路由器以应用新配置
在更复杂的网络配置中,OpenWrt的Routing套件Quagga是你的得力助手,支持动态路由协议如RIP和OSPF,亚马逊接单平台源码其vtysh管理工具提供了一体化的配置界面。例如,为了配置RIP,你需要编辑ripd.conf,更改网络地址后重启服务,并确保防火墙设置允许动态路由更新。 同时,OpenWrt的OSPF支持快速收敛和自动路由计算,通过设置ospfd.conf配置文件和邻居路由器的同步,你可以轻松实现OSPF区域的管理。多播路由方面,OpenWrt通过igmpproxy代理支持,确保多媒体流的顺畅传输。防火墙方面,OpenWrt的firewall3组件提供高级的iptables规则管理和保护,无论是状态检测、NAT还是DMZ设置,都可通过UCI配置或LuCI界面进行直观配置。 总的来说,OpenWrt以其灵活性和定制性,为你的网络设备提供了强大的控制力。无论你是网络新手还是高级用户,都能在OpenWrt的世界里找到适合自己的解决方案。现在就开启你的OpenWrt之旅,探索无限可能吧!