{"id":43484,"date":"2024-10-05T19:02:47","date_gmt":"2024-10-05T11:02:47","guid":{"rendered":"https:\/\/server.hk\/cnblog\/43484\/"},"modified":"2024-10-05T19:02:47","modified_gmt":"2024-10-05T11:02:47","slug":"centos-%e6%90%ad%e5%bb%ba-openwrt-%e9%96%8b%e7%99%bc%e7%92%b0%e5%a2%83","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/43484\/","title":{"rendered":"CentOS \u642d\u5efa Openwrt \u958b\u767c\u74b0\u5883"},"content":{"rendered":"<h1 id=\"centos-%e6%90%ad%e5%bb%ba-openwrt-%e9%96%8b%e7%99%bc%e7%92%b0%e5%a2%83-jduGGOVQTK\">CentOS \u642d\u5efa OpenWrt \u958b\u767c\u74b0\u5883<\/h1>\n<p>OpenWrt \u662f\u4e00\u500b\u57fa\u65bc Linux \u7684\u5d4c\u5165\u5f0f\u64cd\u4f5c\u7cfb\u7d71\uff0c\u4e3b\u8981\u7528\u65bc\u8def\u7531\u5668\u548c\u5176\u4ed6\u7db2\u7d61\u8a2d\u5099\u3002\u5b83\u63d0\u4f9b\u4e86\u9ad8\u5ea6\u7684\u53ef\u5b9a\u5236\u6027\u548c\u9748\u6d3b\u6027\uff0c\u9069\u5408\u958b\u767c\u8005\u9032\u884c\u5404\u7a2e\u7db2\u7d61\u61c9\u7528\u7684\u958b\u767c\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u5728 CentOS \u7cfb\u7d71\u4e0a\u642d\u5efa OpenWrt \u958b\u767c\u74b0\u5883\uff0c\u5e6b\u52a9\u958b\u767c\u8005\u5feb\u901f\u4e0a\u624b\u3002<\/p>\n<h2 id=\"%e7%92%b0%e5%a2%83%e6%ba%96%e5%82%99-jduGGOVQTK\">\u74b0\u5883\u6e96\u5099<\/h2>\n<p>\u5728\u958b\u59cb\u4e4b\u524d\uff0c\u78ba\u4fdd\u4f60\u7684 CentOS \u7cfb\u7d71\u5df2\u7d93\u66f4\u65b0\u5230\u6700\u65b0\u7248\u672c\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u9032\u884c\u66f4\u65b0\uff1a<\/p>\n<pre><code>sudo yum update<\/code><\/pre>\n<p>\u63a5\u4e0b\u4f86\uff0c\u5b89\u88dd\u4e00\u4e9b\u5fc5\u8981\u7684\u4f9d\u8cf4\u5305\uff0c\u5305\u62ec Git\u3001GCC\u3001Make \u548c\u5176\u4ed6\u958b\u767c\u5de5\u5177\uff1a<\/p>\n<pre><code>sudo yum groupinstall \"Development Tools\"<\/code><\/pre>\n<pre><code>sudo yum install git wget unzip<\/code><\/pre>\n<h2 id=\"%e4%b8%8b%e8%bc%89-openwrt-%e6%ba%90%e7%a2%bc-jduGGOVQTK\">\u4e0b\u8f09 OpenWrt \u6e90\u78bc<\/h2>\n<p>\u4f7f\u7528 Git \u4e0b\u8f09 OpenWrt \u7684\u6e90\u78bc\u3002\u4f60\u53ef\u4ee5\u9078\u64c7\u4e0b\u8f09\u6700\u65b0\u7684\u7a69\u5b9a\u7248\u672c\u6216\u958b\u767c\u7248\u672c\u3002\u4ee5\u4e0b\u662f\u4e0b\u8f09\u6700\u65b0\u7a69\u5b9a\u7248\u672c\u7684\u547d\u4ee4\uff1a<\/p>\n<pre><code>git clone https:\/\/git.openwrt.org\/openwrt\/openwrt.git<\/code><\/pre>\n<p>\u4e0b\u8f09\u5b8c\u6210\u5f8c\uff0c\u9032\u5165 OpenWrt \u7684\u76ee\u9304\uff1a<\/p>\n<pre><code>cd openwrt<\/code><\/pre>\n<h2 id=\"%e8%a8%ad%e7%bd%ae%e9%96%8b%e7%99%bc%e7%92%b0%e5%a2%83-jduGGOVQTK\">\u8a2d\u7f6e\u958b\u767c\u74b0\u5883<\/h2>\n<p>\u5728 OpenWrt \u76ee\u9304\u4e2d\uff0c\u904b\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u66f4\u65b0\u548c\u5b89\u88dd\u6240\u6709\u5fc5\u8981\u7684\u5305\uff1a<\/p>\n<pre><code>.\/scripts\/feeds update -a<\/code><\/pre>\n<pre><code>.\/scripts\/feeds install -a<\/code><\/pre>\n<p>\u9019\u4e9b\u547d\u4ee4\u5c07\u6703\u81ea\u52d5\u4e0b\u8f09\u548c\u5b89\u88dd OpenWrt \u6240\u9700\u7684\u6240\u6709\u4f9d\u8cf4\u5305\u3002<\/p>\n<h2 id=\"%e9%85%8d%e7%bd%ae-openwrt-jduGGOVQTK\">\u914d\u7f6e OpenWrt<\/h2>\n<p>\u5728\u7de8\u8b6f\u4e4b\u524d\uff0c\u4f60\u9700\u8981\u914d\u7f6e OpenWrt\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u9032\u5165\u914d\u7f6e\u754c\u9762\uff1a<\/p>\n<pre><code>make menuconfig<\/code><\/pre>\n<p>\u5728\u9019\u500b\u754c\u9762\u4e2d\uff0c\u4f60\u53ef\u4ee5\u9078\u64c7\u76ee\u6a19\u8a2d\u5099\u3001\u5167\u6838\u7248\u672c\u548c\u5176\u4ed6\u9078\u9805\u3002\u9078\u64c7\u5b8c\u6210\u5f8c\uff0c\u4fdd\u5b58\u4e26\u9000\u51fa\u3002<\/p>\n<h2 id=\"%e7%b7%a8%e8%ad%af-openwrt-jduGGOVQTK\">\u7de8\u8b6f OpenWrt<\/h2>\n<p>\u914d\u7f6e\u5b8c\u6210\u5f8c\uff0c\u53ef\u4ee5\u958b\u59cb\u7de8\u8b6f OpenWrt\u3002\u904b\u884c\u4ee5\u4e0b\u547d\u4ee4\u958b\u59cb\u7de8\u8b6f\u904e\u7a0b\uff1a<\/p>\n<pre><code>make<\/code><\/pre>\n<p>\u7de8\u8b6f\u904e\u7a0b\u53ef\u80fd\u9700\u8981\u4e00\u4e9b\u6642\u9593\uff0c\u5177\u9ad4\u53d6\u6c7a\u65bc\u4f60\u7684\u7cfb\u7d71\u6027\u80fd\u3002\u7de8\u8b6f\u5b8c\u6210\u5f8c\uff0c\u751f\u6210\u7684\u56fa\u4ef6\u5c07\u6703\u5728 <code>bin\/targets<\/code> \u76ee\u9304\u4e0b\u3002<\/p>\n<h2 id=\"%e6%b8%ac%e8%a9%a6%e5%92%8c%e9%83%a8%e7%bd%b2-jduGGOVQTK\">\u6e2c\u8a66\u548c\u90e8\u7f72<\/h2>\n<p>\u7de8\u8b6f\u5b8c\u6210\u5f8c\uff0c\u4f60\u53ef\u4ee5\u5c07\u751f\u6210\u7684\u56fa\u4ef6\u4e0a\u50b3\u5230\u8def\u7531\u5668\u9032\u884c\u6e2c\u8a66\u3002\u4f7f\u7528 SCP \u6216\u5176\u4ed6\u6587\u4ef6\u50b3\u8f38\u5de5\u5177\u5c07\u56fa\u4ef6\u4e0a\u50b3\u5230\u8def\u7531\u5668\uff0c\u7136\u5f8c\u901a\u904e\u8def\u7531\u5668\u7684\u7ba1\u7406\u754c\u9762\u9032\u884c\u5347\u7d1a\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-jduGGOVQTK\">\u7e3d\u7d50<\/h2>\n<p>\u5728 CentOS \u4e0a\u642d\u5efa OpenWrt \u958b\u767c\u74b0\u5883\u7684\u904e\u7a0b\u76f8\u5c0d\u7c21\u55ae\uff0c\u53ea\u9700\u5e7e\u500b\u6b65\u9a5f\u5373\u53ef\u5b8c\u6210\u3002\u9019\u70ba\u958b\u767c\u8005\u63d0\u4f9b\u4e86\u4e00\u500b\u9748\u6d3b\u7684\u74b0\u5883\u4f86\u958b\u767c\u548c\u6e2c\u8a66\u5404\u7a2e\u7db2\u7d61\u61c9\u7528\u3002\u5982\u679c\u4f60\u9700\u8981\u7a69\u5b9a\u7684\u4f3a\u670d\u5668\u4f86\u9032\u884c\u958b\u767c\uff0c\u8003\u616e\u4f7f\u7528 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u670d\u52d9\uff0c\u9019\u5c07\u70ba\u4f60\u7684\u958b\u767c\u5de5\u4f5c\u63d0\u4f9b\u5f37\u5927\u7684\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b78\u7fd2\u5982\u4f55\u5728 CentOS \u4e0a\u642d\u5efa OpenWrt \u958b\u767c\u74b0\u5883\uff0c\u5be6\u73fe\u9ad8\u6548\u7684\u8def\u7531\u5668\u56fa\u4ef6\u958b\u767c\u8207\u6e2c\u8a66\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-43484","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/43484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=43484"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/43484\/revisions"}],"predecessor-version":[{"id":43485,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/43484\/revisions\/43485"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=43484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=43484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=43484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}