{"id":14,"date":"2021-01-04T12:09:25","date_gmt":"2021-01-04T04:09:25","guid":{"rendered":"https:\/\/explause.com\/?p=14"},"modified":"2021-11-03T16:22:27","modified_gmt":"2021-11-03T08:22:27","slug":"centos7%e7%bc%96%e8%af%91php8","status":"publish","type":"post","link":"https:\/\/devdoge.org\/?p=14","title":{"rendered":"CentOS7\u7f16\u8bd1PHP8"},"content":{"rendered":"\n<pre class=\"wp-block-verse\">CentOS7\u5b98\u65b9\u6e90\u7684php\u662f7.2\u7248\u672c\u7684\uff0c\u4e0d\u591fWordPress\u7684\u6700\u4f4e\u8981\u6c42\u3002\n\u4e0d\u591a\u8bf4\uff0c\u76f4\u63a5\u7ed9\u5e72\u5230\u6700\u65b0\u7248\u3002<\/pre>\n\n\n\n<p id=\"block-bc71b618-d234-4819-b221-09aff36f1941\">\u5148\u5378\u8f7d\u4ece\u5b98\u65b9\u6e90\u4e0b\u8f7d\u7684PHP\u4ee5\u53ca\u4f9d\u8d56\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum remove php -y\nyum autoremove<\/code><\/pre>\n\n\n\n<p>\u4e0b\u8f7d\u6e90\u7801\u5305\u5e76\u89e3\u538b\u8fdb\u5165\u6e90\u7801\u76ee\u5f55\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install wget -y\nwget https:\/\/www.php.net\/distributions\/php-8.0.12.tar.gz\ntar xzf php-8.0.12.tar.gz\ncd php-8.0.12<\/code><\/pre>\n\n\n\n<p>\u4e0b\u8f7d\u559c\u95fb\u4e50\u89c1\u7684\u5de5\u5177\u5305\u548c\u4f9d\u8d56\u4eec\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install epel-release -y\nyum groupinstall \"Development tools\" -y\nyum install libxml2-devel sqlite-devel oniguruma-devel httpd-devel \\\n            mysql-devel enchant-devel libffi-devel libwebp-devel \\\n            libXpm-devel libiodbc-devel libsodium-devel libxslt-devel \\\n            libcurl-devel libpng-devel libjpeg-devel freetype-devel \\\n            systemd-devel libacl-devel valgrind-devel libicu-devel \\\n            libedit-devel -y<\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f\uff0c\u5f00\u542fzip\u652f\u6301\u9700\u8981<a href=\"https:\/\/explause.com\/?p=27\">\u5b89\u88c5libzip<\/a>\uff01<\/p>\n\n\n\n<p>\u914d\u7f6e\u7f16\u8bd1\u9009\u9879\uff0c\u80fd\u5f00\u542f\u7684\u529f\u80fd\u90fd\u5f00\u542f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/configure --with-apxs2=\/usr\/bin\/apxs \\\n            --with-mysqli=\/usr\/bin\/mysql_config \\\n            --with-mysql-sock=\/var\/lib\/mysql\/mysql.sock \\\n            --with-openssl \\\n            --with-kerberos \\\n            --with-zlib \\\n            --with-curl \\\n            --with-enchant \\\n            --with-ffi \\\n            --with-webp \\\n            --with-jpeg \\\n            --with-xpm \\\n            --with-freetype \\\n            --with-zip \\\n            --with-pcre-jit \\\n            --with-mhash \\\n            --with-imap-ssl \\\n            --with-iodbc \\\n            --with-sodium \\\n            --with-xsl \\\n            --with-valgrind \\\n            --with-imap-ssl \\\n            --with-ldap-sasl \\\n            --with-unixODBC \\\n            --with-libedit \\\n            --enable-intl \\\n            --enable-exif \\\n            --enable-soap \\\n            --enable-gd \\\n            --enable-gd-jis-conv \\\n            --enable-zts \\\n            --enable-mbstring \\\n            --enable-sockets \\\n            --enable-sigchild \\\n            --enable-bcmath \\\n            --enable-calendar \\\n            --enable-dba \\\n            --enable-ftp \\\n            --enable-sysvmsg \\\n            --enable-sysvsem \\\n            --enable-sysvshm \\\n            --enable-fpm \\\n            --enable-shmop \\\n            --with-fpm-systemd \\\n            --with-fpm-acl<\/code><\/pre>\n\n\n\n<p>\u7f16\u8bd1\u5e76\u5b89\u88c5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>make &amp;&amp; make install<\/code><\/pre>\n\n\n\n<p>\u590d\u5236PHP\u914d\u7f6e\u6587\u4ef6\u5230\u89c4\u5b9a\u7684\u76ee\u5f55\uff0c\u5b8c\u6210\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp php.ini-production \/usr\/local\/lib\/php.ini<\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f\uff0c\u4ee5\u4e0a\u547d\u4ee4\u9ed8\u8ba4\u5b89\u88c5Apache httpd\u670d\u52a1\u5668\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7cfb\u7edf\u81ea\u5e26\u6e90\u7684PHP\u7248\u672c\u592a\u4f4e\uff0c\u88c5\u4e2aWordPress\u90fd\u4e0d\u884c\u3002\u7f16\u8bd1\u5f00\u542f\u7684\u529f\u80fd\u548c\u4f9d\u8d56\u7ad9\u957f\u90fd\u6574\u7406\u597d\u4e86\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[9,16,21],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-c7","tag-centos7","tag-php","tag-21"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"_links":{"self":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":6,"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":632,"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions\/632"}],"wp:attachment":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}