{"id":479,"date":"2026-04-19T15:29:46","date_gmt":"2026-04-19T07:29:46","guid":{"rendered":"https:\/\/www.loongdi.net\/blog\/?p=479"},"modified":"2026-04-19T15:29:46","modified_gmt":"2026-04-19T07:29:46","slug":"%e6%8e%a2%e7%b4%a2%e9%9f%a9%e5%9b%bdvps%ef%bc%9a%e5%ae%8c%e6%95%b4%e5%ae%89%e8%a3%85%e5%92%8c%e9%85%8d%e7%bd%ae%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.loongdi.net\/blog\/479.html","title":{"rendered":"\u63a2\u7d22\u97e9\u56fdVPS\uff1a\u5b8c\u6574\u5b89\u88c5\u548c\u914d\u7f6e\u6307\u5357"},"content":{"rendered":"<p><h2>\u97e9\u56fdVPS\u7b80\u4ecb\u53ca\u672c\u6587\u4efb\u52a1<\/h2>\n<\/p>\n<p>\u97e9\u56fdVPS\uff08Virtual Private Server\uff09\u662f\u4e00\u79cd\u57fa\u4e8e\u97e9\u56fd\u670d\u52a1\u5668\u7684\u865a\u62df\u4e3b\u673a\u670d\u52a1\uff0c\u5b83\u4e3a\u7528\u6237\u63d0\u4f9b\u4e86\u4e00\u4e2a\u72ec\u7acb\u7684\u865a\u62df\u73af\u5883\uff0c\u5177\u6709\u9ad8\u7a33\u5b9a\u6027\u3001\u5feb\u901f\u54cd\u5e94\u548c\u4e30\u5bcc\u7684\u5e26\u5bbd\u8d44\u6e90\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728\u97e9\u56fdVPS\u4e0a\u5b89\u88c5\u548c\u914d\u7f6e\u670d\u52a1\u5668\uff0c\u5305\u62ec\u64cd\u4f5c\u6b65\u9aa4\u3001\u547d\u4ee4\u793a\u4f8b\u53ca\u6ce8\u610f\u4e8b\u9879\u3002<\/p>\n<p><h2>\u4e00\u3001\u51c6\u5907\u5de5\u4f5c<\/h2>\n<\/p>\n<p>\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u60a8\u5df2\u7ecf\u5b8c\u6210\u4e86\u4ee5\u4e0b\u51c6\u5907\u5de5\u4f5c\uff1a<\/p>\n<ul>\n<li>\u8d2d\u4e70\u97e9\u56fdVPS\u670d\u52a1<\/li>\n<li>\u83b7\u53d6VPS\u7684IP\u5730\u5740\u3001\u7528\u6237\u540d\u548c\u5bc6\u7801<\/li>\n<li>\u5b89\u88c5SSH\u5ba2\u6237\u7aef\uff08\u5982PuTTY\uff09<\/li>\n<\/ul>\n<p><h2>\u4e8c\u3001\u8fde\u63a5\u5230\u97e9\u56fdVPS<\/h2>\n<\/p>\n<p>\u4f7f\u7528SSH\u5ba2\u6237\u7aef\u8fde\u63a5\u5230\u60a8\u7684\u97e9\u56fdVPS\uff0c\u4ee5\u4e0b\u662f\u8fde\u63a5\u6b65\u9aa4\uff1a<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.loongdi.net\/blog\/wp-content\/uploads\/2026\/03\/3i5XpDP0.jpg\" alt=\"\u63a2\u7d22\u97e9\u56fdVPS\uff1a\u5b8c\u6574\u5b89\u88c5\u548c\u914d\u7f6e\u6307\u5357\" title=\"\u63a2\u7d22\u97e9\u56fdVPS\uff1a\u5b8c\u6574\u5b89\u88c5\u548c\u914d\u7f6e\u6307\u5357\"><\/p>\n<p>1. \u6253\u5f00SSH\u5ba2\u6237\u7aef\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p><pre><code>ssh username@your_vps_ip<\/code><\/pre>\n<\/p>\n<p>   \u5176\u4e2d\uff0cusername\u4e3a\u60a8\u7684VPS\u7528\u6237\u540d\uff0cyour_vps_ip\u4e3a\u60a8\u7684VPS IP\u5730\u5740\u3002<\/p>\n<p>2. \u8f93\u5165\u5bc6\u7801\u540e\uff0c\u60a8\u5c06\u6210\u529f\u8fde\u63a5\u5230\u97e9\u56fdVPS\u3002<\/p>\n<p><h2>\u4e09\u3001\u5b89\u88c5\u548c\u914d\u7f6e\u670d\u52a1\u5668<\/h2>\n<\/p>\n<p>\u4ee5\u4e0b\u662f\u5728\u97e9\u56fdVPS\u4e0a\u5b89\u88c5\u548c\u914d\u7f6e\u670d\u52a1\u5668\u7684\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/p>\n<p><h3>1. \u66f4\u65b0\u7cfb\u7edf<\/h3>\n<\/p>\n<p>\u9996\u5148\uff0c\u66f4\u65b0\u7cfb\u7edf\u4ee5\u83b7\u53d6\u6700\u65b0\u7684\u8f6f\u4ef6\u5305\u548c\u8865\u4e01\uff1a<\/p>\n<p><pre><code>sudo apt update<\/p>\r\n<p>sudo apt upgrade<\/code><\/pre>\n<\/p>\n<p><h3>2. \u5b89\u88c5Apache\u670d\u52a1\u5668<\/h3>\n<\/p>\n<p>\u5b89\u88c5Apache\u670d\u52a1\u5668\uff0c\u4ee5\u4fbf\u63d0\u4f9bWeb\u670d\u52a1\uff1a<\/p>\n<p><pre><code>sudo apt install apache2<\/code><\/pre>\n<\/p>\n<p><h3>3. \u542f\u52a8\u548c\u8bbe\u7f6eApache\u670d\u52a1<\/h3>\n<\/p>\n<p>\u542f\u52a8Apache\u670d\u52a1\uff0c\u5e76\u8bbe\u7f6e\u5b83\u968f\u7cfb\u7edf\u542f\u52a8\u81ea\u52a8\u8fd0\u884c\uff1a<\/p>\n<p><pre><code>sudo systemctl start apache2<\/p>\r\n<p>sudo systemctl enable apache2<\/code><\/pre>\n<\/p>\n<p><h3>4. \u5b89\u88c5MySQL\u6570\u636e\u5e93<\/h3>\n<\/p>\n<p>\u5b89\u88c5MySQL\u6570\u636e\u5e93\uff0c\u4ee5\u4fbf\u5b58\u50a8\u548c\u7ba1\u7406\u6570\u636e\uff1a<\/p>\n<p><pre><code>sudo apt install mysql-server<\/code><\/pre>\n<\/p>\n<p><h3>5. \u914d\u7f6eMySQL\u6570\u636e\u5e93<\/h3>\n<\/p>\n<p>\u914d\u7f6eMySQL\u6570\u636e\u5e93\uff0c\u8bbe\u7f6eroot\u7528\u6237\u7684\u5bc6\u7801\uff1a<\/p>\n<p><pre><code>sudo mysql_secure_installation<\/code><\/pre>\n<\/p>\n<p>\u6309\u7167\u63d0\u793a\u64cd\u4f5c\uff0c\u8bbe\u7f6eroot\u7528\u6237\u7684\u5bc6\u7801\u3001\u5220\u9664\u533f\u540d\u7528\u6237\u3001\u7981\u6b62root\u7528\u6237\u8fdc\u7a0b\u767b\u5f55\u7b49\u3002<\/p>\n<p><h3>6. \u5b89\u88c5PHP\u548cPHP-FPM<\/h3>\n<\/p>\n<p>\u5b89\u88c5PHP\u548cPHP-FPM\uff0c\u4ee5\u4fbf\u652f\u6301PHP\u5e94\u7528\u7a0b\u5e8f\uff1a<\/p>\n<p><pre><code>sudo apt install php php-mysql php-fpm<\/code><\/pre>\n<\/p>\n<p><h3>7. \u914d\u7f6ePHP-FPM<\/h3>\n<\/p>\n<p>\u7f16\u8f91PHP-FPM\u914d\u7f6e\u6587\u4ef6\uff0c\u8bbe\u7f6e\u6700\u5927\u8fdb\u7a0b\u6570\u548c\u8bf7\u6c42\u8d85\u65f6\u65f6\u95f4\uff1a<\/p>\n<p><pre><code>sudo nano \/etc\/php\/7.4\/fpm\/pool.d\/www.conf<\/code><\/pre>\n<\/p>\n<p>\u627e\u5230\u4ee5\u4e0b\u884c\u5e76\u4fee\u6539\uff1a<\/p>\n<p><pre><code>pm = dynamic<\/p>\r\n<p>pm.max_children = 50<\/p>\r\n<p>pm.start_servers = 10<\/p>\r\n<p>pm.min_spare_servers = 5<\/p>\r\n<p>pm.max_spare_servers = 35<\/p>\r\n<p>request_terminate_timeout = 60<\/code><\/pre>\n<\/p>\n<p>\u4fdd\u5b58\u5e76\u9000\u51fa\u7f16\u8f91\u5668\u3002<\/p>\n<p><h3>8. \u91cd\u542fApache\u548cPHP-FPM\u670d\u52a1<\/h3>\n<\/p>\n<p>\u91cd\u542fApache\u548cPHP-FPM\u670d\u52a1\uff0c\u4f7f\u914d\u7f6e\u751f\u6548\uff1a<\/p>\n<p><pre><code>sudo systemctl restart apache2<\/p>\r\n<p>sudo systemctl restart php7.4-fpm<\/code><\/pre>\n<\/p>\n<p><h2>\u56db\u3001\u6ce8\u610f\u4e8b\u9879\u548c\u5b9e\u7528\u6280\u5de7<\/h2>\n<\/p>\n<ul>\n<li>\u5b9a\u671f\u66f4\u65b0\u7cfb\u7edf\uff0c\u4ee5\u4fdd\u6301\u670d\u52a1\u5668\u5b89\u5168\u3002<\/li>\n<li>\u5907\u4efd\u91cd\u8981\u6570\u636e\uff0c\u4ee5\u9632\u4e07\u4e00\u3002<\/li>\n<li>\u4f18\u5316\u670d\u52a1\u5668\u914d\u7f6e\uff0c\u63d0\u9ad8\u6027\u80fd\u3002<\/li>\n<li>\u4f7f\u7528\u9632\u706b\u5899\u548cSSH\u5bc6\u94a5\u8ba4\u8bc1\uff0c\u589e\u5f3a\u5b89\u5168\u6027\u3002<\/li>\n<li>\u5408\u7406\u5206\u914d\u8d44\u6e90\uff0c\u907f\u514d\u8d44\u6e90\u51b2\u7a81\u3002<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u60a8\u5df2\u7ecf\u6210\u529f\u5728\u97e9\u56fdVPS\u4e0a\u5b89\u88c5\u548c\u914d\u7f6e\u4e86\u670d\u52a1\u5668\u3002\u795d\u60a8\u4f7f\u7528\u6109\u5feb\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u97e9\u56fdVPS\u7b80\u4ecb\u53ca\u672c\u6587\u4efb\u52a1 \u97e9\u56fdVPS\uff08Virtual Private Server\uff09\u662f\u4e00\u79cd\u57fa\u4e8e\u97e9\u56fd\u670d\u52a1\u5668\u7684\u865a\u62df\u4e3b\u673a\u670d\u52a1\uff0c\u5b83\u4e3a\u7528\u6237\u63d0\u4f9b\u4e86\u4e00\u4e2a\u72ec\u7acb\u7684\u865a\u62df\u73af\u5883\uff0c\u5177\u6709\u9ad8\u7a33\u5b9a\u6027\u3001\u5feb\u901f\u54cd\u5e94\u548c\u4e30\u5bcc\u7684\u5e26\u5bbd\u8d44\u6e90\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728\u97e9\u56fdVPS\u4e0a\u5b89\u88c5\u548c\u914d\u7f6e\u670d\u52a1&#8230;<\/p>\n","protected":false},"author":1,"featured_media":49,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"topic":[],"class_list":["post-479","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hw"],"_links":{"self":[{"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/posts\/479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/comments?post=479"}],"version-history":[{"count":1,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/posts\/479\/revisions"}],"predecessor-version":[{"id":480,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/posts\/479\/revisions\/480"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/media\/49"}],"wp:attachment":[{"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/media?parent=479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/categories?post=479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/tags?post=479"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/topic?post=479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}