{"id":514,"date":"2016-07-08T20:16:28","date_gmt":"2016-07-08T11:16:28","guid":{"rendered":"https:\/\/dukehide.dip.jp\/wordpress\/com\/?p=514"},"modified":"2018-02-14T00:01:48","modified_gmt":"2018-02-13T15:01:48","slug":"php7-0-install","status":"publish","type":"post","link":"https:\/\/dukehide.com\/pc\/php7-0-install\/","title":{"rendered":"PHP7.0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p>CentOS 7\u306f\u6a19\u6e96\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u306fPHP5\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u304c\u3001WordPress\u9ad8\u901f\u5316\u306e\u4e00\u74b0\u3068\u3057\u3066PHP7\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3057\u305f\u3002<!--more--><\/p>\n<p>PHP7\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u524d\u306b\u3001EPEL\u3068Remi\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<div class=\"terminal\">\n# yum -y install epel-release<br \/>\n\uff08\u7565\uff09<br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb:<br \/>\n  epel-release.noarch 0:7-6<br \/>\n\u5b8c\u4e86\u3057\u307e\u3057\u305f!<br \/>\n<br \/>\n# wget http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-7.rpm<br \/>\n--2016-07-08 15:03:36--  http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-7.rpm<br \/>\nrpms.famillecollet.com (rpms.famillecollet.com) \u3092DNS\u306b\u554f\u3044\u3042\u308f\u305b\u3066\u3044\u307e\u3059... 195.154.241.117, 2001:bc8:33a1:100::1<br \/>\nrpms.famillecollet.com (rpms.famillecollet.com)|195.154.241.117|:80 \u306b\u63a5\u7d9a\u3057\u3066\u3044\u307e\u3059... \u63a5\u7d9a\u3057\u307e\u3057\u305f\u3002<br \/>\nHTTP \u306b\u3088\u308b\u63a5\u7d9a\u8981\u6c42\u3092\u9001\u4fe1\u3057\u307e\u3057\u305f\u3001\u5fdc\u7b54\u3092\u5f85\u3063\u3066\u3044\u307e\u3059... 200 OK<br \/>\n\u9577\u3055: 8147 (8.0K) [application\/x-rpm]<br \/>\n`remi-release-7.rpm' \u306b\u4fdd\u5b58\u4e2d<br \/>\n100%[================================================>] 8,147       --.-K\/s \u6642\u9593 0s<br \/>\n2016-07-08 15:03:36 (113 MB\/s) - `remi-release-7.rpm' \u3078\u4fdd\u5b58\u5b8c\u4e86 [8147\/8147]<br \/>\n<br \/>\n# rpm -ivh .\/remi-release-7.rpm<br \/>\n\u8b66\u544a: .\/remi-release-7.rpm: \u30d8\u30c3\u30c0\u30fc V4 DSA\/SHA1 Signature\u3001\u9375 ID 00f97f56: NOKEY<br \/>\n\u6e96\u5099\u3057\u3066\u3044\u307e\u3059...              ################################# [100%]<br \/>\n\u66f4\u65b0\u4e2d \/ \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d...<br \/>\n   1:remi-release-7.2-1.el7.remi      ################################# [100%]<br \/>\n<br \/>\n# ls -laF \/etc\/yum.repos.d\/<br \/>\n\u5408\u8a08 84<br \/>\ndrwxr-xr-x.   2 root root 4096  7\u6708  8 15:03 .\/<br \/>\ndrwxr-xr-x. 102 root root 8192  7\u6708  8 14:55 ..\/<br \/>\n-rw-r--r--.   1 root root 1697  7\u6708  4 19:35 CentOS-Base.repo<br \/>\n-rw-r--r--.   1 root root 1309 12\u6708  9  2015 CentOS-CR.repo<br \/>\n-rw-r--r--.   1 root root  649 12\u6708  9  2015 CentOS-Debuginfo.repo<br \/>\n-rw-r--r--.   1 root root  630 12\u6708  9  2015 CentOS-Media.repo<br \/>\n-rw-r--r--.   1 root root 1331 12\u6708  9  2015 CentOS-Sources.repo<br \/>\n-rw-r--r--.   1 root root 1952 12\u6708  9  2015 CentOS-Vault.repo<br \/>\n-rw-r--r--.   1 root root  290 12\u6708  9  2015 CentOS-fasttrack.repo<br \/>\n-rw-r--r--    1 root root 1056  3\u6708 31 13:05 epel-testing.repo<br \/>\n-rw-r--r--    1 root root  957  3\u6708 31 13:05 epel.repo<br \/>\n-rw-r--r--.   1 root root  739  6\u6708 12  2014 mirrors-rpmforge<br \/>\n-rw-r--r--.   1 root root  717  6\u6708 12  2014 mirrors-rpmforge-extras<br \/>\n-rw-r--r--.   1 root root  728  6\u6708 12  2014 mirrors-rpmforge-testing<br \/>\n-rw-r--r--    1 root root 1177  6\u6708 30 21:25 remi-php70.repo<br \/>\n-rw-r--r--    1 root root 1177  6\u6708 30 21:25 remi-php71.repo<br \/>\n-rw-r--r--    1 root root  449  6\u6708 30 21:25 remi-safe.repo<br \/>\n-rw-r--r--    1 root root 2340  6\u6708 30 21:25 remi.repo<br \/>\n-rw-r--r--.   1 root root 1128  6\u6708 12  2014 rpmforge.repo\n<\/div>\n<p><\/p>\n<p>EPEL\u3068Remi\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002\u7d9a\u3044\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u306ePHP\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n<div class=\"terminal\">\n# yum list installed |grep php<br \/>\nphp.x86_64                            5.4.16-36.1.el7_2.1             @updates<br \/>\nphp-cli.x86_64                        5.4.16-36.1.el7_2.1             @updates<br \/>\nphp-common.x86_64                     5.4.16-36.1.el7_2.1             @updates<br \/>\nphp-devel.x86_64                      5.4.16-36.1.el7_2.1             @updates<br \/>\nphp-fpm.x86_64                        5.4.16-36.1.el7_2.1             @updates<br \/>\nphp-gd.x86_64                         5.4.16-36.1.el7_2.1             @updates<br \/>\nphp-mbstring.x86_64                   5.4.16-36.1.el7_2.1             @updates<br \/>\nphp-mysql.x86_64                      5.4.16-36.1.el7_2.1             @updates<br \/>\nphp-pdo.x86_64                        5.4.16-36.1.el7_2.1             @updates<br \/>\nphp-pear.noarch                       1:1.9.4-21.el7                  @base<br \/>\nphp-process.x86_64                    5.4.16-36.1.el7_2.1             @updates<br \/>\nphp-xml.x86_64                        5.4.16-36.1.el7_2.1             @updates<br \/>\n<br \/>\n# yum -y remove php*<br \/>\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror, langpacks, priorities<br \/>\n\u4f9d\u5b58\u6027\u306e\u89e3\u6c7a\u3092\u3057\u3066\u3044\u307e\u3059<br \/>\n--> \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u78ba\u8a8d\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n---> \u30d1\u30c3\u30b1\u30fc\u30b8 php.x86_64 0:5.4.16-36.1.el7_2.1 \u3092 \u524a\u9664<br \/>\n---> \u30d1\u30c3\u30b1\u30fc\u30b8 php-cli.x86_64 0:5.4.16-36.1.el7_2.1 \u3092 \u524a\u9664<br \/>\n---> \u30d1\u30c3\u30b1\u30fc\u30b8 php-common.x86_64 0:5.4.16-36.1.el7_2.1 \u3092 \u524a\u9664<br \/>\n---> \u30d1\u30c3\u30b1\u30fc\u30b8 php-devel.x86_64 0:5.4.16-36.1.el7_2.1 \u3092 \u524a\u9664<br \/>\n---> \u30d1\u30c3\u30b1\u30fc\u30b8 php-fpm.x86_64 0:5.4.16-36.1.el7_2.1 \u3092 \u524a\u9664<br \/>\n---> \u30d1\u30c3\u30b1\u30fc\u30b8 php-gd.x86_64 0:5.4.16-36.1.el7_2.1 \u3092 \u524a\u9664<br \/>\n---> \u30d1\u30c3\u30b1\u30fc\u30b8 php-mbstring.x86_64 0:5.4.16-36.1.el7_2.1 \u3092 \u524a\u9664<br \/>\n---> \u30d1\u30c3\u30b1\u30fc\u30b8 php-mysql.x86_64 0:5.4.16-36.1.el7_2.1 \u3092 \u524a\u9664<br \/>\n---> \u30d1\u30c3\u30b1\u30fc\u30b8 php-pdo.x86_64 0:5.4.16-36.1.el7_2.1 \u3092 \u524a\u9664<br \/>\n---> \u30d1\u30c3\u30b1\u30fc\u30b8 php-pear.noarch 1:1.9.4-21.el7 \u3092 \u524a\u9664<br \/>\n---> \u30d1\u30c3\u30b1\u30fc\u30b8 php-process.x86_64 0:5.4.16-36.1.el7_2.1 \u3092 \u524a\u9664<br \/>\n---> \u30d1\u30c3\u30b1\u30fc\u30b8 php-xml.x86_64 0:5.4.16-36.1.el7_2.1 \u3092 \u524a\u9664<br \/>\n--> \u4f9d\u5b58\u6027\u89e3\u6c7a\u3092\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002<br \/>\n\u3000\uff1a<br \/>\n\uff08\u7565\uff09<br \/>\n\u3000\uff1a<br \/>\n\u524a\u9664\u3057\u307e\u3057\u305f:<br \/>\n\u3000\uff1a<br \/>\n\uff08\u7565\uff09<br \/>\n\u3000\uff1a<br \/>\n\u5b8c\u4e86\u3057\u307e\u3057\u305f!\n<\/div>\n<p><\/p>\n<p>PHP5.4\u306e\u524a\u9664\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u5148\u307b\u3069\u8ffd\u52a0\u3057\u305fRemi\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089PHP7.0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<div class=\"terminal\">\n# yum --enablerepo=remi,remi-php70 install php php-mysqlnd php-gd php-xml php-xmlrpc php-mbstring php-mcrypt php-fpm php-opcache php-apcu -y<br \/>\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror, langpacks, priorities<br \/>\nremi                                                               | 2.9 kB  00:00:00<br \/>\nremi-php70                                                         | 2.9 kB  00:00:00<br \/>\n(1\/2): remi-php70\/primary_db                                       | 140 kB  00:00:02<br \/>\n(2\/2): remi\/primary_db                                             | 1.4 MB  00:00:05<br \/>\nLoading mirror speeds from cached hostfile<br \/>\n * base: ftp.iij.ad.jp<br \/>\n * epel: ftp.iij.ad.jp<br \/>\n * extras: ftp.iij.ad.jp<br \/>\n * remi: mirror.innosol.asia<br \/>\n * remi-php70: mirror.innosol.asia<br \/>\n * remi-safe: mirror.innosol.asia<br \/>\n * rpmforge: ftp.riken.jp<br \/>\n * updates: ftp.iij.ad.jp<br \/>\n253 packages excluded due to repository priority protections<br \/>\n\u4f9d\u5b58\u6027\u306e\u89e3\u6c7a\u3092\u3057\u3066\u3044\u307e\u3059<br \/>\n\u3000\uff1a<br \/>\n\uff08\u7565\uff09<br \/>\n\u3000\uff1a<br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb:<br \/>\n  php70.x86_64 0:1.0-5.el7.remi<br \/>\n<br \/>\n\u4f9d\u5b58\u6027\u95a2\u9023\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f:<br \/>\n\u3000\uff1a<br \/>\n\uff08\u7565\uff09<br \/>\n\u3000\uff1a<br \/>\n\u5b8c\u4e86\u3057\u307e\u3057\u305f!<br \/>\n<br \/>\n# php -v<br \/>\nCannot load Zend OPcache - it was already loaded<br \/>\nPHP Warning:  Module 'apc' already loaded in Unknown on line 0<br \/>\nPHP Warning:  Module 'apcu' already loaded in Unknown on line 0<br \/>\nPHP 7.0.8 (cli) (built: Jun 22 2016 11:57:34) ( NTS )<br \/>\nCopyright (c) 1997-2016 The PHP Group<br \/>\nZend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies<br \/>\n    with Zend OPcache v7.0.8, Copyright (c) 1999-2016, by Zend Technologies\n<\/div>\n<p><\/p>\n<p>\u6700\u5f8c\u306bRemi\u30ea\u30dd\u30b8\u30c8\u30ea\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<div class=\"terminal\">\n# vi \/etc\/yum.repos.d\/remi-php70.repo<br \/>\n\u203b[remi-php70]\u306e\u76f4\u4e0b\u306b\u201cpriority=1\u201d\u3092\u8ffd\u8a18\n<\/div>\n<p><\/p>\n<p>\u7121\u4e8bPHP7.0\u306b\u306a\u308a\u307e\u3057\u305f\u3002CentOS 8(RHEL 8)\u3067\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067PHP7\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3044\u3044\u3067\u3059\u306d\u3047\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS 7\u306f\u6a19\u6e96\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u306fPHP5\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u304c\u3001WordPress\u9ad8\u901f\u5316\u306e\u4e00\u74b0\u3068\u3057\u3066PHP7\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"author":1,"featured_media":693,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false,"vkexunit_cta_each_option":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[112,3],"tags":[28,32],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/dukehide.com\/pc\/wordpress\/wp-content\/uploads\/2016\/07\/humanpict2_presentation01.png?fit=500%2C500&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p9iVw6-8i","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/posts\/514"}],"collection":[{"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/comments?post=514"}],"version-history":[{"count":0,"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/posts\/514\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/media\/693"}],"wp:attachment":[{"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/media?parent=514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/categories?post=514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dukehide.com\/pc\/wp-json\/wp\/v2\/tags?post=514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}