{"id":3297,"date":"2021-01-26T20:08:00","date_gmt":"2021-01-26T11:08:00","guid":{"rendered":"https:\/\/jikoman.sin-cos.com\/blog\/?p=3297"},"modified":"2021-01-26T20:08:00","modified_gmt":"2021-01-26T11:08:00","slug":"vpscentos8-17-php","status":"publish","type":"post","link":"https:\/\/jikoman.sin-cos.com\/blog\/2021\/01\/vpscentos8-17-php\/","title":{"rendered":"\u3055\u304f\u3089\u306eVPS\u3067CentOS8 (17) PHP\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"\n<p><a href=\"\/blog\/2021\/01\/%e3%81%95%e3%81%8f%e3%82%89%e3%81%aevps%e3%81%a7centos8-16-mysqlmariasql%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab\/\" data-type=\"post\">\u524d\u56de<\/a>\u306f\u3001MariaDB\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u3001PHP\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3044\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308bPHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u30012020\u5e7411\u670826\u65e5\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\uff18\u3002<\/p>\n\n\n\n<p>CentOS8\u306e\u6a19\u6e96\u30ec\u30dd\u30b8\u30c8\u30ea\u3067\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u51fa\u6765\u306a\u3044\u305f\u3081\u3001\u307e\u305a\u306fEPEL\u30ec\u30dd\u30b8\u30c8\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\u4e00\u9023\u306e\u6295\u7a3f\u306e\u4e2d\u3067\u3059\u3067\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u304c\u3001\u4e00\u898b\u3055\u3093\u306e\u305f\u3081\u306b\u30b3\u30de\u30f3\u30c9\u3092\u66f8\u3044\u3066\u304a\u304f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum install epel-release\n# yum update<\/pre>\n\n\n\n<p>\u6b21\u306b\u3001Remi\u30ec\u30dd\u30b8\u30c8\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># rpm -ivh http:\/\/rpms.remirepo.net\/enterprise\/remi-release-8.rpm\n# rpm --import http:\/\/rpms.remirepo.net\/RPM-GPG-KEY-remi\n# dnf config-manager --set-enabled remi<\/pre>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u53ef\u80fd\u306aPHP\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u8868\u793a\u3057\u3066\u307f\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ dnf module list php\nCentOS Linux 8 - AppStream\nName                Stream                 Profiles                                 Summary                             \nphp                 7.2 [d]                common [d], devel, minimal               PHP scripting language              \nphp                 7.3                    common [d], devel, minimal               PHP scripting language              \nphp                 7.4                    common [d], devel, minimal               PHP scripting language              \n\nRemi's Modular repository for Enterprise Linux 8 - x86_64\nName                Stream                 Profiles                                 Summary                             \nphp                 remi-7.2               common [d], devel, minimal               PHP scripting language              \nphp                 remi-7.3               common [d], devel, minimal               PHP scripting language              \nphp                 remi-7.4               common [d], devel, minimal               PHP scripting language              \nphp                 remi-8.0               common [d], devel, minimal               PHP scripting language              \n\n\u30d2\u30f3\u30c8: [d]efault, [e]nabled, [x]disabled, [i]nstalled\n<\/pre>\n\n\n\n<p>PHP\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30ea\u30bb\u30c3\u30c8\u3057\u3066\u3001remi-8.0\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># dnf module reset php\n# dnf module install php:remi-8.0\n\u4f9d\u5b58\u95a2\u4fc2\u304c\u89e3\u6c7a\u3057\u307e\u3057\u305f\u3002\n========================================================================================================================\n \u30d1\u30c3\u30b1\u30fc\u30b8                Arch            \u30d0\u30fc\u30b8\u30e7\u30f3                                       \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc          \u30b5\u30a4\u30ba\n========================================================================================================================\ngroup\/module\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb:\n php-cli                   x86_64          8.0.1-1.el8.remi                                 remi-modular          4.7 M\n php-common                x86_64          8.0.1-1.el8.remi                                 remi-modular          1.2 M\n php-fpm                   x86_64          8.0.1-1.el8.remi                                 remi-modular          1.6 M\n php-mbstring              x86_64          8.0.1-1.el8.remi                                 remi-modular          523 k\n php-xml                   x86_64          8.0.1-1.el8.remi                                 remi-modular          236 k\n\u4f9d\u5b58\u95a2\u4fc2\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb:\n oniguruma5php             x86_64          6.9.6-1.el8.remi                                 remi-safe             208 k\n\u5f31\u3044\u4f9d\u5b58\u95a2\u4fc2\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb:\n nginx-filesystem          noarch          1:1.14.1-9.module_el8.0.0+184+e34fea82           appstream              24 k\n\u30e2\u30b8\u30e5\u30fc\u30eb\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d:\n php\/common                                                                                                            \n\u30e2\u30b8\u30e5\u30fc\u30eb\u30b9\u30c8\u30ea\u30fc\u30e0\u306e\u6709\u52b9\u5316\u4e2d:\n nginx                                     1.14                                                                        \n php                                       remi-8.0                                                                    <\/pre>\n\n\n\n<p>PHP\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u305f\u3002<\/p>\n\n\n\n<p>\u3067\u3082\u3001nginx-filesystem\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3001nginx\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u30b9\u30c8\u30ea\u30fc\u30e0\u304c\u6709\u52b9\u5316\u3055\u308c\u3066\u3044\u308b\u3002\u306a\u305c\uff1f<\/p>\n\n\n\n<p>\u306a\u306b\u306f\u3068\u3082\u3042\u308c\u3001PHP\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u518d\u5ea6\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ dnf module list php\nCentOS Linux 8 - AppStream\nName              Stream                   Profiles                                   Summary                           \nphp               7.2 [d]                  common [d], devel, minimal                 PHP scripting language            \nphp               7.3                      common [d], devel, minimal                 PHP scripting language            \nphp               7.4                      common [d], devel, minimal                 PHP scripting language            \n\nRemi's Modular repository for Enterprise Linux 8 - x86_64\nName              Stream                   Profiles                                   Summary                           \nphp               remi-7.2                 common [d], devel, minimal                 PHP scripting language            \nphp               remi-7.3                 common [d], devel, minimal                 PHP scripting language            \nphp               remi-7.4                 common [d], devel, minimal                 PHP scripting language            \nphp               remi-8.0 <strong>[e]<\/strong>             common [d] <strong>[i]<\/strong>, devel, minimal             PHP scripting language            \n\n\u30d2\u30f3\u30c8: [d]efault, [e]nabled, [x]disabled, [i]nstalled<\/pre>\n\n\n\n<p>remi-8.0\u304cenabled\u306b\u306a\u3063\u3066\u3001installed\u306b\u3082\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<p>PHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ php --version\nPHP <strong>8.0.1<\/strong> (cli) (built: Jan  5 2021 13:54:54) ( NTS gcc x86_64 )\nCopyright (c) The PHP Group\nZend Engine v4.0.1, Copyright (c) Zend Technologies<\/pre>\n\n\n\n<p>8.0.1\u3060\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3067\u3072\u3068\u307e\u305aPHP\u306e\u57fa\u672c\u90e8\u5206\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3002<\/p>\n\n\n\n<p>MariaDB\u3092\u5165\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u9023\u643a\u306e\u305f\u3081\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3088\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># dnf install php-mysqlnd<\/pre>\n\n\n\n<p>\u6700\u5f8c\u306b\u3001PHP\u304c\u6b63\u5e38\u306b\u6a5f\u80fd\u3057\u3066\u3044\u308b\u304b\u3001PHP\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u30c6\u30b9\u30c8\u3057\u305f\u3044\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># vi \/var\/www\/html\/test_phpinfo.php<\/pre>\n\n\n\n<p>\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u306b\u306f\u6b21\u306e\u4e00\u884c\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php phpinfo(); ?><\/pre>\n\n\n\n<p>\u3067\u3001https:\/\/yourhost.sakura.ne.jp\/test_phpinfo.php\u3092\u8868\u793a\u3059\u308b\u3068\u3001<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2021\/01\/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88_2021-01-25_23_20_52-1024x781.png\" alt=\"\" class=\"wp-image-3302\"\/><figcaption>PHPinfo<\/figcaption><\/figure>\n\n\n\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u8868\u793a\u3055\u308c\u305f\u3089\u6a5f\u80fd\u3057\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068PHP\u304c\u3001\u3068\u308a\u3042\u3048\u305a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u305f\u306e\u3067\u3001\u6b21\u56de\u306f\u3001WordPress\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3088\u3046\u3002<\/p>\n\n\n\n<p class=\"has-text-align-center\"><a rel=\"nofollow\" href=\"https:\/\/px.a8.net\/svt\/ejp?a8mat=25TUZH+402XY2+D8Y+C164Y\">\u3055\u304f\u3089\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306eVPS<\/a><img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"1\" height=\"1\" src=\"https:\/\/www16.a8.net\/0.gif?a8mat=25TUZH+402XY2+D8Y+C164Y\" alt=\"\"><a href=\"https:\/\/px.a8.net\/svt\/ejp?a8mat=25TUZH+402XY2+D8Y+C7TC1\" rel=\"nofollow\">\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"728\" height=\"90\" alt=\"\" src=\"https:\/\/www20.a8.net\/svt\/bgt?aid=130723613242&amp;wid=002&amp;eno=01&amp;mid=s00000001717002052000&amp;mc=1\"><\/a><img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"1\" height=\"1\" src=\"https:\/\/www18.a8.net\/0.gif?a8mat=25TUZH+402XY2+D8Y+C7TC1\" alt=\"\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u306f\u3001MariaDB\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3002 \u4eca\u56de\u306f\u3001PHP\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3044\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129],"tags":[43,64],"class_list":["post-3297","post","type-post","status-publish","format-standard","hentry","category-pc","tag-vps","tag-64"],"_links":{"self":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts\/3297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/comments?post=3297"}],"version-history":[{"count":0,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts\/3297\/revisions"}],"wp:attachment":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/media?parent=3297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/categories?post=3297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/tags?post=3297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}