{"id":60522,"date":"2024-01-15T18:46:22","date_gmt":"2024-01-15T10:46:22","guid":{"rendered":"https:\/\/www.hcl-china.com\/?p=60522"},"modified":"2024-01-15T18:46:22","modified_gmt":"2024-01-15T10:46:22","slug":"%e5%8d%8e%e5%88%9b%e7%bf%bc%e8%81%94%e7%94%b5%e5%ad%90%e5%85%b3%e4%ba%8eopenwrt%e5%9b%ba%e4%bb%b6%e7%bc%96%e8%af%91%e7%9a%84%e7%8e%af%e5%a2%83%e6%90%ad%e5%bb%ba","status":"publish","type":"post","link":"https:\/\/www.hcl-china.com\/%e5%8d%8e%e5%88%9b%e7%bf%bc%e8%81%94%e7%94%b5%e5%ad%90%e5%85%b3%e4%ba%8eopenwrt%e5%9b%ba%e4%bb%b6%e7%bc%96%e8%af%91%e7%9a%84%e7%8e%af%e5%a2%83%e6%90%ad%e5%bb%ba\/","title":{"rendered":"\u534e\u521b\u7ffc\u8054\u7535\u5b50\u5173\u4e8eOPENWRT\u56fa\u4ef6\u7f16\u8bd1\u7684\u73af\u5883\u642d\u5efa"},"content":{"rendered":"

\u534e\u521b\u7ffc\u8054\u7814\u53d1\u90e8\u7ed9\u51fa\u7684\u5173\u4e8eOPENWRT\u56fa\u4ef6\u7f16\u8bd1\u7684\u73af\u5883\u642d\u5efa\u4e0e\u5f00\u53d1\u7f16\u8bd1\u5e94\u7528\uff0c\u56e0\u4e3a\u53d1\u5e03\u4eba\u4e0d\u61c2\u8f6f\u4ef6\uff0c\u4ee5\u4e0b\u4ec5\u4f9b\u53c2\u8003\uff1a<\/p>\n

\u7b2c\u4e00\u90e8\u5206\uff1a\u642d\u5efa\u7f16\u8bd1\u73af\u5883<\/p>\n

\u00b7 1\u3001\u5b89\u88c5Ubuntu\uff08\u7f16\u8bd1\u9700\u8981Linux\u73af\u5883\uff09\uff0c\u5230\u5176\u5b98\u7f51\u4e0b\u8f7d\uff0c\u7248\u672c\u6839\u636e\u81ea\u5df1\u6240\u9700\u9009\u62e9\u5373\u53ef\u3002\u53ef\u4ee5\u9009\u62e9\u5b89\u88c5\u5230\u865a\u62df\u673a\u6216\u8005\u7269\u7406\u673a\uff0c\u56fe\u5f62\u5316\u5b89\u88c5\u800c\u4e14\u662f\u4e2d\u6587\u7248\uff0c\u8fde\u5b89\u88c5\u90fd\u641e\u4e0d\u5b9a\u7684\uff0c\u53ef\u4ee5\u5173\u95ed\u672c\u9875\u9762\u4e86\uff1b
\n\u00b7 2\u3001\u4ee5\u975eroot\u7528\u6237\u767b\u9646\uff0c\u6253\u5f00\u201c\u5e94\u7528\u7a0b\u5e8f—-\u9644\u4ef6—-\u7ec8\u7aef\u201d\u3002
\n\u00b7 3\u3001\u5207\u8bb0\u4e0d\u8981\u6539\u52a8\u8f6f\u4ef6\u6e90\uff0c\u540c\u65f6\u6309\u4f4fCtrl + Alt + T\uff0c\u8c03\u51fa\u7ec8\u7aef\uff1b
\n\u00b7 4\u3001\u9010\u6761\u8f93\u5165\u4e0b\u5217\u547d\u4ee4\uff08\u53ca\u65f6\u9a8c\u8bc1\u662f\u5426\u5b89\u88c5\u6210\u529f\uff09\uff1a
\nsudo apt-get install g++
\nsudo apt-get install libncurses5-dev
\nsudo apt-get install zlib1g-dev
\nsudo apt-get install bison
\nsudo apt-get install flex
\nsudo apt-get install unzip
\nsudo apt-get install autoconf
\nsudo apt-get install gawk
\nsudo apt-get install make
\nsudo apt-get install gettext
\nsudo apt-get install gcc
\nsudo apt-get install binutils
\nsudo apt-get install patch
\nsudo apt-get install bzip2
\nsudo apt-get install libz-dev
\nsudo apt-get install asciidoc
\nsudo apt-get install subversion
\nsudo apt-get install sphinxsearch
\nsudo apt-get install libtool
\nsudo apt-get install sphinx-common<\/p>\n

\u534e\u521b\u7ffc\u8054\u7684\u73af\u5883\u642d\u5efa\u6307\u5bfc\u5c31\u5230\u8fd9\u5566\uff01\u8d76\u7d27\u8bd5\u8bd5\u5427\uff01<\/p>\n

\u7b2c\u4e8c\u90e8\u5206\uff1a\u4e0b\u8f7dOpenWrt\u6e90\u7801\u5e76\u7f16\u8bd1
\nOpenWrt\u6e90\u7801\u5206\u4e24\u79cd\uff0c\u4e00\u79cd\u662f\u6700\u65b0\u4f46\u4e0d\u662f\u6700\u7a33\u5b9a\u7684Trunk\u5f00\u53d1\u7248\uff0c\u4e00\u79cd\u662f\u6700\u7a33\u5b9a\u7684Backfire\u7248\uff0c\u5efa\u8bae\u4e0b\u8f7d\u5b98\u65b9\u6e90\u7801\u3002\u4e0b\u8f7d\u524d\u5148\u5728\u672c\u5730\u521b\u5efa\u6587\u4ef6\u5939\uff1a
\nmkdir openwrt
\nsudo chmod 777 openwrtcd openwrt
\n\u9009\u62e9\u4f60\u60f3\u8981\u7684\u7248\u672c\u7136\u540e\u6267\u884c\u4e0b\u8f7d\u547d\u4ee4\uff0c\u4e0b\u8f7d\u7ed3\u675f\u4f1a\u663e\u793a\u7248\u672c\u53f7\uff1a
\n(Barrier Breaker)\u7248\u4e0b\u8f7d\u547d\u4ee4\uff1a
\ngit clone git:\/\/git.openwrt.org\/14.07\/openwrt.git
\n\u6dfb\u52a0\u8f6f\u4ef6\u6269\u5c55\u5305\uff0c\u5c06feeds.conf.default\u4fee\u6539\u4e3afeeds.conf\uff1a
\ncp feeds.conf.default feeds.conf
\n\u66f4\u65b0\u6269\u5c55\uff0c\u5b89\u88c5\u6269\u5c55\uff1a
\n.\/scripts\/feeds update -a
\n.\/scripts\/feeds install -a
\n\u6ce8\uff1a\u5982\u679c\u4e0d\u662f\u521a\u4e0b\u8f7d\u7684\u6e90\u7801\uff0c\u4e3a\u4fdd\u6301\u4ee3\u7801\u4e3a\u6700\u65b0\u72b6\u6001\uff0c\u5e94\u5b9a\u671f\u8fd0\u884csvn update\u547d\u4ee4\u66f4\u65b0\u6e90\u7801\u3002
\n\u6d4b\u8bd5\u7f16\u8bd1\u73af\u5883\uff1a
\nmake defconfig
\nmake prereq
\n\u5230\u8fd9\u91cc\u5c31\u53ef\u4ee5\u5f00\u59cb\u7f16\u8bd1\u81ea\u5df1\u7684\u56fa\u4ef6\u4e86\u3002\u8fdb\u5165\u5b9a\u5236\u754c\u9762\uff1a
\nmake menuconfig
\n\u5982\u679c\u4e00\u5207\u6b63\u5e38\uff0c\u4f1a\u51fa\u73b0\u4e00\u4e2a\u914d\u7f6e\u83dc\u5355\uff0c\u53ef\u4ee5\u9009\u62e9\u8981\u7f16\u8bd1\u7684\u56fa\u4ef6\u5e73\u53f0\uff08\u82af\u7247\u7c7b\u578b\uff09\u3001\u578b\u53f7\uff0c\u8fd8\u80fd\u9009\u62e9\u56fa\u4ef6\u4e2d\u8981\u6dfb\u52a0\u7684\u529f\u80fd\u548c\u7ec4\u4ef6\uff0c\u914d\u7f6e\u597d\u540e\u4fdd\u5b58\u5e76\u9000\u51fa\u83dc\u5355\u5373\u53ef\u3002\u5982\u679c\u4f60\u60f3\u4fee\u6539\u6e90\u7801\uff0c\u5e94\u8be5\u5728\u6b64\u6b65\u8fdb\u884c\uff0c\u5982\u652f\u6301\u5927\u5bb9\u91cfFlash\u4e4b\u7c7b\u7684\u4fee\u6539\uff0c\u81ea\u5df1\u4e0a\u7f51\u67e5\u5230\u4fee\u6539\u4ec0\u4e48\u6587\u4ef6\u4ec0\u4e48\u5730\u65b9\u540e\uff0c\u5c31\u5728ubuntu\u56fe\u5f62\u754c\u9762\u4e0a\u8fdb\u53bb\u627e\u5230\u6587\u4ef6\uff0c\u53cc\u51fb\u6253\u5f00\u6587\u672c\u7f16\u8f91\u5668\u4fee\u6539\u4fdd\u5b58\u3002
\n\u5f00\u59cb\u7f16\u8bd1\uff1a
\nmake
\n\u6216\u8005
\nmake V=99
\n\u6216\u8005
\nmake -j V=99
\nmake\u662f\u7f16\u8bd1\u547d\u4ee4\uff0cV=99\u8868\u793a\u8f93\u51fadebug\u4fe1\u606f\uff0cV\u4e00\u5b9a\u8981\u5927\u5199\uff0c\u5982\u679c\u8981\u8ba9CPU\u5168\u901f\u7f16\u8bd1\uff0c\u5c31\u52a0\u4e0a -j \u53c2\u6570\uff0c\u7b2c\u4e00\u6b21\u7f16\u8bd1\u6700\u597d\u4e0d\u5e26-j\u53c2\u6570\u3002
\n\u7f16\u8bd1\u8fc7\u7a0b\u8981\u4fdd\u6301\u8054\u7f51\uff0c\u6700\u597d\u662f\u901a\u8fc7VPN\u6216\u8005\u4ee3\u7406\u7ffb\u5899\uff0c\u4f1a\u4ece\u7f51\u4e0a\u4e0b\u8f7d\u4e00\u4e9b\u6e90\u7801\u5305\uff0c\u6240\u4ee5\u65ad\u7f51\u53ef\u80fd\u4f1a\u9020\u6210\u7f16\u8bd1\u4e2d\u65ad\uff0c\u7f16\u8bd1\u6240\u9700\u65f6\u95f4\u4e0e\u7535\u8111CPU\u4ee5\u53ca\u7f51\u7edc\u73af\u5883\u6709\u5f88\u5927\u7684\u5173\u7cfb\uff0c\u7b2c\u4e00\u6b21\u7f16\u8bd1\u65f6\u95f4\u8f83\u4e45\uff0c\u7f16\u8bd1\u5b8c\u6210\u540e\u5728\u6e90\u7801\u6587\u4ef6\u91cc\u7c73\u62ff\u51fa\u73b0bin\u6587\u4ef6\u5939\uff0c\u5982\u679c\u4f60\u624b\u91cc\u7684\u8def\u7531\u662f\u539f\u7248\u56fa\u4ef6\u9700\u8981\u5237openWRT\u9700\u8981\u9009\u7528xxx-factory.bin\u56fa\u4ef6\uff0c\u5982\u679c\u8def\u7531\u5df2\u7ecf\u5237\u4e86openWRT\uff0c\u9009\u7528\u5347\u7ea7\u56fa\u4ef6xxx-sysupdrade.bin\u5347\u7ea7\u7528\uff0c\u5728\u5347\u7ea7\u754c\u9762\u5347\u7ea7\u5373\u53ef\u3002\u8fdb\u5230\u6587\u4ef6\u5939\u627e\u5230\u6240\u9700\u56fa\u4ef6\u4f20\u51fa\uff0c\u5373\u53ef\u5237\u673a\u3002
\n\u7b2c\u4e09\u90e8\u5206\uff1a\u5c06OpenWrt\u5237\u5165\u8def\u7531\u5668<\/p>\n

\u8981\u5728\u8def\u7531\u5668\u4e0a\u4f7f\u7528openWRT\uff0c\u9996\u5148\u8981\u5c06\u8def\u7531\u5668\u5237\u65b0\u4e3aopenWRT,\u5373\u5411\u803d\u4e8eopenWRT\u7cfb\u7edf\u7684\u5b89\u88c5\uff0c\u4e0d\u540c\u578b\u53f7\u7684\u8def\u7531\u5668\u7684\u5b89\u88c5\u65b9\u6cd5\u53ef\u80fd\u4e5f\u4f1a\u4e0d\u4e00\u6837\uff0c\u4f46\u4e00\u822c\u5e38\u7528\u7684\u6709\u4e09\u79cd\u65b9\u6cd5\uff1a
\n\u00b7 Web\u56fa\u4ef6\u4e0a\u4f20
\n\u00b7 PFTP\u4e0a\u4f20\u56fa\u4ef6\u66f4\u65b0
\n\u00b7 \u7f16\u7a0b\u5668\u5199\u5165\u56fa\u4ef6
\n\u5177\u4f53\u578b\u53f7\u7684\u8def\u7531\u5668\u9002\u7528\u4e8e\u54ea\u79cd\u6216\u54ea\u51e0\u79cd\u65b9\u6cd5\uff0c\u53ef\u81ea\u884c\u5c1d\u8bd5\u3002<\/p>\n

\u534e\u521b\u7ffc\u8054\u7535\u5b50\u7684\u5237\u673a\u6a21\u5f0f\u5c31\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u8981\u901a\u8fc7\u7f51\u53e3\u5c31\u53ef\u4ee5\u8fdb\u884c\u5feb\u6377\u5237\u673a\uff0c\u53c2\u8003\u4ee5\u4e0b\u56fe\u7247\u6b65\u9aa4\uff1a<\/p>\n

\"\"<\/p>\n

\u7b2c\u56db\u90e8\u5206\uff1a\u5f00\u59cb\u4f7f\u7528OpenWrt<\/p>\n

\u8981\u5bf9OpenWrt\u8fdb\u884c\u914d\u7f6e\uff0c\u4e00\u822c\u6709\u4e24\u6761\u9014\u5f84\uff1a
\n\u00b7 SSH\u767b\u5f55\u901a\u8fc7\u547d\u4ee4\u884c\u63a7\u5236
\n\u00b7 Web\u767b\u5f55\u901a\u8fc7Web\u754c\u9762\u8bbe\u7f6e
\n\u9996\u6b21\u5b89\u88c5openWRT\u540e\uff0c\u9700\u8981\u8bbe\u7f6e\u5bc6\u7801\u624d\u53ef\u4ee5\u4f7f\u7528SSH\u767b\u5f55\uff0c\u65b9\u6cd5\u662f\u4f7f\u7528telnet\u767b\u5f55\u6216\u8005WEB\u767b\u5f55\u8bbe\u7f6e\u5bc6\u7801\uff0c\u767b\u5f55\u65f6\u4f7f\u7528:
\nssh root@192.168.1.1
\nopenWRT\u4f7f\u7528\u7684\u547d\u4ee4\u548c\u5e38\u89c1Linux\u53d1\u884c\u7248\u547d\u4ee4\u76f8\u4f3c\uff0c\u5305\u7ba1\u7406\u5668\u4f7f\u7528\u7684Debian\u98ce\u683c\u7684\u5e95\u5c42\u5305\u7ba1\u7406\u5668dpkg\uff0c\u5e38\u7528\u64cd\u4f5c\u547d\u4ee4:
\n\u00b7 opkg udate \/\/\u66f4\u65b0\u8f6f\u4ef6\u5305\u5217\u8868
\n\u00b7 opkg install \/\/\u5728\u7ebf\u5b89\u88c5\u8f6f\u4ef6\u5305
\n\u00b7 opkg remove \/\/\u79fb\u9664\u8f6f\u4ef6\u5305<\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

\u534e\u521b\u7ffc\u8054\u7814\u53d1\u90e8\u7ed9\u51fa\u7684\u5173\u4e8eOPENWRT\u56fa\u4ef6\u7f16\u8bd1\u7684\u73af\u5883\u642d\u5efa\u4e0e\u5f00\u53d1\u7f16\u8bd1\u5e94\u7528\uff0c\u56e0\u4e3a\u53d1\u5e03\u4eba\u4e0d\u61c2\u8f6f\u4ef6\uff0c\u4ee5\u4e0b\u4ec5\u4f9b\u53c2\u8003\uff1a \u7b2c […]<\/p>\n","protected":false},"author":1,"featured_media":59926,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[214],"tags":[272,270,271,273],"_links":{"self":[{"href":"https:\/\/www.hcl-china.com\/wp-json\/wp\/v2\/posts\/60522"}],"collection":[{"href":"https:\/\/www.hcl-china.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hcl-china.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hcl-china.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hcl-china.com\/wp-json\/wp\/v2\/comments?post=60522"}],"version-history":[{"count":1,"href":"https:\/\/www.hcl-china.com\/wp-json\/wp\/v2\/posts\/60522\/revisions"}],"predecessor-version":[{"id":60524,"href":"https:\/\/www.hcl-china.com\/wp-json\/wp\/v2\/posts\/60522\/revisions\/60524"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hcl-china.com\/wp-json\/wp\/v2\/media\/59926"}],"wp:attachment":[{"href":"https:\/\/www.hcl-china.com\/wp-json\/wp\/v2\/media?parent=60522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hcl-china.com\/wp-json\/wp\/v2\/categories?post=60522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hcl-china.com\/wp-json\/wp\/v2\/tags?post=60522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}