{"id":11666,"date":"2023-12-24T22:34:08","date_gmt":"2023-12-24T13:34:08","guid":{"rendered":"https:\/\/www.webcyou.com\/?p=11666"},"modified":"2023-12-24T22:34:12","modified_gmt":"2023-12-24T13:34:12","slug":"php-7-4%e3%81%ab%e3%82%a2%e3%83%83%e3%83%97%e3%83%87%e3%83%bc%e3%83%88","status":"publish","type":"post","link":"https:\/\/www.webcyou.com\/?p=11666","title":{"rendered":"php 7.4\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8"},"content":{"rendered":"\n<p>\u3069\u3082\u3067\u3059\u3002<\/p>\n<p>\u6bce\u5e74\u5e74\u672b\u306b\u306a\u3063\u3066\u3084\u3063\u3068\u3001WordPress\u306e\u8a2d\u5b9a\u8af8\u3005\u3092\u8abf\u6574\u3057\u3066\u3044\u308b\u6c17\u304c\u3059\u308b\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001PHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306b\u95a2\u3057\u3066\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>Red Hat\u7cfb\u306eLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\uff08Red Hat Enterprise Linux\u3001CentOS\u306a\u3069\uff09\u3067\u3001\u65e2\u5b58\u306ePHP\u30d1\u30c3\u30b1\u30fc\u30b8\u3092 <span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"1\">yum<\/span> \u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u72b6\u614b\u304b\u3089\u3001Remi\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u901a\u3058\u3066PHP 7.4\u306b\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3059\u308b\u65b9\u6cd5\u3068\u306a\u308a\u307e\u3059\u3002<!-- notionvc: 888bc757-3cdc-43f2-895c-8537060113e9 --><\/p>\n<h3>\u00a0<\/h3>\n<p><strong>\u6ce8\u610f\u4e8b\u9805<\/strong><\/p>\n<ul>\n<li>\u3053\u308c\u3089\u306e\u624b\u9806\u3092\u5b9f\u884c\u3059\u308b\u524d\u306b\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u308b\u3053\u3068\u3092\u5f37\u304f\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/li>\n<li>\u7279\u306b\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u74b0\u5883\uff08\u4f8b\u3048\u3070Apache\u3084Nginx\uff09\u3067PHP\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001PHP\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u304c\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3084\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u524d\u306b\u9069\u5207\u306a\u30c6\u30b9\u30c8\u3092\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<li>CentOS\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3088\u3063\u3066\u306f\u3001\u624b\u9806\u306b\u82e5\u5e72\u306e\u9055\u3044\u304c\u3042\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u4e0a\u8a18\u306e\u624b\u9806\u306f\u4e00\u822c\u7684\u306a\u30ac\u30a4\u30c9\u30e9\u30a4\u30f3\u3067\u3042\u308a\u3001\u7279\u5b9a\u306e\u30b7\u30b9\u30c6\u30e0\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u8abf\u6574\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/li>\n<\/ul>\n<h4>php 7.4\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8<\/h4>\n<h5><strong>\u65e2\u5b58\u306ePHP\u306e\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><\/h5>\n<p>\u65e2\u5b58\u306ePHP\u3092\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u884c\u3046\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3002<\/p>\n<p><!-- notionvc: 54d689e2-24a7-4061-9201-e46263bc5e72 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo yum remove php*<\/pre>\n<p>\u306f\u3044\u3002\u3053\u308c\u3067\u7dba\u9e97\u3055\u3063\u3071\u308aphp\u95a2\u4fc2\u304c\u524a\u9664\u3055\u308c\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u3053\u308f\u3044\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u52d5\u3044\u3066\u3044\u308b\u30b5\u30fc\u30d3\u30b9\u3082PHP\u304c\u306a\u304f\u306a\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u52d5\u304b\u306a\u304f\u306a\u308b\u306e\u3067\u6c17\u3092\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>nginx\u3092\u30ea\u30b9\u30bf\u30fc\u30c8\u3057\u306a\u3051\u308c\u3070\u826f\u3044\u3060\u308d\u3046\u306a\u3093\u3066\u5c11\u3057\u6d45\u306f\u304b\u306a\u4e8b\u601d\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u305d\u3093\u306a\u3053\u3068\u3082\u306a\u304f\u30a6\u30a7\u30d6\u5e33\u81ea\u8eab\u3082\u8868\u793a\u3057\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h5><strong>Remi\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8ffd\u52a0<\/strong><\/h5>\n<p>Remi\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30b7\u30b9\u30c6\u30e0\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u306f\u3001\u307e\u305aEPEL\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u6b21\u306bRemi\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><strong>1.EPEL\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><\/p>\n<p><!-- notionvc: fd0473e9-4767-46af-a5cd-740b2191936c --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo yum install epel-release<\/pre>\n<p><strong>2. Remi\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8ffd\u52a0<\/strong><!-- notionvc: c4133aee-9b93-40d5-abde-b14ed8ff6427 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo yum install https:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm  # CentOS 7\u306e\u5834\u5408\n# CentOS 8\u306e\u5834\u5408\u306f\u3001remi-release-8.rpm \u3092\u4f7f\u7528<\/pre>\n<h5><strong>\u00a0PHP 7.4\u306e\u6709\u52b9\u5316<\/strong><\/h5>\n<p>PHP 7.4\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u3001Remi\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089PHP 7.4\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: 96f314a1-b0d8-49c6-9709-370d96db6f0e --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo yum-config-manager --enable remi-php74<\/pre>\n<h5><strong>PHP 7.4\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><\/h5>\n<p>PHP 7.4\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: 2416d387-e0e8-4498-80f1-a0d8ef9255dc --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo yum install php php-cli php-fpm php-mysqlnd<\/pre>\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3067\u306f\u3001\u57fa\u672c\u7684\u306aPHP\u30d1\u30c3\u30b1\u30fc\u30b8\u3068CLI\u3001FPM\u3001MySQL\u306e\u30b5\u30dd\u30fc\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5fc5\u8981\u306a\u4ed6\u306ePHP\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u3042\u308c\u3070\u3001\u540c\u69d8\u306e\u65b9\u6cd5\u3067\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<!-- notionvc: 2d0813a2-a345-464c-bceb-7a8954abc495 --><\/p>\n<h5><strong>\u00a0PHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d<\/strong><\/h5>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u3001PHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: 8e8c203a-2a2e-4bf3-ac84-45d55e0ae7b1 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">php -v<\/pre>\n<p>\u3053\u308c\u3067PHP 7.4\u304c\u30b7\u30b9\u30c6\u30e0\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3001\u5229\u7528\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<!-- notionvc: 5744a510-7891-4408-8dad-c80fa2ca005a --><\/p>\n<p>\u3068\u3001\u3053\u308c\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u3082\u4e0a\u304c\u308a\u5b8c\u4e86\u3002\u3068\u601d\u3044\u304d\u3084\u3001<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">PHP 7.1.0 (cli) <\/pre>\n<p>\u5909\u308f\u3063\u3066\u3044\u306a\u3044\u30fc\u3002\u305d\u3093\u306a\u4eba\u306b\u3082\u3053\u3053\u304b\u3089\u306f\u3001\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c8\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0<\/h4>\n<p><span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"0\">php -v<\/span> \u30b3\u30de\u30f3\u30c9\u3067PHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u671f\u5f85\u901a\u308a\u306b\u5207\u308a\u66ff\u308f\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u3044\u304f\u3064\u304b\u306e\u539f\u56e0\u3068\u5bfe\u51e6\u6cd5\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002<!-- notionvc: 5b23fb09-96a5-4431-a994-0c39f836d66e --><!-- notionvc: 087a8915-167b-4d9b-932f-716b72f48063 --><\/p>\n<h5><strong>\u30d1\u30b9\u306e\u78ba\u8a8d<\/strong><\/h5>\n<ul>\n<li>\u73fe\u5728\u306e\u30b7\u30b9\u30c6\u30e0\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bPHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u7570\u306a\u308bPHP\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u8907\u6570\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n<p><!-- notionvc: 7daffb3d-82db-4461-8e47-f132c0018b14 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">whereis php<\/pre>\n<h5><strong>\u74b0\u5883\u5909\u6570\u306e\u78ba\u8a8d<\/strong><\/h5>\n<ul>\n<li><strong><code>php<\/code><\/strong> \u30b3\u30de\u30f3\u30c9\u304c\u53c2\u7167\u3057\u3066\u3044\u308b\u30d1\u30b9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bPHP\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u7570\u306a\u308b\u5834\u6240\u306b\u3042\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u305f\u3081\u3067\u3059\u3002<\/li>\n<\/ul>\n<p><!-- notionvc: 01b357e2-1547-4025-84c4-6037d7d58465 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">echo $PATH<\/pre>\n<p>\u6b63\u3057\u3044PHP\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u30d1\u30b9\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u30d1\u30b9\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002<!-- notionvc: 67912ba4-7282-409e-8bd0-096809a1acaf --><\/p>\n<h5><strong>\u30a2\u30eb\u30bf\u30ca\u30c6\u30a3\u30d6\u306e\u78ba\u8a8d<\/strong><\/h5>\n<ul>\n<li>CentOS\u3084RHEL\u3067\u306f\u3001<strong><code>alternatives<\/code><\/strong> \u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u7528\u3057\u3066\u7570\u306a\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7ba1\u7406\u3067\u304d\u307e\u3059\u3002PHP\u306e\u30a2\u30eb\u30bf\u30ca\u30c6\u30a3\u30d6\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo alternatives --config php<\/pre>\n<p>\u3053\u3053\u304b\u3089\u3001\u9069\u5207\u306aPHP\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u9078\u629e\u3067\u304d\u307e\u3059\u3002<!-- notionvc: 3f8d55a5-96bd-4137-8197-a251ab80ff53 --><\/p>\n<h5><strong>\u30b5\u30fc\u30d0\u30fc\u306e\u518d\u8d77\u52d5<\/strong><\/h5>\n<ul>\n<li>PHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u305f\u5f8c\u3001\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\uff08Apache, Nginx\u306a\u3069\uff09\u3092\u518d\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n<p><!-- notionvc: a12f2f28-075c-4e89-b137-7f981bf28d51 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo systemctl restart httpd  # Apache\u306e\u5834\u5408\nsudo systemctl restart nginx  # Nginx\u306e\u5834\u5408<\/pre>\n<h5><strong>\u30b7\u30b9\u30c6\u30e0\u306e\u518d\u8d77\u52d5<\/strong><\/h5>\n<ul>\n<li>\u307e\u308c\u306b\u3001\u5168\u4f53\u306e\u30b7\u30b9\u30c6\u30e0\u3092\u518d\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u7279\u306b\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306ePHP\u304c\u30b7\u30b9\u30c6\u30e0\u30ec\u30d9\u30eb\u3067\u8a8d\u8b58\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/li>\n<\/ul>\n<p><!-- notionvc: e8f450b6-0ae6-4982-adf6-fa2d2c7fb1b8 --><\/p>\n<h5><strong>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u78ba\u8a8d<\/strong><\/h5>\n<ul>\n<li>Remi\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u6b63\u3057\u3044PHP\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3053\u3068\u3092\u518d\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<p><!-- notionvc: a612e259-c69c-4308-8188-a2c4a8408971 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo yum list installed | grep php<\/pre>\n<p>\u3068\u3044\u3063\u305f\u3068\u3053\u308d\u3067\u3001\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002\u6b63\u3057\u304f\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u5909\u66f4\u3055\u308c\u305f\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u81ea\u5206\u306f\u3001\u8907\u6570\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3057\u305f\u3002\u306a\u306e\u3067\u3001\u6b63\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u4fee\u6b63\u3002<\/p>\n<h4>\u8907\u6570\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5b58\u5728\u3059\u308b\u5834\u5408<!-- notionvc: 7b76221b-242c-4d4f-bb30-1ed2024acb21 --><\/h4>\n<h5><strong>\u5404PHP\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u78ba\u8a8d<\/strong><\/h5>\n<p>\u307e\u305a\u3001\u305d\u308c\u305e\u308c\u306e\u30d1\u30b9\u306b\u3042\u308bPHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u3069\u306ePHP\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3069\u3053\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u304b\u3092\u7279\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: 0da5c148-1595-4f4d-937a-83abf35511c9 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">\/usr\/bin\/php -v\n\/usr\/local\/bin\/php -v<\/pre>\n<h5><strong>\u6b63\u3057\u3044PHP\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u9078\u629e<\/strong><\/h5>\n<p>Remi\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fPHP 7.4\u304c\u3069\u306e\u30d1\u30b9\u306b\u3042\u308b\u304b\u3092\u7279\u5b9a\u3057\u307e\u3059\u3002\u901a\u5e38\u3001\u3053\u308c\u306f <strong><code>\/usr\/bin\/php<\/code><\/strong> \u307e\u305f\u306f <strong><code>\/usr\/local\/bin\/php<\/code><\/strong> \u306e\u3044\u305a\u308c\u304b\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u9ad8\u3044\u3067\u3059\u3002<\/p>\n<p><!-- notionvc: 3780822c-66a5-4fd9-bbc3-1be3aad875ca --><\/p>\n<h5><strong>\u00a0PATH\u306e\u66f4\u65b0<\/strong><\/h5>\n<p>\u30b7\u30b9\u30c6\u30e0\u304c\u6b63\u3057\u3044PHP\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u3001PATH\u74b0\u5883\u5909\u6570\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u3001<strong><code>.bashrc<\/code><\/strong> \u3084 <strong><code>.bash_profile<\/code><\/strong> \u306a\u3069\u306e\u30b7\u30a7\u30eb\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3066\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001<strong><code>\/usr\/local\/bin\/php<\/code><\/strong> \u304cPHP 7.4\u306e\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bPATH\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: d35e4e6c-2476-47aa-9eac-6467e89a2e56 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">export PATH=\/usr\/local\/bin:$PATH<\/pre>\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u30e6\u30fc\u30b6\u30fc\u306e <span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"1\">.bashrc<\/span> \u307e\u305f\u306f <span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"3\">.bash_profile<\/span> \u306b\u8ffd\u52a0\u3057\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u304b\u3089\u3001\u65b0\u3057\u3044\u30bf\u30fc\u30df\u30ca\u30eb\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u958b\u3044\u3066\u5909\u66f4\u3092\u53cd\u6620\u3055\u305b\u307e\u3059\u3002<!-- notionvc: 2cffd97a-ee74-41f1-b3fb-13fd12905151 --><\/p>\n<h5><strong>\u30b7\u30b9\u30c6\u30e0\u5168\u4f53\u306e\u8a2d\u5b9a<\/strong><\/h5>\n<p>\u30b7\u30b9\u30c6\u30e0\u5168\u4f53\u3067\u7279\u5b9a\u306ePHP\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001<strong><code>alternatives<\/code><\/strong> \u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo alternatives --set php \/usr\/local\/bin\/php<\/pre>\n<h5><strong>\u00a0\u518d\u78ba\u8a8d<\/strong><\/h5>\n<p>\u5909\u66f4\u5f8c\u3001\u518d\u5ea6 <strong><code>php -v<\/code><\/strong> \u3092\u5b9f\u884c\u3057\u3066\u3001PHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u6b63\u3057\u304f\u53cd\u6620\u3055\u308c\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: 4abb333a-2057-47a1-94d0-9387fcca429d --><\/p>\n<h4><span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"0\">\/usr\/bin\/php\u304c\u3001PHP 7.4\u306e<!-- notionvc: 496899ac-38f3-4bec-a430-b4674eee315b --><\/span><!-- notionvc: 2c4b004e-8df4-4d7f-baea-66e9797f37b0 -->\u4f8b<\/h4>\n<p>\u5b9f\u969b\u306b\u306f\u3001\/usr\/local\/bin\/php\u306b\u306f\u3001PHP 7.1.0\u3001\/usr\/bin\/php\u306b\u306fPHP 7.4.33\u304c\u5165\u3063\u3066\u3044\u305f\u72b6\u614b\u306b\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u306e\u3088\u3046\u306a\u5834\u5408\u3067<span class=\"notion-enable-hover\" data-token-index=\"0\">PHP 7.4.33\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u306b\u8a2d\u5b9a\u3059\u308b\u4f8b\u3068\u3057\u3066\u3002<\/span><!-- notionvc: 9263125e-ebc8-49eb-bb01-d72a776b6764 --><!-- notionvc: 52ba36f4-2266-438f-955d-97cac132b5d8 --><!-- notionvc: 1ad43472-284e-4ddb-ad44-e7f3e9c16756 --><!-- notionvc: 477b8daa-d4d5-4fb2-a023-f7c746be1f3c --><!-- notionvc: eba87a8f-3bdd-42f6-a3a7-5c8130ed8333 --><\/p>\n<p>\u00a0<\/p>\n<p><span class=\"notion-enable-hover\" data-token-index=\"0\">1.PATH\u306e\u66f4\u65b0<\/span>: \u30b7\u30b9\u30c6\u30e0\u304c <span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"2\">\/usr\/bin\/php<\/span> \u3092\u512a\u5148\u7684\u306b\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u3001PATH\u74b0\u5883\u5909\u6570\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002\u3053\u308c\u3092\u884c\u3046\u306b\u306f\u3001<span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"4\">.bashrc<\/span> \u307e\u305f\u306f <span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"6\">.bash_profile<\/span> \u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3001\u6b21\u306e\u884c\u3092\u8ffd\u52a0\u307e\u305f\u306f\u66f4\u65b0\u3057\u307e\u3059\u3002<!-- notionvc: 5dfe6d86-56cc-4bcc-8bd6-bbc86210050a --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">export PATH=\/usr\/bin:$PATH<\/pre>\n<p><span class=\"notion-enable-hover\" data-token-index=\"0\">2.alternatives\u306e\u8a2d\u5b9a<\/span>: <span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"2\">alternatives<\/span> \u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u7528\u3057\u3066\u3001<span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"4\">\/usr\/bin\/php<\/span> \u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u306ePHP\u5b9f\u884c\u53ef\u80fd\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u8a2d\u5b9a\u3057\u307e\u3059\u3002<!-- notionvc: f9750a1b-7bbe-446c-b2cd-9920eee4778d --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo alternatives --set php \/usr\/bin\/php<\/pre>\n<p><span class=\"notion-enable-hover\" data-token-index=\"0\">3.\u518d\u78ba\u8a8d<\/span>: \u5909\u66f4\u5f8c\u3001<span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"2\">php -v<\/span> \u3092\u5b9f\u884c\u3057\u3066\u3001PHP 7.4.33\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u306ePHP\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u3057\u3066\u6b63\u3057\u304f\u8a2d\u5b9a\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<!-- notionvc: cadae329-56df-4bfb-baa4-3d6c143dfda2 --><\/p>\n<p>\u3053\u308c\u3067\u3001php\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u5207\u308a\u66ff\u308f\u308a\u307e\u3057\u305f\u304c\u3001<!-- notionvc: 259417ec-ecee-4faf-878d-792911ec4653 -->502 Bad Gateway\u3068\u306a\u3063\u3066\u3057\u307e\u3046\u73fe\u8c61\u306b\u3002\u3002\u3002<!-- notionvc: 2bc22e73-6535-4cac-9c09-42a1e471be0f --><\/p>\n<h4>WordPress\u304c\u6b63\u3057\u304f\u8868\u793a\u3057\u306a\u3044\u6642\u306e\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c8<\/h4>\n<p>\u300c502 Bad Gateway\u300d\u30a8\u30e9\u30fc\u306f\u3001\u901a\u5e38\u3001\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u3068PHP\u30d7\u30ed\u30bb\u30b9\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\uff08PHP-FPM\uff09\u9593\u306e\u901a\u4fe1\u306b\u554f\u984c\u304c\u3042\u308b\u5834\u5408\u306b\u767a\u751f\u3057\u307e\u3059\u3002PHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u305f\u5f8c\u306b\u3053\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u306e\u306f\u4e00\u822c\u7684\u3067\u3001\u3044\u304f\u3064\u304b\u306e\u53ef\u80fd\u6027\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002<!-- notionvc: 83f93404-3255-4246-ac0b-76c6bd0e527a --><\/p>\n<h5><strong>PHP-FPM\u306e\u72b6\u614b\u3092\u78ba\u8a8d<\/strong><\/h5>\n<p>\u6700\u521d\u306bPHP-FPM\u304c\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: 9ea06514-843a-48c1-9e40-52841d7c4f10 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo systemctl status php-fpm<\/pre>\n<p>\u307e\u305f\u306f\u3001PHP 7.4\u7528\u306e\u30b5\u30fc\u30d3\u30b9\u304c\u3042\u308b\u5834\u5408\uff08\u4f8b\uff1a<span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"1\">php74-php-fpm<\/span>\uff09:<!-- notionvc: 5e172b12-47cb-44fa-8f7d-136ffc47e65a --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo systemctl status php74-php-fpm<\/pre>\n<p>\u00a0<\/p>\n<p><strong>\u305d\u306e\u4ed6\u306e\u30b3\u30de\u30f3\u30c9<\/strong><\/p>\n<p><span class=\"notion-enable-hover\" data-token-index=\"0\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bPHP-FPM\u306e\u78ba\u8a8d<\/span><!-- notionvc: 307341fa-8f52-4afa-9453-a097f8841aaa --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo yum list installed | grep php-fpm<\/pre>\n<p>Remi\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408<!-- notionvc: 20e4753a-90bc-48c5-bae3-34413052be87 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo yum install php-fpm<\/pre>\n<p><span class=\"notion-enable-hover\" data-token-index=\"0\">\u30b5\u30fc\u30d3\u30b9\u540d\u306e\u78ba\u8a8d<\/span><!-- notionvc: 7edbac60-bfbc-4a7c-9b76-1f638a3016d6 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo systemctl list-units | grep php-fpm<\/pre>\n<h5><strong>PHP-FPM\u306e\u518d\u8d77\u52d5<\/strong><\/h5>\n<p>\u554f\u984c\u304c\u3042\u308b\u5834\u5408\u3001PHP-FPM\u3092\u518d\u8d77\u52d5\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: edf04d23-fa78-4abd-9b57-1796fbd896ea --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo systemctl restart php-fpm<\/pre>\n<p>\u307e\u305f\u306f\u3001\u7279\u5b9a\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7528\uff1a<!-- notionvc: 4cbd21ad-90f2-46c8-b072-7f35e9aa6ea9 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo systemctl restart php74-php-fpm<\/pre>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">\u305d\u306e\u4ed6\u306e\u30b3\u30de\u30f3\u30c9<\/span><\/strong><\/p>\n<p><span class=\"notion-enable-hover\" data-token-index=\"0\">PHP-FPM\u30b5\u30fc\u30d3\u30b9\u306e\u6709\u52b9\u5316\u3068\u8d77\u52d5<\/span><!-- notionvc: 15bfc10c-a305-4000-a0df-3478c10a1b7d --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo systemctl enable php74-php-fpm\nsudo systemctl start php74-php-fpm\n\n\u307e\u305f\u306f\u3001\n\nsudo systemctl enable php-fpm\nsudo systemctl start php-fpm<\/pre>\n<p>\u30b5\u30fc\u30d3\u30b9\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u78ba\u8a8d\u3002\u30b5\u30fc\u30d3\u30b9\u304c\u6b63\u3057\u304f\u8d77\u52d5\u3057\u3066\u3044\u308b\u304b\u78ba\u8a8d<\/p>\n<p><!-- notionvc: 334fc17b-2834-40de-bb7b-374b4274d0f6 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo systemctl status php74-php-fpm<\/pre>\n<h5><strong>\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d<\/strong><\/h5>\n<p>\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\uff08\u4f8b\uff1aNginx\u3001Apache\uff09\u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u3066\u3001PHP-FPM\u3068\u306e\u63a5\u7d9a\u8a2d\u5b9a\u304c\u6b63\u3057\u3044\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u7279\u306b\u3001\u4ee5\u4e0b\u306e\u30dd\u30a4\u30f3\u30c8\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\uff1a<\/p>\n<ul>\n<li><strong>Nginx\u306e\u5834\u5408<\/strong>:\n<ul>\n<li><strong><code>fastcgi_pass<\/code><\/strong> \u6307\u4ee4\u304cPHP-FPM\u306e\u30bd\u30b1\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u307e\u305f\u306fTCP\u30dd\u30fc\u30c8\u3092\u6b63\u3057\u304f\u6307\u3057\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/li>\n<li>\u8a2d\u5b9a\u4f8b\uff1a<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><!-- notionvc: 4f808076-a938-4fc4-84a4-661e32039f71 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"monokai\">nginxCopy code\nlocation ~ \\.php$ {\n    fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;\n    # \u305d\u306e\u4ed6\u306e\u8a2d\u5b9a...\n}\n\n<\/pre>\n<ul>\n<li><strong>Apache\u306e\u5834\u5408<\/strong>:\n<ul>\n<li><strong><code>mod_proxy_fcgi<\/code><\/strong> \u3068 <strong><code>ProxyPassMatch<\/code><\/strong> \u6307\u4ee4\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u3053\u308c\u304c\u65b0\u3057\u3044PHP-FPM\u306e\u30dd\u30fc\u30c8\u307e\u305f\u306f\u30bd\u30b1\u30c3\u30c8\u306b\u5408\u308f\u305b\u3066\u66f4\u65b0\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><!-- notionvc: 7be43cf5-2033-49ba-9873-c5b4d2591fc0 --><\/p>\n<h5><strong>\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u306e\u518d\u8d77\u52d5<\/strong><\/h5>\n<p>\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u305f\u5f8c\u3001\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: 1c955fef-121e-4778-8144-23e27ebd598c --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo systemctl restart nginx  # Nginx\u306e\u5834\u5408\nsudo systemctl restart httpd  # Apache\u306e\u5834\u5408<\/pre>\n<h5><strong>\u30a8\u30e9\u30fc\u30ed\u30b0\u306e\u78ba\u8a8d<\/strong><\/h5>\n<p>\u554f\u984c\u304c\u89e3\u6c7a\u3057\u306a\u3044\u5834\u5408\u306f\u3001Nginx\u307e\u305f\u306fApache\u3001\u305d\u3057\u3066PHP-FPM\u306e\u30a8\u30e9\u30fc\u30ed\u30b0\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30ed\u30b0\u306b\u306f\u3001\u554f\u984c\u306e\u539f\u56e0\u306b\u95a2\u3059\u308b\u624b\u304c\u304b\u308a\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: da636d79-6d44-4faf-b4d0-f02f8e848207 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo tail -f \/var\/log\/nginx\/error.log  # Nginx\u306e\u5834\u5408\nsudo tail -f \/var\/log\/httpd\/error.log  # Apache\u306e\u5834\u5408\nsudo tail -f \/var\/log\/php-fpm\/error.log  # PHP-FPM\u306e\u5834\u5408<\/pre>\n<p>\u3068\u3002\u3053\u306e\u3042\u305f\u308a\u3092\u884c\u3048\u3070Wordpress\u3082\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u306a\u304c\u3089\u3001\u30da\u30fc\u30b8\u306b\u3088\u3063\u3066\u306f\u307e\u3060\u4e0d\u5177\u5408\u304c\u3042\u308b\u5834\u5408\u3002wordpress\u306e\u30b5\u30a4\u30c8\u30d8\u30eb\u30b9\u306e\u60c5\u5831\u3092\u53c2\u8003\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u304f\u3002<\/p>\n<p>\u00a0<\/p>\n<h4>\u30b5\u30a4\u30c8\u30d8\u30eb\u30b9\u30c1\u30a7\u30c3\u30af<\/h4>\n<p>\u30b5\u30a4\u30c8\u30d8\u30eb\u30b9\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u69d8\u306a\u8b66\u544a\u304c\u51fa\u3066\u304a\u308a\u3001\u30da\u30fc\u30b8\u304c\u6b63\u3057\u304f\u8868\u793a\u3057\u306a\u304b\u3063\u305f\u308a\u4e0d\u5177\u5408\u304c\u751f\u3058\u3066\u3044\u305f\u308a\u3068\u3059\u308b\u5834\u5408\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u30e2\u30b8\u30e5\u30fc\u30eb dom \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u304b\u3001\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n\u8b66\u544a \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u30e2\u30b8\u30e5\u30fc\u30eb imagick \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u304b\u3001\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n\u8b66\u544a \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u30e2\u30b8\u30e5\u30fc\u30eb mbstring \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u304b\u3001\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/pre>\n<p>WordPress \u307e\u305f\u306f\u4ed6\u306e PHP \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u969b\u306b\u3001\u7279\u5b9a\u306e PHP \u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5fc5\u8981\u3068\u306a\u3063\u3066\u304f\u308b\u306e\u3067\u3001\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u57fa\u3065\u3044\u3066\u3001\u5fc5\u8981\u306a\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<!-- notionvc: ad48ce15-1f0e-44fc-834d-d1ee3fdeb823 --><\/p>\n<h5><span class=\"notion-enable-hover\" data-token-index=\"0\">\u5fc5\u8981\u306a\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/span><!-- notionvc: 7023de77-e2fa-4e34-8a11-c49fb721cc59 --><\/h5>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">\u25cf DOM, Imagick, mbstring, zip, gd, intl \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/span><\/strong><!-- notionvc: 8db95717-8e90-45bf-a767-6daebeaef7f4 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo yum install php-dom php-imagick php-mbstring php-zip php-gd php-intl<\/pre>\n<p>\u3053\u308c\u3089\u306e\u30b3\u30de\u30f3\u30c9\u306f\u3001\u305d\u308c\u305e\u308c\u306ePHP\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<!-- notionvc: 9e88aa31-8ac8-4f0d-b3f6-ddc7ad501ce6 --><\/p>\n<p><span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"0\">imagick<\/span> \u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3064\u3044\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<!-- notionvc: 5fc622ed-98e3-474b-a7c3-d72f8b4784d6 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo yum install php-pecl-imagick<\/pre>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">\u25cf PHP-FPM\u306e\u518d\u8d77\u52d5<\/span><\/strong><!-- notionvc: 1aabd4d6-4716-4d4e-bbe2-5c31578a812f --><\/p>\n<p>\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5f8c\u3001PHP-FPM\u3092\u518d\u8d77\u52d5\u3057\u3066\u3001\u5909\u66f4\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<!-- notionvc: d603f6ec-632e-406c-bcdd-48581aa4572a --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo systemctl restart php-fpm<\/pre>\n<p>\u3082\u3057 <span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"1\">php74-php-fpm<\/span> \u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<!-- notionvc: 02edf9c8-e947-47cf-81ef-bc2a56c7d56e --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo systemctl restart php74-php-fpm<\/pre>\n<p><strong><span class=\"notion-enable-hover\" data-token-index=\"0\">\u25cf \u78ba\u8a8d<\/span><\/strong><!-- notionvc: 5e006178-2002-410a-9e8f-fea4e0d726fa --><\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u3001PHP\u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u3066\u3001\u65b0\u3057\u3044\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<!-- notionvc: 782c181c-2ecf-4f6a-aafa-1c2587cef83e --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">php -m<\/pre>\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u306f\u3001\u6709\u52b9\u306aPHP\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30ea\u30b9\u30c8\u3092\u8868\u793a\u3057\u307e\u3059\u3002<!-- notionvc: 4cb90af0-0ce0-45c0-8b7d-a2bc2fb85c65 --><\/p>\n<p>\u00a0<\/p>\n<p><span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"0\">imagick<\/span> \u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u95a2\u3057\u3066\u306f\u3001\u3053\u308c\u5358\u4f53\u3067\u306f\u52d5\u3044\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067<span class=\"notion-enable-hover\" data-token-index=\"0\"> ImageMagick\u30b3\u30a2\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u8ffd\u52a0\u3092\u884c\u3044\u307e\u3059\u3002<\/span><!-- notionvc: 9e64cfcc-56da-4847-b9fa-a3320586aa38 --><!-- notionvc: e0ef4f2b-bc01-4c1a-9554-b66c0d6a3eb1 --><\/p>\n<h4><span class=\"notion-enable-hover\" data-token-index=\"0\">ImageMagick \u304a\u3088\u3073 PHP Imagick \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/span><!-- notionvc: 4540f625-b804-4525-81b1-d5e011491259 --><\/h4>\n<p><span class=\"notion-enable-hover\" data-token-index=\"0\">ImageMagick \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/span>: ImageMagick \u306f\u3001imagick PHP \u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u57fa\u76e4\u3068\u306a\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002\u307e\u305a\u3053\u308c\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<!-- notionvc: 8575c77a-acad-4a98-b07d-d3999084cf1c --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo yum install ImageMagick ImageMagick-devel<\/pre>\n<p><span class=\"notion-enable-hover\" data-token-index=\"0\">PHP Imagick \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/span>: \u6b21\u306b\u3001PHP \u306e imagick \u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<!-- notionvc: d6dd3ee3-e5c6-4686-ab04-401c0e8154fb --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo yum install php-pecl-imagick<\/pre>\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u306f\u3001PECL \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u901a\u3058\u3066 imagick \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u3082\u3057 Remi \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3001PHP \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5fdc\u3058\u3066\u9069\u5207\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\uff08\u4f8b: <span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"1\">php74-php-pecl-imagick<\/span>\uff09\u3002<!-- notionvc: 5db5b1ef-eb33-4a3a-a453-13843c849909 --><br \/><!-- notionvc: fa119c6e-0a57-4e65-af9b-a8ceb8347c01 --><\/p>\n<p><strong>PHP-FPM \u306e\u518d\u8d77\u52d5<\/strong><\/p>\n<p>\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5f8c\u3001PHP-FPM \u30b5\u30fc\u30d3\u30b9\u3092\u518d\u8d77\u52d5\u3057\u3066\u65b0\u3057\u3044\u8a2d\u5b9a\u3092\u9069\u7528\u3057\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: 47208a31-4674-4a80-8369-4bd10b708e22 --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">sudo systemctl restart php-fpm<\/pre>\n<p><strong>\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u78ba\u8a8d<\/strong><\/p>\n<p>\u5909\u66f4\u3092\u9069\u7528\u3057\u305f\u5f8c\u3001<strong><code>php -m<\/code><\/strong> \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066\u3001imagick \u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p><!-- notionvc: e36a3e53-957f-4443-984b-9549f25962da --><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"monokai\">php -m | grep imagick<\/pre>\n<p>\u3068\u3044\u3063\u305f\u611f\u3058\u3067\u3001wordpress\u306e\u30b5\u30a4\u30c8\u8868\u793a\u3001\u30b5\u30a4\u30c8\u30d8\u30eb\u30b9\u306e\u65b9\u3082\u554f\u984c\u306a\u304f\u901a\u904e\u3068\u306a\u308a\u7121\u4e8bPHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3092\u884c\u3048\u307e\u3057\u305f\u3002<\/p>\n<p>\u6700\u521d\u306b\u3001\u65e2\u5b58\u306ePHP\u3092\u30a8\u30a4\u30e4\u30fc\u3067\u30b5\u30af\u30c3\u3068\u524a\u9664\u3057\u305f\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u8868\u793a\u3057\u306a\u304f\u306a\u3063\u305f\u308a\u3001\u4e0d\u5177\u5408\u3067\u3066\u305f\u308a\u3068\u8272\u3005\u30d0\u30bf\u30d0\u30bf\u3057\u3061\u3083\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u56de\u304b\u3089\u306f\u3001\u524a\u9664\u3059\u308b\u624b\u9806\u304c\u5fc5\u8981\u306a\u304f\u3001Remi\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u6709\u52b9\u7121\u52b9\u5207\u308a\u66ff\u3048\u3060\u3051\u3067\u884c\u3051\u305d\u3046\u306a\u69d8\u5b50\u306a\u306e\u3067\u697d\u306b\u66f4\u65b0\u3067\u304d\u308b\u3068\u4fe1\u3058\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u306a\u304c\u3089\u3001PHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306f\u6642\u9593\u306e\u4f59\u88d5\u304c\u3042\u308b\u3068\u304d\u306b\u884c\u3063\u305f\u307b\u3046\u304c\u5b89\u5168\u3067\u306f\u3042\u308a\u307e\u3059\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u3041\u3002<\/p>\n<p>\u00a0<\/p>\n<p><!-- notionvc: d95580de-3516-45a4-a78a-1477fd0bd4aa --><\/p>\n<p><!-- notionvc: 33783fe8-4df6-44b7-9398-fd4bfad43a3e --><\/p>\n<p><!-- notionvc: 01591bb9-a492-4d33-963f-f9fcedfd44ec --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3069\u3082\u3067\u3059\u3002 \u6bce\u5e74\u5e74\u672b\u306b\u306a\u3063\u3066\u3084\u3063\u3068\u3001WordPress\u306e\u8a2d\u5b9a\u8af8\u3005\u3092\u8abf\u6574\u3057\u3066\u3044\u308b\u6c17\u304c\u3059\u308b\u3002 \u4eca\u56de\u306f\u3001PHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306b\u95a2\u3057\u3066\u306b\u306a\u308a\u307e\u3059\u3002 Red Hat\u7cfb\u306eLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\uff08Red Hat Ente [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":11679,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[173,45,111,178,118],"class_list":["post-11666","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-php","tag-web","tag-wordpress-2","tag-178","tag-118"],"_links":{"self":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/11666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11666"}],"version-history":[{"count":13,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/11666\/revisions"}],"predecessor-version":[{"id":11680,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/11666\/revisions\/11680"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/media\/11679"}],"wp:attachment":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}