{"id":233,"date":"2022-09-02T09:38:42","date_gmt":"2022-09-02T01:38:42","guid":{"rendered":"https:\/\/www.jchj.top\/?p=233"},"modified":"2025-09-26T11:28:18","modified_gmt":"2025-09-26T03:28:18","slug":"php%e5%8d%87%e7%ba%a7%ef%bf%bc","status":"publish","type":"post","link":"https:\/\/www.jchj.top\/?p=233","title":{"rendered":"php\u7248\u672c\u5347\u7ea7"},"content":{"rendered":"\n<p>\u5728\u90e8\u7f72wordpress\u7ad9\u70b9\u65f6\u63d0\u793a<\/p>\n\n\n\n<p>\u201cYour server is running PHP version 5.4.16 but WordPress 6.0.1 requires at least 5.6.20\u201d\uff0c<\/p>\n\n\n\n<p>\u90e8\u7f72lnmp\u73af\u5883\u5168\u90e8\u662fyum\u5b89\u88c5\uff0c\u81ea\u5e26\u7684yum\u6e90php\u7248\u672c\u662f5.4.16\u4f46\u662fwordpress\u5b89\u88c5\u8981\u6c42\u7684\u65f65.6.20\u7684\u7248\u672c\u6240\u4ee5\u9700\u8981\u5347\u7ea7php<\/p>\n\n\n\n<p>\u4f7f\u7528rpm -qa php\u6216\u662fphp -v \u90fd\u53ef\u4ee5\u67e5\u770b\u672c\u673aphp\u7684\u5b89\u88c5\u7248\u672c\u3002<\/p>\n\n\n\n<p>[root@www wordpress]# rpm -qa php<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.jchj.top\/wp-content\/uploads\/2022\/09\/1-1.png\" alt=\"\" class=\"wp-image-234\" width=\"464\" height=\"54\"\/><\/figure>\n\n\n\n<p>[root@www \/]# php -v<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"798\" height=\"144\" src=\"https:\/\/www.jchj.top\/wp-content\/uploads\/2022\/09\/2-1.png\" alt=\"\" class=\"wp-image-235\"\/><\/figure>\n\n\n\n<p>\u5173\u95edphp-fpm<\/p>\n\n\n\n<p>[root@www \/]# systemctl stop php-fpm<\/p>\n\n\n\n<p>\u5378\u8f7dyum\u5b89\u88c5\u7684php<\/p>\n\n\n\n<p>[root@www \/]# yum remove php-fpm<\/p>\n\n\n\n<p>\u5b89\u88c5\u6e90epel yum install epel-release<\/p>\n\n\n\n<p>\u5b89\u88c5\u6e90remi<\/p>\n\n\n\n<p>yum install http:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm<\/p>\n\n\n\n<p>\u5b89\u88c5yum-config-manager<\/p>\n\n\n\n<p>yum -y install yum-utils<\/p>\n\n\n\n<p>\u7528yum-config-manager\u6307\u5b9aremi\u7684php7.4\u4ed3\u5e93<\/p>\n\n\n\n<p>yum-config-manager &#8211;enable remi-php74<\/p>\n\n\n\n<p>\u5b89\u88c5\u5347\u7ea7php<\/p>\n\n\n\n<p>yum update php php-opcache php-xml php-mcrypt php-gd php-devel php-mysql php-intl php-mbstring php-common php-cli php-gd php-curl -y<\/p>\n\n\n\n<p>\u9a8c\u8bc1\u5f53\u524dPHP\u7684\u7248\u672c<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.jchj.top\/wp-content\/uploads\/2022\/09\/3-1.png\" alt=\"\" class=\"wp-image-236\" width=\"726\" height=\"99\"\/><\/figure>\n\n\n\n<p>\u5b89\u88c5php-fpm<\/p>\n\n\n\n<p>[root@localhost ~]# yum install php-fpm<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"366\" src=\"https:\/\/www.jchj.top\/wp-content\/uploads\/2022\/09\/4-1.png\" alt=\"\" class=\"wp-image-237\"\/><\/figure>\n\n\n\n<p>\u542f\u52a8php-fpm<\/p>\n\n\n\n<p>[root@localhost ~]# systemctl start php-fpm [root@localhost ~]# systemctl enable php-fpm<\/p>\n\n\n\n<p>[root@localhost ~]# ss -tnl<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"108\" src=\"https:\/\/www.jchj.top\/wp-content\/uploads\/2022\/09\/5-1.png\" alt=\"\" class=\"wp-image-238\"\/><\/figure>\n\n\n\n<p>\u6ce8\uff1a\u5982\u679c\u8981\u5b89\u88c5\u5176\u5b83\u7248\u672c\uff0c\u53ef\u4ee5\u628a\u6b65\u9aa4\u4e03\u4e2d\u7684remi-php74\u6539\u4e3aremi-php72\u3001remi-php71\u3001remi-php70\u7b49<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u90e8\u7f72wordpress\u7ad9\u70b9\u65f6\u63d0\u793a \u201cYour s&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,7,1],"tags":[],"class_list":["post-233","post","type-post","status-publish","format-standard","hentry","category-linux","category-7","category-1"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.jchj.top\/index.php?rest_route=\/wp\/v2\/posts\/233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jchj.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jchj.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jchj.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jchj.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=233"}],"version-history":[{"count":3,"href":"https:\/\/www.jchj.top\/index.php?rest_route=\/wp\/v2\/posts\/233\/revisions"}],"predecessor-version":[{"id":241,"href":"https:\/\/www.jchj.top\/index.php?rest_route=\/wp\/v2\/posts\/233\/revisions\/241"}],"wp:attachment":[{"href":"https:\/\/www.jchj.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jchj.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jchj.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}