{"id":95,"date":"2022-12-20T21:36:21","date_gmt":"2022-12-20T13:36:21","guid":{"rendered":"https:\/\/feiyangblog.eu.org\/?p=95"},"modified":"2026-08-05T18:49:50","modified_gmt":"2026-08-05T10:49:50","slug":"vps%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/feiyangblog.eu.org\/?p=95","title":{"rendered":"VPS\u5e38\u7528\u547d\u4ee4"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u4ee5debian\u3001ubuntu\u7cfb\u7edf\u4e3a\u4e3b\uff0c\u6ce8\u660ecentos\u7684\u4e3acentos\u547d\u4ee4\uff0c\u4ee3\u7801\u4e2d\u5f62\u5982[p#1 \u57df\u540d]\u7684\u4e3a\u53c2\u6570\uff0c\u9700\u8981\u4fee\u6539\u540e\u65b9\u53ef\u4f7f\u7528\uff0c\u5efa\u8bae\u4f7f\u7528SSH\u5ba2\u6237\u7aef\u4e3afinalshell\uff0c\u4fbf\u4e8e\u8f93\u5165\u591a\u884c\u547d\u4ee4\uff0c\u4fee\u6539\u53c2\u6570\u7b49\u64cd\u4f5c\u3002<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001\u83b7\u53d6\u7ba1\u7406\u5458\u6743\u9650<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo -i <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001\u66f4\u65b0\u7cfb\u7edf\u7ec4\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update -y &amp;&amp; apt install -y curl<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">3\u3001\u66f4\u65b0\u7cfb\u7edf\u7ec4\u4ef6\uff08centos\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum update -y &amp;&amp; yum update -y<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">4\u3001warp<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -N https:\/\/gitlab.com\/fscarmen\/warp\/-\/raw\/main\/menu.sh &amp;&amp; bash menu.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">5\u3001\u5b89\u88c5hysteria2<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -N --no-check-certificate https:\/\/raw.githubusercontent.com\/Misaka-blog\/hysteria-install\/main\/hy2\/hysteria.sh &amp;&amp; bash hysteria.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">6\u3001\u5b89\u88c5wireguard<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -O https:\/\/raw.githubusercontent.com\/angristan\/wireguard-install\/master\/wireguard-install.sh<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +x wireguard-install.sh<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/wireguard-install.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">7\u3001\u5b89\u88c5 x-ui<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bash &lt;(curl -Ls https:\/\/raw.githubusercontent.com\/vaxilu\/x-ui\/master\/install.sh)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">8\u3001dd\u7cfb\u7edf<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bash &lt;(wget --no-check-certificate -qO- 'https:\/\/raw.githubusercontent.com\/MoeClub\/Note\/master\/InstallNET.sh') -&#91;p#1 (d\/u)] &#91;p#2 (10\/20.04\uff09] -v 64 -p &#91;p#3 \u5bc6\u7801] -port 22\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">9\u3001\u5b9d\u5854\u7834\u89e3\u7248<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -O install.sh http:\/\/v7.hostcli.com\/install\/install-ubuntu_6.0.sh &amp;&amp;bash install.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">10\u3001woiden\u670d\u52a1\u5668\u89e3\u966480\u7aef\u53e3\u5360\u7528<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>service apache2 stop<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl disable apache2<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">11\u3001bbr\uff08KVM\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -N --no-check-certificate \"https:\/\/raw.githubusercontent.com\/chiakge\/Linux-NetSpeed\/master\/tcp.sh\" &amp;&amp; chmod +x tcp.sh &amp;&amp; .\/tcp.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">12\u3001bbr\uff08LXC\uff0cOVZ\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget --no-cache -O lkl-haproxy.sh https:\/\/github.com\/mzz2017\/lkl-haproxy\/raw\/master\/lkl-haproxy.sh &amp;&amp; bash lkl-haproxy.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">13\u3001\u6740\u6b7b\u8fdb\u7a0b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kill -9 &#91;p#1 \u8fdb\u7a0b\u53f7]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">14\u3001\u67e5\u770bVPS\u5df2\u5f00\u653e\u7aef\u53e3<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>netstat -aptn<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">15\u3001\u670d\u52a1\u5668\u6d4b\u8bd5<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bash &lt;(curl -sSL 'https:\/\/dxt.pages.dev')<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">16\u3001\u7533\u8bf7acme\u8bc1\u4e66\uff08ipv4\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5b89\u88c5\u4f9d\u8d56\napt install -y socat curl cron\n\n# \u5b89\u88c5 acme.sh\ncurl https:\/\/get.acme.sh | sh\n\n# \u5237\u65b0\u73af\u5883\u53d8\u91cf\nsource ~\/.bashrc\n\n# \u6ce8\u518c\u8d26\u6237\n~\/.acme.sh\/acme.sh --register-account \\\n-m 123456789@qq.com\n\n# \u505c\u6b62 nginx\uff0c\u91ca\u653e80\u7aef\u53e3\nsystemctl stop nginx\n\n# \u7533\u8bf7\u8bc1\u4e66\n~\/.acme.sh\/acme.sh --issue \\\n-d &#91;p#1\u57df\u540d] \\\n--standalone\n\n# \u521b\u5efa\u8bc1\u4e66\u76ee\u5f55\nmkdir -p \/root\/cert\n\n# \u5b89\u88c5\u8bc1\u4e66\n~\/.acme.sh\/acme.sh --install-cert \\\n-d &#91;p#1\u57df\u540d] \\\n--key-file \/root\/cert\/private.key \\\n--fullchain-file \/root\/cert\/cert.crt \\\n--reloadcmd \"systemctl restart nginx\"\n\n# \u542f\u52a8 nginx\nsystemctl start nginx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6216\u8005<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5b89\u88c5\u4f9d\u8d56\napt install -y socat curl cron\n\n# \u5b89\u88c5 acme.sh\ncurl https:\/\/get.acme.sh | sh\n\n# \u5237\u65b0\u73af\u5883\u53d8\u91cf\nsource ~\/.bashrc\n\n# \u6ce8\u518c ZeroSSL \u8d26\u6237\n~\/.acme.sh\/acme.sh --register-account \\\n  -m 123456789@qq.com \\\n  --server zerossl\n\n# \u5982\u679c nginx \u5360\u7528\u4e86 80 \u7aef\u53e3\uff0c\u5148\u5173\u95ed\nsystemctl stop nginx\n\n# \u7533\u8bf7\u8bc1\u4e66\n~\/.acme.sh\/acme.sh --issue \\\n  -d &#91;p#1 \u57df\u540d] \\\n  --standalone \\\n  --server zerossl \\\n  --keylength ec-256\n\n# \u521b\u5efa\u8bc1\u4e66\u76ee\u5f55\nmkdir -p \/root\/cert\n\n# \u5b89\u88c5\u8bc1\u4e66\n~\/.acme.sh\/acme.sh --install-cert \\\n  -d &#91;p#1 \u57df\u540d] \\\n  --ecc \\\n  --key-file \/root\/cert\/private.key \\\n  --fullchain-file \/root\/cert\/cert.crt \\\n  --reloadcmd \"systemctl restart nginx\"\n\n# \u542f\u52a8 nginx\nsystemctl start nginx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">17\u3001\u7533\u8bf7acme\u8bc1\u4e66\uff08ipv6\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5b89\u88c5\u4f9d\u8d56\napt install -y socat curl cron\n\n# \u5b89\u88c5 acme.sh\ncurl https:\/\/get.acme.sh | sh\n\n# \u5237\u65b0\u73af\u5883\u53d8\u91cf\nsource ~\/.bashrc\n\n# \u6ce8\u518c\u8d26\u6237\n~\/.acme.sh\/acme.sh --register-account \\\n-m 123456789@qq.com\n\n# \u5982\u679c nginx \u5360\u752880\u7aef\u53e3\uff0c\u5148\u505c\u6b62\nsystemctl stop nginx \n\n# \u7533\u8bf7\u8bc1\u4e66\n~\/.acme.sh\/acme.sh --issue \\\n-d &#91;p#1\u57df\u540d] \\\n--standalone \\\n-k ec-256 \\\n--listen-v6\n\n# \u521b\u5efa\u8bc1\u4e66\u76ee\u5f55\nmkdir -p \/root\/cert\n\n# \u5b89\u88c5\u8bc1\u4e66\n~\/.acme.sh\/acme.sh --install-cert \\\n-d &#91;p#1\u57df\u540d] \\\n--ecc \\\n--key-file \/root\/cert\/private.key \\\n--fullchain-file \/root\/cert\/cert.crt \\\n--reloadcmd \"systemctl restart nginx\"\n\n# \u542f\u52a8 nginx\nsystemctl start nginx 2>\/dev\/null<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6216\u8005<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5b89\u88c5\u4f9d\u8d56\napt install -y socat curl cron\n\n# \u5b89\u88c5 acme.sh\ncurl https:\/\/get.acme.sh | sh\n\n# \u5237\u65b0\u73af\u5883\u53d8\u91cf\nsource ~\/.bashrc\n\n# \u6ce8\u518c ZeroSSL \u8d26\u6237\n~\/.acme.sh\/acme.sh --register-account \\\n-m 123456789@qq.com \\\n--server zerossl\n\n# \u5982\u679c nginx \u5360\u752880\u7aef\u53e3\uff0c\u5148\u505c\u6b62\nsystemctl stop nginx\n\n# \u7533\u8bf7\u8bc1\u4e66\n~\/.acme.sh\/acme.sh --issue \\\n-d &#91;\u4f60\u7684\u57df\u540d] \\\n--standalone \\\n--server zerossl \\\n-k ec-256 \\\n--listen-v6\n\n# \u521b\u5efa\u8bc1\u4e66\u76ee\u5f55\nmkdir -p \/root\/cert\n\n# \u5b89\u88c5\u8bc1\u4e66\n~\/.acme.sh\/acme.sh --install-cert \\\n-d &#91;\u4f60\u7684\u57df\u540d] \\\n--ecc \\\n--key-file \/root\/cert\/private.key \\\n--fullchain-file \/root\/cert\/cert.crt \\\n--reloadcmd \"systemctl restart nginx\"\n\n# \u542f\u52a8 nginx\nsystemctl start nginx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">18\u3001\u5f00\u653e\u6240\u6709\u7aef\u53e3<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>iptables -P INPUT ACCEPT\niptables -P FORWARD ACCEPT\niptables -P OUTPUT ACCEPT\niptables -F<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">19\u3001warp-go<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -N https:\/\/gitlab.com\/fscarmen\/warp\/-\/raw\/main\/warp-go.sh &amp;&amp; bash warp-go.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">20\u3001nezha\u63a2\u9488\u76d1\u63a7Serv00<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -O 1kejiV01.sh \"https:\/\/pan.1keji.net\/f\/ERGcp\/1kejiV01.sh\" &amp;&amp; chmod +x 1kejiV01.sh &amp;&amp; .\/1kejiV01.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">21\u3001Alpine\u7cfb\u7edf\u5b89\u88c5hysteria2<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -O hy2.sh https:\/\/raw.githubusercontent.com\/zrlhk\/alpine-hysteria2\/main\/hy2.sh &amp;&amp; sh hy2.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">22\u3001\u5b9d\u5854\u9762\u677f\u6e05\u7a7a\u56de\u6536\u7ad9<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rm -rf \/.Recycle_bin\/*<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">23\u3001\u5b89\u88c5Watchtower<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -d \\\n    --name watchtower \\\n    -v \/var\/run\/docker.sock:\/var\/run\/docker.sock \\\n    containrrr\/watchtower \\\n    --interval 3600 \\\n    --cleanup<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5debian\u3001ubuntu\u7cfb\u7edf\u4e3a\u4e3b\uff0c\u6ce8\u660ecentos\u7684\u4e3acentos\u547d\u4ee4\uff0c\u4ee3\u7801\u4e2d\u5f62\u5982[p#1 \u57df\u540d]\u7684\u4e3a\u53c2\u6570 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wpai_generated_summary":"","wpai_meta_description":"","footnotes":""},"categories":[1],"tags":[3],"class_list":["post-95","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-vps"],"views":1735,"_links":{"self":[{"href":"https:\/\/feiyangblog.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/95","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/feiyangblog.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/feiyangblog.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/feiyangblog.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/feiyangblog.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=95"}],"version-history":[{"count":28,"href":"https:\/\/feiyangblog.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/95\/revisions"}],"predecessor-version":[{"id":445,"href":"https:\/\/feiyangblog.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/95\/revisions\/445"}],"wp:attachment":[{"href":"https:\/\/feiyangblog.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=95"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/feiyangblog.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=95"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/feiyangblog.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}