{"id":3313,"date":"2024-04-02T22:56:42","date_gmt":"2024-04-02T14:56:42","guid":{"rendered":"https:\/\/blog.zengqq.com.cn\/?p=3313"},"modified":"2024-09-28T23:08:48","modified_gmt":"2024-09-28T15:08:48","slug":"%e5%88%9b%e5%bb%ba%e5%8f%aa%e7%94%a8%e4%ba%8ewww%e7%9a%84web%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/blog.zengqq.com.cn\/?p=3313","title":{"rendered":"\u521b\u5efa\u53ea\u7528\u4e8ewww\u7684web\u670d\u52a1\u5668"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-22-04\">https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-22-04<\/a>   (\u57fa\u7840\uff0c\u6559\u4f60\u5982\u4f55\u5b89\u88c5\u548c\u914d\u7f6eLEMP,\u6ce8\u610f\u5728\u6570\u636e\u5e93\u7f16\u5199\u5b8c\u4e4b\u540e\u4f1a\u9047\u5230\uff09<\/p>\n\n\n\n<p><a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-wordpress-with-lemp-on-ubuntu-22-04\">https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-wordpress-with-lemp-on-ubuntu-22-04<\/a>  \uff08\u5b9e\u6218\uff0c\u51c6\u5907\u53f7\u4e0a\u9762\u7684\u4e1c\u897f\u540e\uff0c\u56de\u5934\u518d\u770b\u8fd9\u4e00\u7bc7\uff0c\u5e76\u5f00\u59cb\u7740\u624b\u5b89\u88c5wordpress\uff0c\u8fd9\u91cc\u8fd8\u6709\u4ee5\u4e00\u4e2abug,\u5176\u5bfc\u81f4\u5728\u5b89\u88c5\u5b8cwordpress\u4e4b\u540e\u4e0d\u80fd\u6b63\u5e38\u8bbf\u95eewww.your_domain\/wordpress (Error:Your PHP installation appears to be missing the MySQL extension which is required by WordPress)  \u8fd9\u662f\u56e0\u4e3a\u5728\u57fa\u7840\u548c\u5b9e\u6218\u4e24\u4e2a\u6559\u7a0b\u4e2d\uff0c\u4f60\u6709\u53ef\u80fd\u5b89\u88c5php8.1\u5e76\u4e0d\u662f\u5b8c\u5907\u7684\uff0c\u4e0d\u77e5\u9053\u57fa\u4e8e\u4ec0\u4e48\u539f\u56e0\uff0c\u5728\u589e\u52a0\u5b89\u88c5\u989d\u5916php\u9879\u76ee\u65f6\uff0c\u91cc\u9762\u6f0f\u4e86php-pdo-mysql\u6ca1\u6709\u5b89\u88c5\uff0c\u5982\u4f55\u68c0\u67e5\u8fd9\u4e2a\u5462\uff1f\u6709\u4e2a\u529e\u6cd5\u5c31\u662f\u67e5\u770bwww.your_domain\/info.php\u91cc\u9762\uff0c\u4f60\u4f1a\u770b\u5230PD0\u7684drive\u4e3a\u7a7a\u3002\u8fd9\u4f1a\u5bfc\u81f4Nginx\u65e0\u6cd5\u8fde\u63a5\u5230php\u7684\u9a71\u52a8\u5668\uff0c\u6240\u4ee5\u5728\u5b89\u88c5php8.1\u7684\u6307\u4ee4\u91cc\u9762\u8981\u52a0\u4e0a\u5b89\u88c5php-pdo-mysql\u7684\u6307\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get install -y php-pdo-mysql<\/pre>\n\n\n\n<p>\u4ee5\u4e0a\u4e24\u7bc7\u8981\u5408\u8d77\u6765\u770b\u548c\u7528\uff0c\u800c\u670d\u52a1\u5668\u5b89\u88c5\u52a1\u5fc5\u8981\u5b8c\u5907\uff0c\u4e0d\u7136\u4f1a\u51fa\u73b0\u5f88\u591a\u5947\u602a\u7684\u95ee\u9898,\u53e6\u5916\u5728\u4f60\u8ddf\u7740\u6267\u884c\u7684\u65f6\u5019\uff0c\u6700\u597d\u662f\u770b\u5b8c\u4e0a\u4e0b\u6587\u5728\u4e00\u6b65\u4e00\u6b65\u6267\u884c\u5230\u5e95\uff0c\u56e0\u4e3a\u5176\u4e2d\u5f88\u591a\u662f\u5728\u5f53\u65f6\u6b65\u9aa4\u4e0b\u8bd5\u884c\u4e00\u6b65\u7528\u6765\u9a8c\u8bc1\uff0c\u6700\u7ec8\u53c8\u4f1a\u5220\u9664\u6389\u7684\uff0c\u5982\u679c\u4f60\u8fd8\u7559\u7740\u8bd5\u884c\u7684\u8bbe\u7f6e\uff0c\u52bf\u5fc5\u540e\u9762\u4f1a\u6709\u5f88\u591a\u9ebb\u70e6\uff0c\u6bd4\u5982index.html\u548cphp.ini\u7684\u5185\u5bb9\uff0c\u5f53\u7136\u5982\u679c\u6211\u6ca1\u6709\u8bd5\u9519\u4e5f\u4e0d\u4f1a\u6709\u8fd9\u4e2a\u5fe0\u544a\uff0c\u800c\u53c8\u8fd9\u4e2a\u5fe0\u544a\u53c8\u611f\u89c9\u5b66\u5230\u4e86\u70b9\u4ec0\u4e48\u3002<\/p>\n\n\n\n<p>\u5728\u641e\u5b9ahttps\uff08ssl\uff09\u4e4b\u540e\u4e0d\u8981\u5fd8\u4e86\u4e24\u4ef6\u4e8b\uff1a\u5728VPS\u5b89\u5168\u7ba1\u7406\u91cc\u9762\u653e\u884c443\u7aef\u53e3\uff1b\u5728ufw\u91cc\u9762\u653e\u884chttps\u670d\u52a1<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ubuntu@SGaws2:~$ sudo ufw allow 'Nginx HTTPS'\nRule added\nRule added (v6)\nubuntu@SGaws2:~$ sudo ufw status\nStatus: active\n\nTo                         Action      From\n--                         ------      ----\nNginx HTTP                 ALLOW       Anywhere                  \nOpenSSH                    ALLOW       Anywhere                  \nNginx HTTPS                ALLOW       Anywhere                  \nNginx HTTP (v6)            ALLOW       Anywhere (v6)             \nOpenSSH (v6)               ALLOW       Anywhere (v6)             \nNginx HTTPS (v6)           ALLOW       Anywhere (v6)<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/www.digitalocean. [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[253,249],"tags":[2890,2610,59,2888,2887,2886,2889,2885],"class_list":["post-3313","post","type-post","status-publish","format-standard","hentry","category-fun","category-technology","tag-certbot","tag-ssl","tag-www-data","tag-2888","tag-2887","tag-web","tag-wordpress","tag-www"],"_links":{"self":[{"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/3313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3313"}],"version-history":[{"count":5,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/3313\/revisions"}],"predecessor-version":[{"id":3516,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/3313\/revisions\/3516"}],"wp:attachment":[{"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}