{"id":965,"date":"2022-07-22T16:47:09","date_gmt":"2022-07-22T08:47:09","guid":{"rendered":"http:\/\/www.rchen.top\/?p=965"},"modified":"2022-07-22T16:48:14","modified_gmt":"2022-07-22T08:48:14","slug":"linux%e4%b8%8b%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85php7-4%e8%af%a6%e7%bb%86%e8%bf%87%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.rchen.top\/?p=965","title":{"rendered":"linux\u4e0b\u7f16\u8bd1\u5b89\u88c5php7.4\u8be6\u7ec6\u8fc7\u7a0b"},"content":{"rendered":"<p><b>\u6b65\u9aa4<\/b><b>1<\/b><b>\u3001\u5b89\u88c5\u73af\u5883\u51c6\u5907<\/b><\/p>\n<p>\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\uff1acentos 7<\/p>\n<p>php\u7248\u672c\uff1aphp-7.4.16<\/p>\n<p>\u5148\u5b89\u88c5\u4e00\u4e9b\u4f9d\u8d56\u5e93<\/p>\n<p>yum -y install gcc*<\/p>\n<p>yum -y install libcurl-devel sqlite-devel libxml2-devel<\/p>\n<p>yum -y install libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel ncurses curl gdbm-devel db4-devel libXpm-devel libX11-devel gd-devel gmp-devel expat-devel xmlrpc-c xmlrpc-c-devel libicu-devel libmcrypt-devel libmemcached-devel<\/p>\n<p><b>\u6b65\u9aa4<\/b><b>2<\/b><b>\u3001\u4e0b\u8f7d<\/b><b>php<\/b><b>\u538b\u7f29\u5305\uff0c\u89e3\u538b\u540e\u8fdb\u5165\u5230\u76ee\u5f55\u4e0b<\/b><\/p>\n<p>cd \/usr\/local<\/p>\n<p>tar -zxvf\u00a0 php-7.4.16.tar.gz<\/p>\n<p><b>\u6b65\u9aa4<\/b><b>3<\/b><b>\u3001\u7f16\u8bd1\u5b89\u88c5<\/b><b>,<\/b><b>\u76f4\u63a5\u628a\u5e38\u7528\u7684\u6269\u5c55\u5b89\u88c5\u597d<\/b><b>,<\/b><b>\u514d\u5f97\u540e\u9762\u5728\u4e00\u4e2a\u4e00\u4e2a\u5b89\u88c5<\/b><b>(<\/b><b>\u63a8\u8350<\/b><b>)<\/b><\/p>\n<p>.\/configure &#8211;prefix=\/usr\/local\/php &#8211;with-curl &#8211;with-freetype &#8211;enable-gd &#8211;with-jpeg &#8211;with-gettext &#8211;with-gmp &#8211;with-mysqli &#8211;with-openssl &#8211;with-pdo-mysql &#8211;with-pear &#8211;with-xmlrpc &#8211;with-xsl &#8211;with-mhash &#8211;enable-fpm &#8211;enable-bcmath &#8211;enable-mbstring &#8211;enable-sockets &#8211;enable-xml &#8211;enable-embed &#8211;enable-phpdbg &#8211;with-bz2 &#8211;enable-calendar &#8211;with-curl &#8211;enable-exif &#8211;enable-ftp &#8211;enable-pcntl &#8211;with-zlib &#8211;with-readline &#8211;enable-shmop &#8211;enable-sockets<\/p>\n<p>\u770b\u5230\u5982\u4e0b\u4fe1\u606f\u5219\u7f16\u8bd1\u6210\u529f\uff08\u5982\u679c\u62a5\u9519\u53ef\u4ee5\u5220\u9664\u4e00\u4e9b\u4e0d\u9700\u8981\u6269\u5c55\uff09<\/p>\n<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<\/p>\n<p>| License:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<\/p>\n<p>| This software is subject to the PHP License, available in this\u00a0\u00a0\u00a0\u00a0 |<\/p>\n<p>| distribution in the file LICENSE. By continuing this installation\u00a0 |<\/p>\n<p>| process, you are bound by the terms of this license agreement.\u00a0\u00a0\u00a0\u00a0 |<\/p>\n<p>| If you do not agree with the terms of this license, you must abort |<\/p>\n<p>| the installation process at this point.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<\/p>\n<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<\/p>\n<p>Thank you for using PHP.<\/p>\n<p><b>\u6b65\u9aa4<\/b><b>4<\/b><b>\u3001<\/b><b>make<\/b><b>\u5b89\u88c5<\/b><\/p>\n<p>make &amp;&amp; make install<\/p>\n<p><b>\u6b65\u9aa4<\/b><b>5<\/b><b>.\u5b89\u88c5\u6210\u529f\u4e4b\u540e\uff0c\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf<\/b><\/p>\n<p>vi \/etc\/profile<\/p>\n<p>PATH=$PATH:\/usr\/lcoal\/php\/bin<\/p>\n<p>export PATH<\/p>\n<p>\u7acb\u5373\u751f\u6548<\/p>\n<p>source\u00a0 \/etc\/profile<\/p>\n<p><b>\u6b65\u9aa4<\/b><b>6<\/b><b>. \u6d4b\u8bd5\u67e5\u770bPHP\u7248\u672c<\/b><\/p>\n<p>php -v<\/p>\n<p>php -m \u67e5\u770b\u4e00\u4e9b\u6269\u5c55\u6a21\u5757<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6b65\u9aa41\u3001\u5b89\u88c5\u73af\u5883\u51c6\u5907 \u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\uff1acentos 7 php\u7248\u672c\uff1aphp-7.4.16 \u5148\u5b89\u88c5\u4e00\u4e9b\u4f9d\u8d56\u5e93 yu [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":966,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[95],"tags":[146],"class_list":["post-965","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-95","tag-php"],"_links":{"self":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=965"}],"version-history":[{"count":2,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/965\/revisions"}],"predecessor-version":[{"id":968,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/965\/revisions\/968"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/media\/966"}],"wp:attachment":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}