{"id":537,"date":"2021-10-05T07:19:00","date_gmt":"2021-10-05T07:19:00","guid":{"rendered":"https:\/\/262235.xyz\/?p=537"},"modified":"2021-10-05T07:19:00","modified_gmt":"2021-10-05T07:19:00","slug":"537","status":"publish","type":"post","link":"https:\/\/lyvba.com\/index.php\/2021\/10\/05\/537\/","title":{"rendered":"PVE 7.0 \u5b89\u88c5 Openwrt 21.02.0 \u7b14\u8bb0"},"content":{"rendered":"<h3>1. Openwrt \u5b98\u65b9\u56fa\u4ef6\u4e0b\u8f7d\u5730\u5740<\/h3>\n<ul>\n<li><a href=\"https:\/\/downloads.openwrt.org\/releases\/21.02.0\/targets\/x86\/64\/\">https:\/\/downloads.openwrt.org\/releases\/21.02.0\/targets\/x86\/64\/<\/a><\/li>\n<li>\u9009\u62e9\u56fa\u4ef6:  <code>openwrt-21.02.0-x86-64-generic-ext4-combined-efi.img.gz<\/code><\/li>\n<\/ul>\n<h3>2. \u4e0b\u8f7d\u540e\uff0c\u89e3\u538b\u540e\u6539\u540d <code>openwrt.img<\/code> \u4e0a\u4f20 PVE\uff0c\u5efa\u7acb <code>OpenWRT<\/code> \u7f16\u53f7 102<\/h3>\n<h3>3. \u4f7f\u7528 <code>qm<\/code> \u8f6f\u4ef6, \u76f4\u63a5\u8f6c\u6362openwrt\u7684img\u6587\u4ef6\u4e3a\u865a\u62df\u78c1\u76d8<\/h3>\n<pre><code>qm importdisk 102 \/var\/lib\/vz\/template\/iso\/openwrt.img local\n\nqm stop 102   # \u53ef\u4ee5\u4f7f\u7528 qm stop \u505c\u6b62\u865a\u62df\u673a<\/code><\/pre>\n<h3>4. OpenWRT \u7f51\u7edc\u8bbe\u7f6e \u548c DNS \u8bbe\u7f6e<\/h3>\n<ul>\n<li>\n<p>\u8bbe\u7f6eOP\u8def\u7531\u5668\u7f51\u7edc # <code>vi \/etc\/config\/network<\/code> ; \u4fee\u6539IP\u548c\u6dfb\u52a0\u7f51\u5173<\/p>\n<pre><code>config interface 'lan'\n  option proto 'static'\n  option ipaddr '192.168.1.99'\n  option netmask '255.255.255.0'\n  option gateway '192.168.1.1'\n  option ip6assign '60'\n  option device 'br-lan'<\/code><\/pre>\n<\/li>\n<li>\u91cd\u542f\u7f51\u7edc\u8bbe\u7f6e  # <code>ifup lan<\/code><\/li>\n<li>\n<p>\u6dfb\u52a0\u4e34\u65f6 DNS  # <code>vi \/etc\/resolv.conf<\/code><\/p>\n<pre><code>echo 'nameserver 8.8.8.8' &gt;&gt; \/etc\/resolv.conf<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3>5. \u67e5\u770b\u8f6f\u4ef6\u6e90\u548c\u4fee\u6539\u8f6f\u4ef6\u6e90\u4e3a\u4e2d\u79d1\u5927<\/h3>\n<ul>\n<li>\n<p>cat \/etc\/opkg\/distfeeds.conf<\/p>\n<pre><code>src\/gz openwrt_core https:\/\/downloads.openwrt.org\/releases\/21.02.0\/targets\/x86\/64\/packages\nsrc\/gz openwrt_base https:\/\/downloads.openwrt.org\/releases\/21.02.0\/packages\/x86_64\/base\nsrc\/gz openwrt_luci https:\/\/downloads.openwrt.org\/releases\/21.02.0\/packages\/x86_64\/luci\nsrc\/gz openwrt_packages https:\/\/downloads.openwrt.org\/releases\/21.02.0\/packages\/x86_64\/packages\nsrc\/gz openwrt_routing https:\/\/downloads.openwrt.org\/releases\/21.02.0\/packages\/x86_64\/routing\nsrc\/gz openwrt_telephony https:\/\/downloads.openwrt.org\/releases\/21.02.0\/packages\/x86_64\/telephony<\/code><\/pre>\n<\/li>\n<li>\n<p>\u56e0\u4e3a\u539f\u59cb\u56fa\u4ef6\u6ca1\u6709 <code>ca-certificates<\/code>\uff0c\u6240\u4ee5\u4fee\u6539\u56fd\u5185\u6e90\uff0c\u6539http\u4e0b\u8f7d<\/p>\n<pre><code>sed -i  's\/downloads.openwrt.org\/mirrors.ustc.edu.cn\/openwrt\/g' \/etc\/opkg\/distfeeds.conf\nsed -i  's\/https\/http\/g' \/etc\/opkg\/distfeeds.conf<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3>6. \u5b89\u88c5\u4e2d\u6587\u8bed\u8a00\u5305\u548c\u5e38\u7528\u5de5\u5177<\/h3>\n<pre><code>opkg update\nopkg install luci-i18n-base-zh-cn\nopkg install wget tmux ca-certificates htop tar bash<\/code><\/pre>\n<h3>7. \u67e5\u8be2\u53ef\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305<\/h3>\n<pre><code>opkg list | grep -e libev -e ray<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1. Openwrt \u5b98\u65b9\u56fa\u4ef6\u4e0b\u8f7d\u5730\u5740 https:\/\/downloads.openwrt.org\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[60],"class_list":["post-537","post","type-post","status-publish","format-standard","hentry","category-vps","tag-pve"],"_links":{"self":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/comments?post=537"}],"version-history":[{"count":0,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/537\/revisions"}],"wp:attachment":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/media?parent=537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/categories?post=537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/tags?post=537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}