{"id":1541,"date":"2021-10-12T00:38:53","date_gmt":"2021-10-12T07:38:53","guid":{"rendered":"https:\/\/www.xh86.me\/?p=1541"},"modified":"2021-10-12T00:38:53","modified_gmt":"2021-10-12T07:38:53","slug":"proxmox-ve-7-0-%e6%97%a5%e5%b8%b8%e7%bb%b4%e6%8a%a4%ef%bc%8c%e5%8e%bb%e6%8e%89%e6%9c%aa%e8%ae%a2%e9%98%85%e7%9a%84%e6%8f%90%e7%a4%ba%ef%bc%8c%e5%92%8c%e8%ae%be%e7%bd%ae%e5%9b%bd%e5%86%85%e6%ba%90","status":"publish","type":"post","link":"https:\/\/www.xh86.me\/?p=1541","title":{"rendered":"Proxmox VE 7.0 \u65e5\u5e38\u7ef4\u62a4\uff0c\u53bb\u6389\u672a\u8ba2\u9605\u7684\u63d0\u793a\uff0c\u548c\u8bbe\u7f6e\u56fd\u5185\u6e90"},"content":{"rendered":"<h1 id=\"\u79fb\u9664\u672a\u4f7f\u7528\u7684linux\u5185\u6838\">\u79fb\u9664\u672a\u4f7f\u7528\u7684Linux\u5185\u6838<\/h1>\n<ul>\n<li>\u82e5\u4e0d\u5b58\u5728pvekclean\uff0c\u8bf7\u5148\u5b89\u88c5<\/li>\n<\/ul>\n<pre>git clone https:\/\/github.com\/jordanhillis\/pvekclean.git\r\ncd pvekclean\r\nchmod +x pvekclean.sh\r\n<\/pre>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\u6267\u884cpvekclean\u5373\u53ef<\/p>\n<pre>.\/pvekclean.sh\r\n<\/pre>\n<h1 id=\"\u65e5\u5e38\u8f6f\u4ef6\u66f4\u65b0\u547d\u4ee4\">\u65e5\u5e38\u8f6f\u4ef6\u66f4\u65b0\u547d\u4ee4\uff1a<\/h1>\n<pre>apt update -y &amp;&amp; apt dist-upgrade -y\r\n<\/pre>\n<h1 id=\"\u66f4\u65b0pve\u5e76\u5b89\u88c5\u5e38\u7528\u8f6f\u4ef6\">\u66f4\u65b0PVE\uff0c\u5e76\u5b89\u88c5\u5e38\u7528\u8f6f\u4ef6<\/h1>\n<pre>apt-get update &amp;&amp; apt-get install vim lrzsz unzip net-tools curl screen uuid-runtime git -y &amp;&amp; apt dist-upgrade -y\r\n<\/pre>\n<h1 id=\"proxmox-ve-63-64-70\u53bb\u6389\u672a\u8ba2\u9605\u7684\u63d0\u793a\">Proxmox VE 6.3 \/ 6.4 \/ 7.0\u53bb\u6389\u672a\u8ba2\u9605\u7684\u63d0\u793a<\/h1>\n<pre>sed -i_orig \"s\/data.status === 'Active'\/true\/g\" \/usr\/share\/pve-manager\/js\/pvemanagerlib.js\r\nsed -i_orig \"s\/if (res === null || res === undefined || \\!res || res\/if(\/g\" \/usr\/share\/javascript\/proxmox-widget-toolkit\/proxmoxlib.js\r\nsed -i_orig \"s\/.data.status.toLowerCase() !== 'active'\/false\/g\" \/usr\/share\/javascript\/proxmox-widget-toolkit\/proxmoxlib.js\r\nsystemctl restart pveproxy\r\n<\/pre>\n<ul>\n<li>\u786e\u8ba4\u65e0\u8bef\u540e\uff0c\u91cd\u65b0\u542f\u52a8\u670d\u52a1\u5668<\/li>\n<\/ul>\n<pre>reboot\r\n<\/pre>\n<h1 id=\"\u5982\u4f55\u8bbe\u7f6e\u56fd\u5185\u6e90-for-pve-6x\">\u5982\u4f55\u8bbe\u7f6e\u56fd\u5185\u6e90 &#8211; For PVE 6.x<\/h1>\n<ul>\n<li>\u8bbe\u7f6e debian \u963f\u91cc\u4e91\u6e90 &#8211; For PVE 6.x<\/li>\n<\/ul>\n<pre>cat &gt; \/etc\/apt\/sources.list &lt;&lt;EOF\r\ndeb http:\/\/mirrors.aliyun.com\/debian\/ buster main non-free contrib\r\ndeb http:\/\/mirrors.aliyun.com\/debian\/ buster-updates main non-free contrib\r\ndeb http:\/\/mirrors.aliyun.com\/debian\/ buster-backports main non-free contrib\r\ndeb-src http:\/\/mirrors.aliyun.com\/debian\/ buster main non-free contrib\r\ndeb-src http:\/\/mirrors.aliyun.com\/debian\/ buster-updates main non-free contrib\r\ndeb-src http:\/\/mirrors.aliyun.com\/debian\/ buster-backports main non-free contrib\r\ndeb http:\/\/mirrors.aliyun.com\/debian-security\/ buster\/updates main non-free contrib\r\ndeb-src http:\/\/mirrors.aliyun.com\/debian-security\/ buster\/updates main non-free contrib\r\nEOF\r\n<\/pre>\n<ul>\n<li>\u5220\u9664\u4f01\u4e1a\u6e90 &#8211; For PVE 6.x<\/li>\n<\/ul>\n<pre>rm -rf \/etc\/apt\/sources.list.d\/pve-enterprise.list\r\n<\/pre>\n<ul>\n<li>\u4e0b\u8f7d\u79d8\u94a5 &#8211; For PVE 6.x<\/li>\n<\/ul>\n<pre>wget http:\/\/mirrors.ustc.edu.cn\/proxmox\/debian\/proxmox-ve-release-6.x.gpg -O \/etc\/apt\/trusted.gpg.d\/proxmox-ve-release-6.x.gpg\r\n<\/pre>\n<ul>\n<li>\u6dfb\u52a0\u56fd\u5185\u6e90 &#8211; For PVE 6.x<\/li>\n<\/ul>\n<pre>echo \"deb http:\/\/mirrors.ustc.edu.cn\/proxmox\/debian\/pve buster pve-no-subscription\" &gt;\/etc\/apt\/sources.list.d\/pve-install-repo.list\r\napt update -y &amp;&amp; apt dist-upgrade -y\r\n<\/pre>\n<h1 id=\"\u5982\u4f55\u8bbe\u7f6e\u56fd\u5185\u6e90-for-pve-7x\">\u5982\u4f55\u8bbe\u7f6e\u56fd\u5185\u6e90 &#8211; For PVE 7.x<\/h1>\n<ul>\n<li>\u8bbe\u7f6e debian \u963f\u91cc\u4e91\u6e90 &#8211; For PVE 7.x<\/li>\n<\/ul>\n<pre>cat &gt; \/etc\/apt\/sources.list &lt;&lt;EOF\r\ndeb http:\/\/mirrors.aliyun.com\/debian\/ bullseye main non-free contrib\r\ndeb http:\/\/mirrors.aliyun.com\/debian\/ bullseye-updates main non-free contrib\r\ndeb http:\/\/mirrors.aliyun.com\/debian\/ bullseye-backports main non-free contrib\r\ndeb-src http:\/\/mirrors.aliyun.com\/debian\/ bullseye main non-free contrib\r\ndeb-src http:\/\/mirrors.aliyun.com\/debian\/ bullseye-updates main non-free contrib\r\ndeb-src http:\/\/mirrors.aliyun.com\/debian\/ bullseye-backports main non-free contrib\r\ndeb http:\/\/mirrors.aliyun.com\/debian-security\/ bullseye-security main non-free contrib\r\ndeb-src http:\/\/mirrors.aliyun.com\/debian-security\/ bullseye-security main non-free contrib\r\nEOF\r\n<\/pre>\n<ul>\n<li>\u5220\u9664\u4f01\u4e1a\u6e90 &#8211; For PVE 7.x<\/li>\n<\/ul>\n<pre>rm -rf \/etc\/apt\/sources.list.d\/pve-enterprise.list\r\n<\/pre>\n<ul>\n<li>\u4e0b\u8f7d\u79d8\u94a5 &#8211; For PVE 7.x<\/li>\n<\/ul>\n<pre>wget http:\/\/mirrors.ustc.edu.cn\/proxmox\/debian\/proxmox-release-bullseye.gpg -O \/etc\/apt\/trusted.gpg.d\/proxmox-release-bullseye.gpg\r\n<\/pre>\n<ul>\n<li>\u6dfb\u52a0\u56fd\u5185\u6e90 &#8211; For PVE 7.x<\/li>\n<\/ul>\n<pre>echo \"deb http:\/\/mirrors.ustc.edu.cn\/proxmox\/debian\/pve bullseye pve-no-subscription\" &gt;\/etc\/apt\/sources.list.d\/pve-install-repo.list\r\napt update -y &amp;&amp; apt dist-upgrade -y\r\n<\/pre>\n<h1 id=\"\u914d\u7f6edns\u89e3\u51b3\u65e0\u6cd5\u4e0a\u7f51\u7684\u95ee\u9898\">\u914d\u7f6eDNS\uff0c\u89e3\u51b3\u65e0\u6cd5\u4e0a\u7f51\u7684\u95ee\u9898<\/h1>\n<ul>\n<li>\u65b0\u589e\u963f\u91cc\u4e91\u7684\u516c\u5171DNS<\/li>\n<\/ul>\n<pre>vi \/etc\/resolv.conf\r\n:d9999\r\nnameserver 223.5.5.5\r\nnameserver 223.6.6.6\r\n<\/pre>\n<ul>\n<li>\u91cd\u542f\u7f51\u7edc\u670d\u52a1<\/li>\n<\/ul>\n<pre>service networking restart\r\n<\/pre>\n<h1 id=\"\u5b89\u88c5\u5e76\u8bbe\u7f6entp\u670d\u52a1-for-pve-6x\">\u5b89\u88c5\u5e76\u8bbe\u7f6eNTP\u670d\u52a1 &#8211; For PVE 6.x<\/h1>\n<blockquote><p>\u53c2\u8003<a href=\"https:\/\/pve.proxmox.com\/wiki\/Time_Synchronization\">https:\/\/pve.proxmox.com\/wiki\/Time_Synchronization<\/a><\/p><\/blockquote>\n<ul>\n<li>\u65b0\u589e\u963f\u91cc\u4e91\u7684\u516c\u5171NTP\u5730\u5740<\/li>\n<\/ul>\n<pre>mv \/etc\/systemd\/timesyncd.conf \/etc\/systemd\/timesyncd.conf_bak\r\necho [Time] &gt;&gt; \/etc\/systemd\/timesyncd.conf\r\necho NTP=ntp1.aliyun.com ntp2.aliyun.com ntp3.aliyun.com ntp4.aliyun.com ntp5.aliyun.com ntp6.aliyun.com ntp7.aliyun.com &gt;&gt;    \/etc\/systemd\/timesyncd.conf\r\ncat \/etc\/systemd\/timesyncd.conf\r\ntimedatectl set-ntp true \r\ntimedatectl status\r\n<\/pre>\n<h1 id=\"\u5b89\u88c5\u5e76\u8bbe\u7f6entp\u670d\u52a1-for-pve-7x\">\u5b89\u88c5\u5e76\u8bbe\u7f6eNTP\u670d\u52a1 &#8211; For PVE 7.x<\/h1>\n<blockquote><p>\u53c2\u8003<a href=\"https:\/\/help.aliyun.com\/document_detail\/187016.html?utm_content=g_1000230851&amp;spm=5176.20966629.toubu.3.f2991ddcpxxvD1#title-ik2-31x-dso\">https:\/\/help.aliyun.com\/document_detail\/187016.html?utm_content=g_1000230851&amp;spm=5176.20966629.toubu.3.f2991ddcpxxvD1#title-ik2-31x-dso<\/a><\/p><\/blockquote>\n<ul>\n<li>\u65b0\u589e\u963f\u91cc\u4e91\u7684\u516c\u5171NTP\u5730\u5740<\/li>\n<\/ul>\n<pre>vim \/etc\/chrony\/chrony.conf\r\n\u65b0\u589e\u4e0b\u9762\u7684server\r\n# Aliyun NTP\r\nserver ntp1.aliyun.com minpoll 4 maxpoll 10 iburst\r\nserver ntp2.aliyun.com minpoll 4 maxpoll 10 iburst\r\nserver ntp3.aliyun.com minpoll 4 maxpoll 10 iburst\r\nserver ntp4.aliyun.com minpoll 4 maxpoll 10 iburst\r\nserver ntp5.aliyun.com minpoll 4 maxpoll 10 iburst\r\nserver ntp6.aliyun.com minpoll 4 maxpoll 10 iburst\r\nserver ntp7.aliyun.com minpoll 4 maxpoll 10 iburst\r\n<\/pre>\n<h1 id=\"\u4f7f\u7528\u547d\u4ee4\u884c\u4fee\u6539pve\u9ed8\u8ba4\u7684ip\u5730\u5740\">\u4f7f\u7528\u547d\u4ee4\u884c\u4fee\u6539PVE\u9ed8\u8ba4\u7684IP\u5730\u5740<\/h1>\n<pre>vim \/etc\/network\/interfaces\r\n<\/pre>\n<p>\u4f1a\u51fa\u73b0\u7c7b\u4f3c\u4e0b\u9762\u7684\u914d\u7f6e\u6587\u4ef6<\/p>\n<pre>auto lo\r\niface lo inet loopback\r\n\r\niface enp2s0 inet manual\r\n\r\nauto vmbr0\r\niface vmbr0 inet static\r\n\taddress 192.168.1.2\r\n\tnetmask 255.255.255.0\r\n\tgateway 192.168.1.1\r\n\tbridge_ports enp2s0\r\n\tbridge_stp off\r\n\tbridge_fd 0\r\n<\/pre>\n<p>\u5efa\u8bae\u53ea\u4fee\u6539address\uff0cnetmask\u548cgateway\u8fd93\u4e2a\u914d\u7f6e\u503c\u5373\u53ef\uff0c\u542b\u4e49\u5206\u522b\u662fIP\u5730\u5740\uff0c\u5b50\u7f51\u63a9\u7801\u548c\u7f51\u5173\u5730\u5740\u3002<\/p>\n<h1 id=\"\u5982\u679c\u66f4\u65b0\u65f6\u51fa\u73b0\u9519\u8bef-e-sub-process-usrbindpkg-returned-an-error-code\">\u5982\u679c\u66f4\u65b0\u65f6\u51fa\u73b0\u9519\u8bef\u00a0E: Sub-process \/usr\/bin\/dpkg returned an error code<\/h1>\n<p><a href=\"https:\/\/blog.csdn.net\/yusiguyuan\/article\/details\/24269129\">https:\/\/blog.csdn.net\/yusiguyuan\/article\/details\/24269129<\/a><\/p>\n<pre>apt-get update --fix-missing\r\napt-get autoremove &amp;&amp; sudo apt-get clean &amp;&amp; sudo apt-get install -f\r\n<\/pre>\n<h1 id=\"\u5982\u679c\u66f4\u65b0\u65f6\u51fa\u73b0\u9519\u8bef-you-are-attempting-to-remove-the-meta-package-proxmox-ve\">\u5982\u679c\u66f4\u65b0\u65f6\u51fa\u73b0\u9519\u8bef You are attempting to remove the meta-package &#8216;proxmox-ve&#8217;<\/h1>\n<blockquote><p>\u53c2\u8003<a href=\"https:\/\/forum.proxmox.com\/threads\/apt-get-dist-upgrade-wants-to-remove-proxmox-ve-pve-firmware.39360\/\">https:\/\/forum.proxmox.com\/threads\/apt-get-dist-upgrade-wants-to-remove-proxmox-ve-pve-firmware.39360\/<\/a><\/p><\/blockquote>\n<pre>#Yes, I've tested it. I can remove any kernels listed with this command:\r\n#\u5217\u51fa\u5f53\u524d\u7cfb\u7edf\u7684Linux\u955c\u50cf\r\ndpkg --list | egrep -i --color 'linux-image|linux-headers'\r\n#Then:\r\n#\u5220\u9664\u65e7\u7684Linux\u955c\u50cf\r\napt-get --purge remove linux-image-4.9.0-4-amd64 linux-image-4.9.0-5-amd64\r\n#\u66f4\u65b0grub\r\nupdate-grub\r\n<\/pre>\n<h1 id=\"\u89e3\u51b3locale-cannot-set-lc_ctype-to-default-locale-no-such-file-or-directory\u62a5\u9519\">\u89e3\u51b3locale: Cannot set LC_CTYPE to default locale: No such file or directory\u62a5\u9519<\/h1>\n<ul>\n<li>\u7f16\u8f91\/etc\/default\/locale\u6587\u4ef6<\/li>\n<\/ul>\n<pre>vim \/etc\/default\/locale\r\n\r\nLC_CTYPE=\"en_US.UTF-8\"\r\nLC_ALL=\"en_US.UTF-8\"\r\nLANG=\"en_US.UTF-8\"<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u79fb\u9664\u672a\u4f7f\u7528\u7684Linux\u5185\u6838 \u82e5\u4e0d\u5b58\u5728pvekclean\uff0c\u8bf7\u5148\u5b89\u88c5 git clone https:\/\/gith [&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":[],"class_list":["post-1541","post","type-post","status-publish","format-standard","hentry","category-proxmox"],"_links":{"self":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/1541","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1541"}],"version-history":[{"count":1,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/1541\/revisions"}],"predecessor-version":[{"id":1542,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/1541\/revisions\/1542"}],"wp:attachment":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1541"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1541"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}