{"id":624,"date":"2020-08-25T13:38:55","date_gmt":"2020-08-25T05:38:55","guid":{"rendered":"https:\/\/www.kiccleaf.com\/?p=624"},"modified":"2020-08-27T17:30:44","modified_gmt":"2020-08-27T09:30:44","slug":"centos8%e5%ae%89%e8%a3%85php8","status":"publish","type":"post","link":"http:\/\/www.kiccleaf.com\/?p=624","title":{"rendered":"CentOS8\u5b89\u88c5PHP8"},"content":{"rendered":"\n<p>\u6700\u65b0\u7cfb\u7edf\u4e0a\u6765\u4e86\u8fd9\u5927\u534a\u5e74\u90fd\u6ca1\u6709\u65f6\u95f4\u5b89\u88c5\u7528\u7528\uff0cphp-8.0.0beta2 \u4e5f\u53d1\u5e03\u51fa\u6765\u4e86\uff0c\u5148\u8bb0\u5f55\u4e00\u4e0b\uff0cCentOS8\u5b89\u88c5\u9009\u62e9\u6700\u5c0f\u5b89\u88c5\uff08\u8ddf\u539f\u6765\u5b89\u88c5\u5dee\u4e0d\u591a\u6ca1\u53d8\u5316\uff09\uff0c\u6240\u4ee5\u5b89\u88c5\u901f\u5ea6\u5f88\u5feb\uff0c\u56e0\u4e3a\u662f\u6700\u5c0f\u5b89\u88c5\u6240\u4ee5\u6709\u4e9b\u5de5\u5177\u6ca1\u6709\uff0c\u80fd\u5c11\u5219\u5c11\u7684\u539f\u5219<\/p>\n\n\n\n<p>\u7b80\u5355\u8bf4\u4e00\u4e0byum\u6e90\u4fee\u6539<\/p>\n\n\n\n<p>\u5148\u5b89\u88c5wget\u5de5\u5177\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">yum install -y wget\ncd \/etc\/yum.repos.d\/\nmv CentOS-Base.repo CentOS-Base.repo.bak<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">wget -O \/etc\/yum.repos.d\/CentOS-Base.repo https:\/\/mirrors.aliyun.com\/repo\/Centos-8.repo<\/code><\/pre>\n\n\n\n<p>\u6216\u8005\u7528<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">curl -o \/etc\/yum.repos.d\/CentOS-Base.repo https:\/\/mirrors.aliyun.com\/repo\/Centos-8.repo<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">yum makecache \u751f\u6210\u7f13\u5b58<\/code><\/pre>\n\n\n\n<p>\u7cfb\u7edf\u7f3a\u5c11\u547d\u4ee4ifconfig\uff0cnetstat\uff0cwhois\u7b49\u547d\u4ee4\u9700\u8981\u5b89\u88c5net-tools.x86_64\uff0c\u53e6\u5916\u4e60\u60ef\u4f7f\u7528vim\u7f16\u8f91\u5668\uff0c\u6240\u4ee5\u6bcf\u6b21\u90fd\u4f1a\u5b89\u88c5\uff0c\u5e38\u7528\u7684screen\u4e5f\u662f\u8981\u5b89\u88c5\u7684\uff0c\u4f46\u5728CentOS8\u7cfb\u7edf\u4e0b\u76f4\u63a5yum install screen\u662f\u5b89\u88c5\u5931\u8d25\u7684<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">[root@kiccleaf ~]# yum install screen\nRepository AppStream is listed more than once in the configuration\nRepository extras is listed more than once in the configuration\nRepository PowerTools is listed more than once in the configuration\nRepository centosplus is listed more than once in the configuration\nLast metadata expiration check: 0:01:32 ago on Tue 25 Aug 2020 02:16:39 PM CST.\nNo match for argument: screen\nError: Unable to find a match: screen\n\u529e\u6cd5\u603b\u662f\u6709\u7684\uff0c\u5148\u5b89\u88c5epel-release\n[root@kiccleaf ~]# yum install -y epel-release\nInstalled:\n  epel-release-8-8.el8.noarch                                                                                                                                                                                                               \n\nComplete!\n[root@kiccleaf ~]# yum install -y screen\nInstalled:\n  screen-4.6.2-10.el8.x86_64                                                                                                                                                                                                                \n\nComplete!\n[root@kiccleaf ~]# \n\u5b89\u88c5\u6210\u529f\u4e86\uff01\u6d4b\u8bd5\u4e00\u4e0b\n[root@kiccleaf ~]# screen -S kiccleaf\n\u65b0\u7684\u7a97\u4f53\u91cc\u9762\u4e86\n[root@kiccleaf ~]#\nCtrl+ad  \u4e34\u65f6\u9000\u51fa\u7a97\u4f53\n[detached from 35676.kiccleaf]\n\n\u91cd\u65b0\u8fdb\u5165\u521a\u624d\u7684\u7a97\u4f53\n[root@kiccleaf ~]# screen -r kiccleaf\n\u9000\u51fa\u7a97\u4f53\n[root@kiccleaf ~]# exit\nexit\n[screen is terminating]\n\u5230\u6b64\u5b8c\u7f8e\u4f7f\u7528screen\u5de5\u5177\u4e86\u3002\n\u63a5\u4e0b\u53bb\u5b89\u88c5vim\u548c\u7f51\u7edc\u547d\u4ee4\n[root@kiccleaf ~]# yum install -y net-tools.x86_64 vim \n\u6765\u770b\u4e00\u4e0b\u7cfb\u7edf\u7684\u7248\u672c\u5427\n[root@kiccleaf ~]# cat \/etc\/redhat-release \nCentOS Linux release 8.2.2004 (Core) \n[root@kiccleaf ~]# \n<\/code><\/pre>\n\n\n\n<p>\u5148\u4e0b\u8f7dPHP8\u6e90\u7801\u5305\uff0c\u4e0b\u8f7d\u7f51\u5740\uff1a<a href=\"https:\/\/downloads.php.net\/~pollita\/\">https:\/\/downloads.php.net\/~pollita\/<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">[root@kiccleaf ]# wget https:\/\/downloads.php.net\/~pollita\/php-8.0.0beta2.tar.gz\n[root@kiccleaf ]# tar zxvf php-8.0.0beta2.tar.gz\n[root@kiccleaf ]# cd php-8.0.0beta2\n\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u8fdb\u884c\u914d\u7f6e\u5b89\u88c5\u76f8\u5e94\u7684\u6269\u5c55\n[root@kiccleaf php-8.0.0beta2]# .\/configure --prefix=\/usr\/local\/php --with-config-file-path=\/usr\/local\/php\/etc --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-fpm --enable-static --enable-sockets --with-zip --enable-calendar --enable-bcmath --enable-mbstring --with-zlib --with-iconv=\/usr\/local\/libiconv --enable-gd --enable-mbstring --with-curl --with-freetype --disable-ipv6 --disable-debug --with-openssl --enable-intl --enable-opcache\n\n[root@kiccleaf php-8.0.0beta2]# make \n[root@kiccleaf php-8.0.0beta2]# make install\n\n\u5728\u6267\u884c\u4e2d\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u95ee\u9898\uff0c\u8fd9\u91cc\u7b80\u5355\u8bf4\u660e\u4e00\u4e0b\uff1a\n\n1. configure: error: iconv does not support errno\n\n[root@kiccleaf ]# wget http:\/\/ftp.gnu.org\/pub\/gnu\/libiconv\/libiconv-1.15.tar.gz\n[root@kiccleaf ]# tar zxvf libiconv-1.15.tar.gz\n[root@kiccleaf libiconv-1.15]#  cd libiconv-1.15\n[root@kiccleaf libiconv-1.15]# .\/configure --prefix=\/usr\/local\/libiconv\n[root@kiccleaf libiconv-1.15]#  make \n[root@kiccleaf libiconv-1.15]#  make install\n\u5b89\u88c5\u597dPHP8\u540e\u914d\u7f6e\u8fdb\u884c\u542f\u52a8\n[root@kiccleaf php-8.0.0beta2]# cp sapi\/fpm\/init.d.php-fpm \/etc\/init.d\/php-fpm\n[root@kiccleaf php-8.0.0beta2]# chmod a+x \/etc\/init.d\/php-fpm\n[root@kiccleaf php-8.0.0beta2]# service php-fpm start\n[root@kiccleaf php-8.0.0beta2]# php -v\nPHP 8.0.0beta2 (cli) (built: Aug 24 2020 13:47:39) ( NTS )\nCopyright (c) The PHP Group\nZend Engine v4.0.0-dev, Copyright (c) Zend Technologies<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u65b0\u7cfb\u7edf\u4e0a\u6765\u4e86\u8fd9\u5927\u534a\u5e74\u90fd\u6ca1\u6709\u65f6\u95f4\u5b89\u88c5\u7528\u7528\uff0cphp-&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"http:\/\/www.kiccleaf.com\/?p=624\">Continue reading<span class=\"screen-reader-text\">CentOS8\u5b89\u88c5PHP8<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2,"footnotes":""},"categories":[4],"tags":[116,13,33],"class_list":["post-624","post","type-post","status-publish","format-standard","hentry","category-linux-","tag-centos8","tag-linux","tag-php","entry"],"views":7157,"_links":{"self":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts\/624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=624"}],"version-history":[{"count":15,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts\/624\/revisions"}],"predecessor-version":[{"id":721,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts\/624\/revisions\/721"}],"wp:attachment":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=624"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}