{"id":3352,"date":"2016-11-14T11:58:46","date_gmt":"2016-11-14T03:58:46","guid":{"rendered":"http:\/\/blog.hoyo.idv.tw\/?p=3352"},"modified":"2019-07-25T17:48:10","modified_gmt":"2019-07-25T09:48:10","slug":"centos-7-%e5%ae%89%e8%a3%9d%e3%80%81%e5%8d%87%e7%b4%9a-php-5-6","status":"publish","type":"post","link":"https:\/\/blog.hoyo.idv.tw\/?p=3352","title":{"rendered":"CentOS 7 \u5b89\u88dd\u3001\u5347\u7d1a PHP 5.6"},"content":{"rendered":"<p><span style=\"color: #ff6600;\">\u4f7f\u7528\u81ea\u8a02 repo \u7684\u65b9\u5f0f\u7121\u6cd5\u9806\u5229\u5b89\u88dd php-gd \u7b49\u5f85\u6e2c\u8a66\u66f4\u65b0<\/span><\/p>\n<p>--<\/p>\n<p>\u53c3\u8003<\/p>\n<ul>\n<li><a href=\"https:\/\/www.digitalocean.com\/community\/questions\/how-to-install-php-5-6-on-centos-7-0-x64\" target=\"_blank\" rel=\"noopener\">How to install PHP 5.6 on CentOS 7.0 x64<\/a><\/li>\n<li><a href=\"https:\/\/martincarlin.uk\/2016\/06\/29\/upgrade-php-from-5-4-to-5-6-on-centos-7\/\">Upgrade PHP from 5.4 to 5.6 on CentOS 7<\/a><\/li>\n<li>rpms.famillecollet.com\/enterprise\/7\/php56\/x86_64\/<\/li>\n<li>rpms.famillecollet.com\/enterprise\/7\/remi\/x86_64\/<\/li>\n<li><a href=\"http:\/\/qiita.com\/ozawan\/items\/caf6e7ddec7c6b31f01e\" target=\"_blank\" rel=\"noopener\">CentOS6\uff0fCentOS7\u306bPHP5.6\uff0fPHP7\u3092yum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li>\n<\/ul>\n<p>--<\/p>\n<h2>\u5b89\u88dd\u3001\u66f4\u65b0 EPEL<\/h2>\n<pre class=\"lang:default decode:true\">rpm -Uvh https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm\r\nrpm -Uvh https:\/\/mirror.webtatic.com\/yum\/el7\/webtatic-release.rpm<\/pre>\n<p>--<\/p>\n<h2>\u7de8\u8f2f yum \u5bb9\u5668<\/h2>\n<p>vi\u00a0\/etc\/yum.repos.d\/repo.repo<\/p>\n<pre class=\"lang:default decode:true\">[remi-php56]\r\nname=Les RPM de remi de PHP 5.6 pour Enterprise Linux 7 - $basearch\r\nmirrorlist=http:\/\/rpms.famillecollet.com\/enterprise\/7\/php56\/x86_64\r\n# WARNING: If you enable this repository, you must also enable \"remi\"\r\nenabled=1\r\ngpgcheck=0\r\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-remi\r\n<\/pre>\n<p>\u96d6\u7136\u7db2\u8def\u4e0a\u6240\u6709\u7684\u8cc7\u6599\u90fd\u6709\u8a2d\u5b9a gpgkey \u4f46\u662f\u90fd\u6c92\u6709\u8aaa\u660e\u7522\u751f\u7684\u65b9\u6cd5\uff0c\u6240\u4ee5\u5982\u679c\u6709\u6b63\u5e38\u4f7f\u7528\u5fc5\u9808\u5c07 gpgcheck \u8a2d\u5b9a\u70ba 0<\/p>\n<p>--<\/p>\n<h2>\u66f4\u65b0 libzip<\/h2>\n<pre class=\"lang:default decode:true\">wget http:\/\/rpms.famillecollet.com\/enterprise\/7\/remi\/x86_64\/libzip-last-1.1.3-1.el7.remi.x86_64.rpm\r\nyum localinstall libzip-last-*.rpm\r\nyum update<\/pre>\n<p>--<\/p>\n<h2>\u5b89\u88dd\u3001\u66f4\u65b0 PHP<\/h2>\n<pre class=\"lang:default decode:true\"># yum remove php-*\r\n# yum install --enablerepo=remi,remi-php56 php php-devel php-mbstring php-pdo php-gd php-xml php-mcrypt php-mysql<\/pre>\n<p>--<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p class=\"pvc_stats all \" data-element-id=\"3352\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> &nbsp;4,937&nbsp;total views<\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528\u81ea\u8a02 repo \u7684\u65b9\u5f0f\u7121\u6cd5...<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p class=\"pvc_stats all \" data-element-id=\"3352\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> &nbsp;4,937&nbsp;total views<\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[26],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/3352"}],"collection":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3352"}],"version-history":[{"count":5,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/3352\/revisions"}],"predecessor-version":[{"id":3354,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/3352\/revisions\/3354"}],"wp:attachment":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3352"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}