{"id":9946,"date":"2020-12-28T13:20:36","date_gmt":"2020-12-28T04:20:36","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=9946"},"modified":"2024-01-03T12:20:48","modified_gmt":"2024-01-03T03:20:48","slug":"php%e3%82%92%e3%82%a2%e3%83%83%e3%83%97%e3%82%b0%e3%83%ac%e3%83%bc%e3%83%89%e3%81%99%e3%82%8b%ef%bc%81%ef%bc%887-1%e2%86%927-4%ef%bc%89","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/9946","title":{"rendered":"CentOS 7\u306ePHP\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3059\u308b\uff01\uff087.1\u21927.4\uff09"},"content":{"rendered":"<p>PHP\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u307e\u3059\u3002\u672c\u7a3f\u3067\u306f\u30017.1\u304b\u30897.4\u306b\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u307e\u3057\u305f\u3002<br \/>\n<!--more--><\/p>\n<h2>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bPHP\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bPHP\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ yum list installed | grep php\r\nphp.x86_64                           7.1.12-4.el7.remi               @remi-php71\r\nphp-cli.x86_64                       7.1.12-4.el7.remi               @remi-php71\r\nphp-common.x86_64                    7.1.12-4.el7.remi               @remi-php71\r\nphp-gd.x86_64                        7.1.12-4.el7.remi               @remi-php71\r\nphp-json.x86_64                      7.1.12-4.el7.remi               @remi-php71\r\nphp-mbstring.x86_64                  7.1.12-4.el7.remi               @remi-php71\r\nphp-mcrypt.x86_64                    7.1.12-4.el7.remi               @remi-php71\r\nphp-mysqlnd.x86_64                   7.1.12-4.el7.remi               @remi-php71\r\nphp-pdo.x86_64                       7.1.12-4.el7.remi               @remi-php71\r\n<\/pre>\n<h2>PHP\u3092\u524a\u9664\u3059\u308b\uff01<\/h2>\n<p>PHP\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo yum remove php php-*\r\n...\r\n$ yum list installed | grep php\r\n$\r\n<\/pre>\n<h2>\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u767b\u9332\u3059\u308b\uff01<\/h2>\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo yum install http:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm\r\n<\/pre>\n<h2>PHP7.4\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01<\/h2>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo yum -y install --enablerepo=remi,remi-php74,epel php php-mbstring php-mcrypt php-mysql php-gd\r\n<\/pre>\n<h2>PHP7.4\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7d50\u679c\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>PHP7.4\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7d50\u679c\u3092\u78ba\u8a8d\u3057\u307e\u3059\uff01<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ yum list installed | grep php\r\noniguruma5php.x86_64                 6.9.6-1.el7.remi                @remi      \r\nphp.x86_64                           7.4.13-1.el7.remi               @remi-php74\r\nphp-cli.x86_64                       7.4.13-1.el7.remi               @remi-php74\r\nphp-common.x86_64                    7.4.13-1.el7.remi               @remi-php74\r\nphp-gd.x86_64                        7.4.13-1.el7.remi               @remi-php74\r\nphp-json.x86_64                      7.4.13-1.el7.remi               @remi-php74\r\nphp-mbstring.x86_64                  7.4.13-1.el7.remi               @remi-php74\r\nphp-mysqlnd.x86_64                   7.4.13-1.el7.remi               @remi-php74\r\nphp-pdo.x86_64                       7.4.13-1.el7.remi               @remi-php74\r\nphp-pecl-mcrypt.x86_64               1.0.4-1.el7.remi.7.4            @remi-php74\r\nphp-sodium.x86_64                    7.4.13-1.el7.remi               @remi-php74\r\n$ php -v\r\nPHP 7.4.13 (cli) (built: Nov 24 2020 10:03:34) ( NTS )\r\nCopyright (c) The PHP Group\r\nZend Engine v3.4.0, Copyright (c) Zend Technologies\r\n<\/pre>\n<h2>PHP7.4\u306e\u8a2d\u5b9a\u3092\u3057\u306a\u304a\u3059\uff01<\/h2>\n<p>PHP\u3092\u518d\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3001PHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u51fa\u529b\u3001\u65e5\u672c\u8a9e\u306b\u95a2\u9023\u3059\u308b\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo cp -p \/etc\/php.ini ~\/php.ini_org\r\n$ sudo vi \/etc\/php.ini\r\nexpose_php = Off\r\ndate.timezone = &quot;Asia\/Tokyo&quot;\r\nmbstring.language = Japanese\r\nmbstring.internal_encoding = UTF-8\r\nmbstring.http_input = pass\r\nmbstring.http_output = pass\r\nmbstring.encoding_translation = Off\r\nmbstring.detect_order = auto\r\nmbstring.substitute_character = none;\r\nmbstring.func_overload = 0\r\nmbstring.strict_detection = Off\r\n<\/pre>\n<h2>Apache\u3092\u518d\u8d77\u52d5\u3057\u3066\u52d5\u4f5c\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>Apache\u3092\u518d\u8d77\u52d5\u3057\u3066\u52d5\u4f5c\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ cd \/var\/www\/html\r\n$ sudo vi phpcheck.php\r\n&lt;?php phpinfo(); ?&gt;\r\n$ sudo chmod 755 phpcheck.php\r\n$ sudo systemctl stop httpd.service\r\n$ sudo systemctl start httpd.service\r\n$ sudo systemctl status httpd.service\r\n\u25cf httpd.service - The Apache HTTP Server\r\nLoaded: loaded (\/usr\/lib\/systemd\/system\/httpd.service; enabled; vendor preset: disabled)\r\nActive: active (running) since Thu 2017-11-23 17:36:36 JST; 7s ago\r\n...\r\n<\/pre>\n<p>\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3001PHP\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u60c5\u5831\u306e\u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nhttp:\/\/133.130.127.128\/phpcheck.php\r\n<\/pre>\n<p>\u78ba\u8a8d\u304c\u7d42\u4e86\u3057\u305f\u3089\u3001\u300cphpcheck.php\u300d\u306f\u524a\u9664\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>PHP\u306f\u3001WordPress\u306e\u7ba1\u7406\u753b\u9762\u3067\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u6c42\u3081\u3089\u308c\u308b\u306e\u3067\u3001\u6c17\u5408\u3044\u3092\u5165\u308c\u306a\u304a\u3057\u3066\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u884c\u3044\u307e\u3057\u305f\u3002<\/p>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/13532\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011\u516c\u958b\u7528\u306eWordPress\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3059\u308b\uff01\uff08CentOS 7\uff09\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2022\/11\/eyecatch_serverapps_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011\u516c\u958b\u7528\u306eWordPress\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3059\u308b\uff01\uff08CentOS 7\uff09<\/div><div class=\"substr\">WordPress\u30b5\u30fc\u30d0\u3092\u3001CentOS7\u3067\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u307e\u3059\u3002\u672c\u7a3f\u3067\u306f\u30017.1\u304b\u30897.4\u306b\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"author":1,"featured_media":14987,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[155],"tags":[545,546,543,479],"class_list":["post-9946","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-centos-7","tag-php","tag-wordpress","tag-479"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/9946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=9946"}],"version-history":[{"count":5,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/9946\/revisions"}],"predecessor-version":[{"id":15696,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/9946\/revisions\/15696"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/14987"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=9946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=9946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=9946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}