{"id":149,"date":"2021-01-23T10:43:29","date_gmt":"2021-01-23T02:43:29","guid":{"rendered":"http:\/\/www.apiworld.tech\/wordpress\/?p=149"},"modified":"2021-01-23T10:43:29","modified_gmt":"2021-01-23T02:43:29","slug":"jie-juephp801ubuntu20041zhongphp-wu-fa-gong-zuo-de","status":"publish","type":"post","link":"http:\/\/madapapa.com\/wordpress\/?p=149","title":{"rendered":"\u89e3\u51b3PHP8.0.1@Ubuntu20.04.1\u4e2dPHP\u65e0\u6cd5\u5de5\u4f5c\u7684\u95ee\u9898"},"content":{"rendered":"<p>\u524d\u4e24\u5468\u5728\u963f\u91cc\u4e91Ubuntu20.04\u4e0a\u5b89\u88c5\u6700\u65b0php8.0\u540e\uff0c\u6d4b\u8bd5phpinfo\uff0c\u603b\u662f\u65e0\u6cd5\u51fa\u73b0\u6210\u529f\u7684\u6d4b\u8bd5\u7ed3\u679c\uff0c\u5f80\u5f80\u662f\u76f4\u63a5\u4e0b\u8f7dinfo.php\u8fd9\u4e2a\u6587\u4ef6\uff0c\u8fd9\u4e8b\u60c5\u56f0\u6270\u62112\u5468\uff0c\u4eca\u5929\u7ec8\u4e8e\u641e\u5b9a\u4e86\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.apiworld.tech\/wordpress\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-23-at-10.48.51-AM.png\" alt=\"Screen Shot 2021-01-23 at 10.48.51 AM\"\/><\/p>\n<h2 id=\"toc_0\">\u7b2c\u4e00\u6b65\uff1a\u5347\u7ea7\u7cfb\u7edf\u6700\u65b0\u8865\u4e01<\/h2>\n<p>\u9996\u5148\u8981\u786e\u5b9aphp\u548cnginx\u90fd\u66f4\u65b0\u5230\u4e86\u6700\u65b0\u72b6\u6001<\/p>\n<pre><code class=\"language-text\">sudo apt-get update &amp;&amp; apt-get upgrade\n<\/code><\/pre>\n<p>\u68c0\u67e5nginx\u7248\u672c<\/p>\n<pre><code class=\"language-text\">nginx -v\n<\/code><\/pre>\n<p>\u6d4b\u8bd5nginx\u914d\u7f6e\u6587\u4ef6\u662f\u5426\u6709\u9519\u8bef<\/p>\n<pre><code class=\"language-text\">nginx -t\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/www.apiworld.tech\/wordpress\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-23-at-11.04.16-AM.png\" alt=\"Screen Shot 2021-01-23 at 11.04.16 AM\"\/><\/p>\n<p>\u68c0\u67e5php\u72b6\u6001<\/p>\n<pre><code class=\"language-text\">systemctl status php8.0-fpm.service\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/www.apiworld.tech\/wordpress\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-23-at-11.06.32-AM.png\" alt=\"Screen Shot 2021-01-23 at 11.06.32 AM\"\/><\/p>\n<h2 id=\"toc_1\">\u7b2c\u4e8c\u6b65a\uff1a\u4fee\u6539php\u548cnginx\u7684\u914d\u7f6e\u6587\u4ef6<\/h2>\n<p>\u4fee\u6539php.ini<\/p>\n<pre><code class=\"language-text\">.\/etc\/php\/8.0\/fpm\/php.ini\n<\/code><\/pre>\n<p>\u8fd9\u91cc\u6211\u6ca1\u6709\u505a\u4efb\u4f55\u4fee\u6539<br \/>\n<img decoding=\"async\" src=\"http:\/\/www.apiworld.tech\/wordpress\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-23-at-11.09.32-AM.png\" alt=\"Screen Shot 2021-01-23 at 11.09.32 AM\"\/><\/p>\n<h2 id=\"toc_2\">\u7b2c\u4e8c\u6b65b\u4fee\u6539nginx\u9ed8\u8ba4\u7ad9\u70b9\u914d\u7f6e<\/h2>\n<h3 id=\"toc_3\"><strong>\u8fd9\u91cc\u662f\u5173\u952e\uff1a<\/strong><\/h3>\n<h3 id=\"toc_4\"><strong>\u4e0d\u662f\u4fee\u6539\u201c.\/etc\/nginx\/nginx.conf\u201d\u8fd9\u4e2a\u6587\u4ef6\uff01\uff01<\/strong><\/h3>\n<p>\u8fdb\u5165\/etc\/nginx\/sites-available\uff0c\u4fee\u6539dafault\uff0c\u5f53\u7136\uff0c\u5148\u505a\u597d\u5907\u4efd<br \/>\n\u7136\u540e\u7f16\u8f91\u4e0b\u9762\u7eff\u8272\u90e8\u5206\uff0c\u53d6\u6d88\u6389\u6ce8\u91ca\uff0c\u7136\u540e\u628aphp7.4-fpm\u4fee\u6539\u4e3aphp8.0-fpm\uff0c\u6ce8\u610f\u540e\u9762\u7684\u62ec\u53f7\u4e5f\u8981\u53bb\u6389\u6ce8\u91ca<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.apiworld.tech\/wordpress\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-23-at-11.17.45-AM.png\" alt=\"Screen Shot 2021-01-23 at 11.17.45 AM\"\/><\/p>\n<p>\u6700\u540e\uff0c\u4e0d\u8981\u5fd8\u8bb0\u5220\u9664info.php\u8fd9\u4e2a\u6587\u4ef6\u3002<\/p>\n<p>\u53c2\u8003\u5982\u4e0b\uff1a<a href=\"https:\/\/www.liquidweb.com\/kb\/configure-nginx-read-php-ubuntu-16-04\/\">Update! Configure Nginx to Read PHP on Ubuntu 16.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u4e24\u5468\u5728\u963f\u91cc\u4e91Ubuntu20.04\u4e0a\u5b89\u88c5\u6700\u65b0php8.0\u540e\uff0c\u6d4b\u8bd5phpinfo\uff0c\u603b\u662f\u65e0\u6cd5\u51fa\u73b0\u6210\u529f\u7684\u6d4b\u8bd5\u7ed3\u679c\uff0c\u5f80\u5f80\u662f\u76f4\u63a5\u4e0b\u8f7dinfo.php\u8fd9\u4e2a\u6587\u4ef6\uff0c\u8fd9\u4e8b\u60c5\u56f0\u6270\u62112\u5468\uff0c\u4eca\u5929\u7ec8\u4e8e\u641e\u5b9a\u4e86\u3002 \u7b2c\u4e00\u6b65\uff1a\u5347\u7ea7\u7cfb\u7edf\u6700\u65b0\u8865\u4e01 \u9996\u5148\u8981\u786e\u5b9aphp\u548cnginx\u90fd\u66f4\u65b0\u5230\u4e86\u6700\u65b0\u72b6\u6001 sudo apt-get update &amp;&amp; apt-get upgrade \u68c0\u67e5nginx\u7248\u672c nginx -v \u6d4b\u8bd5nginx\u914d\u7f6e\u6587\u4ef6\u662f\u5426\u6709\u9519\u8bef nginx -t \u68c0\u67e5php\u72b6\u6001 systemctl status php8.0-fpm.service \u7b2c\u4e8c\u6b65a\uff1a\u4fee\u6539php\u548cnginx\u7684\u914d\u7f6e\u6587\u4ef6 \u4fee\u6539php.ini .\/etc\/php\/8.0\/fpm\/php.ini \u8fd9\u91cc\u6211\u6ca1\u6709\u505a\u4efb\u4f55\u4fee\u6539 \u7b2c\u4e8c\u6b65b\u4fee\u6539nginx\u9ed8\u8ba4\u7ad9\u70b9\u914d\u7f6e \u8fd9\u91cc\u662f\u5173\u952e\uff1a \u4e0d\u662f\u4fee\u6539\u201c.\/etc\/nginx\/nginx.conf\u201d\u8fd9\u4e2a\u6587\u4ef6\uff01\uff01 \u8fdb\u5165\/etc\/nginx\/sites-available\uff0c\u4fee\u6539dafault\uff0c\u5f53\u7136\uff0c\u5148\u505a\u597d\u5907\u4efd \u7136\u540e\u7f16\u8f91\u4e0b\u9762\u7eff\u8272\u90e8\u5206\uff0c\u53d6\u6d88\u6389\u6ce8\u91ca\uff0c\u7136\u540e\u628aphp7.4-fpm\u4fee\u6539\u4e3aphp8.0-fpm\uff0c\u6ce8\u610f\u540e\u9762\u7684\u62ec\u53f7\u4e5f\u8981\u53bb\u6389\u6ce8\u91ca \u6700\u540e\uff0c\u4e0d\u8981\u5fd8\u8bb0\u5220\u9664info.php\u8fd9\u4e2a\u6587\u4ef6\u3002 \u53c2\u8003\u5982\u4e0b\uff1aUpdate! Configure Nginx to Read PHP on Ubuntu 16.04<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[5,11],"tags":[14,18],"class_list":["post-149","post","type-post","status-publish","format-standard","hentry","category-linux","category-tech","tag-nginx","tag-php"],"_links":{"self":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=149"}],"version-history":[{"count":0,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/149\/revisions"}],"wp:attachment":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=149"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}