{"id":11058,"date":"2023-02-10T02:06:39","date_gmt":"2023-02-09T17:06:39","guid":{"rendered":"https:\/\/www.stuffy.site\/computers\/?p=11058"},"modified":"2024-07-27T19:10:32","modified_gmt":"2024-07-27T10:10:32","slug":"php8-%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e5%88%9d%e6%9c%9f%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/www.stuffy.site\/computers\/archives\/11058","title":{"rendered":"PHP8 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u521d\u671f\u8a2d\u5b9a"},"content":{"rendered":"\n<p>\u524d\u56de\u306fTeraTerm\u30bf\u30fc\u30df\u30ca\u30eb\u3067SSH\u306e\u516c\u958b\u9375\u8a8d\u8a3c\u3092\u3057\u3066\u30ed\u30b0\u30a4\u30f3\u3092\u3057\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u3001\u300cRocky Linux\u300d\u306bLAMP\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081Apache HTTP\u30b5\u30fc\u30d0\u30fc\u306e\u8d77\u52d5\u8a2d\u5b9a\u3068PHP8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u521d\u671f\u8a2d\u5b9a\u3092\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">\u6982\u8981<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#beginning\">\u306f\u3058\u3081\u306b<\/a><\/li>\n\n\n\n<li><a href=\"#start-web-server\">HTTP\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3059\u308b<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#edit-httpd-conf\">httpd.conf \u3092\u7de8\u96c6<\/a><\/li>\n\n\n\n<li><a href=\"#start-httpd\">Apache\u306e\u8d77\u52d5<\/a><\/li>\n\n\n\n<li><a href=\"#check-status\">\u30b5\u30fc\u30d3\u30b9\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#install-php8\">PHP8 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#edit-php-ini\">php-ini \u3092\u7de8\u96c6<\/a><\/li>\n\n\n\n<li><a href=\"#start-php-fpm\">php-fpm \u3092\u8d77\u52d5\u3059\u308b<\/a><\/li>\n\n\n\n<li><a href=\"#check-phpinfo\">phpinfo.php\u3067\u78ba\u8a8d\u3059\u308b<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#to-the-end\">\u304a\u308f\u308a\u306b<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"beginning\">\u306f\u3058\u3081\u306b<\/h2>\n\n\n\n<p>\u3053\u3053\u3067\u306fWordpress, Wikipedia, EC\u30b5\u30a4\u30c8\u306a\u3069\u306eWeb\u30a2\u30d7\u30ea\u306e\u57fa\u672c\u300c<span style=\"color:#ff0000\">LAMP<\/span>\u300d\u3092\u7c21\u5358\u306b\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u300c<span style=\"color:#ff0000\">L<\/span>inux\u300dOS\u306f\u300cRedHat Enterprise Linux\u300d\u7565\u3057\u3066\u300cRHEL\u300d\u306e\u4ed6\u306b\u300cDebian\u300d\u300cFreeBSD\u300d\u306a\u3069\u3044\u304f\u3064\u304b\u306e\u7cfb\u7d71\u304c\u3042\u308a\u307e\u3059\u3002\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3082ESXi\u306b\u3088\u308b\u300cVM\uff08\u4eee\u60f3\u30de\u30b7\u30f3\uff09\u300d\u7528\u9014\u304b\u3089\u300cDocker\u300d\u306a\u3069\u306f\u300cRHEL\u300d\u7cfb\u304b\u3089\u300cDebian\u300d\u7cfb\u3078\u3068\u7de9\u3084\u304b\u306b\u79fb\u884c\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002\u30b3\u30f3\u30c6\u30caOS\u3068\u3057\u3066\u306f\u300cDebian\u300d\u7cfbOSS\u3067\u3042\u308b\u300cubuntu\u300d\u306b\u4eba\u6c17\u304c\u3042\u308a\u30b3\u30f3\u30c6\u30ca\u3001\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u63d0\u4f9b\u3055\u308c\u308b\u306a\u3069\u5909\u5316\u3057\u3066\u3044\u307e\u3059\u3002\u4e00\u65b9\u3001\u300cRHEL\u300d\u7cfb\u306eOSS\u3067\u3042\u308b\u300cRockyLinux\u300d\u300cAlmaLinux\u300d\u306f\u30af\u30ed\u30fc\u30f3OS\u3068\u3057\u3066100%\u306e\u4e92\u63db\u6027\u304c\u3042\u308a\u5b89\u5fc3\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u300c<span style=\"color:#ff0000\">A<\/span>pache\u300d\u306b\u4ee3\u8868\u3055\u308c\u308bWeb\u30b5\u30fc\u30d0\u30fc\u3082\u6628\u4eca\u3001\u300cNginx\uff08\u30a8\u30f3\u30b8\u30f3\u30fb\u30a8\u30c3\u30af\u30b9\uff09\u300d\u3078\u3068\u4ea4\u4ee3\u3057\u3066\u3044\u307e\u3059\u304c\u3069\u3061\u3089\u3082\u7121\u6599\u306e\u30b5\u30fc\u30d0\u30fcSSL\u8a8d\u8a3c\u30bd\u30d5\u30c8\u304c\u4f7f\u3048\u308b\u306a\u3069\u6839\u5f37\u3044\u9700\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u300c<span style=\"color:#ff0000\">M<\/span>ySQL\u300d\u306f\u73fe\u884c\u306e\uff18\u304b\u3089\u4e92\u63db\u306e\u3042\u308b\u300cMariaDB\u300d\u306a\u3069\u3078\u3068\u6d3e\u751f\u3057\u3066\u3044\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u3059\u304c\u3069\u3061\u3089\u3082\u3059\u3070\u3089\u3057\u3044\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\u3002Web\u30b5\u30fc\u30d0\u30fc\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5358\u4e00VM\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306blocalhost\u3068\u3057\u3066\u91cd\u306d\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u81ea\u91cd\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u5225\u9014\u72ec\u7acb\u3057\u305fVM\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u3057\u3066\u904b\u7528\u3059\u308b\u3053\u3068\u3082\u4e00\u822c\u7684\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u300c<span style=\"color:#ff0000\">P<\/span>HP\u300d\u306fCGI\u3068\u547c\u3070\u308c\u308bWeb\u30b5\u30fc\u30d0\u30fc\u306e\u52d5\u7684\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u52d5\u4f5c\u3092\u62c5\u3046\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u5f53\u65b9\u306eHTTP\u30b5\u30fc\u30d0\u30fc\u8a2d\u5b9a\u306f\u4ee5\u4e0b\u306e\u30b5\u30a4\u30c8\u3092\u53c2\u8003\u306b\u69cb\u7bc9\u3057\u307e\u3057\u305f\u3002\u300cRockyLinux\u300d\u3067\u3082\u8a2d\u5b9a\u306f\u5171\u901a\u3057\u3066\u304a\u308a\u53c2\u8003\u306b\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002\u3044\u3064\u3082\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<p><strong><a href=\"https:\/\/centossrv.com\/almalinux\/\">AlmaLinux\u3067\u81ea\u5b85\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9<\/a><\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/centossrv.com\/almalinux\/apache.shtml\">Web\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9(Apache)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/centossrv.com\/almalinux\/apache-certbot.shtml\">Web\u30b5\u30fc\u30d0\u30fc\u9593\u901a\u4fe1\u5185\u5bb9\u6697\u53f7\u5316(Apache+mod_SSL+Let&#8217;s Encrypt+Certbot)<\/a><\/li>\n<\/ol>\n\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u30011.\u306e\u300cApache HTTP\u30b5\u30fc\u30d0\u30fc\u300d\u3092\u69cb\u7bc9\u3092\u3057\u305f\u306e\u3061PHP8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"start-web-server\">HTTP\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3059\u308b<\/h2>\n\n\n\n<p>PHP\u306f\u300cHTTP\u30b5\u30fc\u30d0\u30fc\u300d\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3068\u3057\u3066\u6a5f\u80fd\u3059\u308b\u306e\u3067Web\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3059\u308b\u969b\u3057\u3066Apache \u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u3042\u308b httpd.conf \u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u9577\u3044 httpd.conf \u3092\u63a2\u3059\u306e\u306f\u9762\u5012\u304f\u3055\u3044\u306e\u3067 \u95b2\u89a7\u30e2\u30fc\u30c9( esc \u30ad\u30fc\u3092\u62bc\u3059)\u3067\u4ee5\u4e0b\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3067\u691c\u7d22\u3001\u7f6e\u63db\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n<table>\n<tbody>\n<tr>\n<td>\u691c\u7d22<\/td>\n<td>\/ (\u30b9\u30e9\u30c3\u30b7\u30e5)<\/td>\n<\/tr>\n<tr>\n<td>\u30cf\u30a4\u30e9\u30a4\u30c8\u6d88\u3059<\/td>\n<td>:noh<\/td>\n<\/tr>\n<tr>\n<td>\u7f6e\u63db<\/td>\n<td>:%s\/&lt;before&gt;\/&lt;after&gt;\/g<\/td>\n<\/tr>\n<tr>\n<td>\u884c\u756a\u53f7\u8868\u793a<\/td>\n<td>:set nu<\/td>\n<\/tr>\n<tr>\n<td>\u884c\u756a\u53f7\u975e\u8868\u793a<\/td>\n<td>:set nonu<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"edit-httpd-conf\">httpd.conf \u3092\u7de8\u96c6<\/h3>\n\n\n\n<p><\/p>\n\n\n<pre><span style=\"color: #0000ff;\"> vi \/etc\/httpd\/conf\/httpd.conf<\/span><br><br>#ServerName www.example.com:80<br><span style=\"color: #0000ff;\">ServerName dev.stuffy.site:80 \u2190\uff08\u8ffd\u8a18<\/span><br><br>DocumentRoot \"\/var\/www\/html\"  \u2190 \uff08\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u78ba\u8a8d<br>\n&lt;Directory \"\/var\/www\/html\"&gt;\n    Options <span style=\"color: #0000ff;\">Includes ExecCGI<\/span> FollowSymLinks <span style=\"color: #0000ff;\">\u2190 \uff08\u8ffd\u8a18<\/span>\n    AllowOverride <span style=\"color: #0000ff;\">All  \u2190\uff08All\u306b\u5909\u66f4<\/span>\n    Require all granted\n&lt;\/Directory&gt;<br><br>&lt;IfModule dir_module&gt;<br>    DirectoryIndex index.html <span style=\"color: #0000ff;\">index.php \u2190\uff08\u8ffd\u8a18<\/span><br>&lt;\/IfModule&gt;<br><br>&lt;IfModule mime_module&gt;<br>    AddHandler cgi-script .cgi <span style=\"color: #0000ff;\">.pl<\/span><br>&lt;\/IfModule&gt;<\/pre>\n<\/p>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<p>\u30b3\u30d4\u30da\u3057\u305f\u691c\u7d22\u30ad\u30fc\u30ef\u30fc\u30c9\u3001\u30b3\u30fc\u30c9\u306e\u30d5\u30a1\u30a4\u30eb\u5185\u3078\u306e\u8cbc\u308a\u4ed8\u3051\u306f\u7de8\u96c6\u30e2\u30fc\u30c9( v \u30ad\u30fc\u3092\u62bc\u3059)\u3067\u53f3\u30af\u30ea\u30c3\u30af\u3067\u81ea\u52d5\u5165\u529b\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"start-httpd\">Apache\u306e\u8d77\u52d5<\/h3>\n\n\n\n<p>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u9593\u9055\u3044\u304c\u306a\u3051\u308c\u3070\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067Apache\u304c\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n<pre><span style=\"font-size: 14pt; color: #0000ff;\">$ sudo systemctl start httpd  \u2190\uff08\u30b9\u30bf\u30fc\u30c8\u8d77\u52d5<br><br>$ sudo systemctl enable httpd  \u2190\uff08\u5e38\u6642\u8d77\u52d5\u8a2d\u5b9a<br><br>$ sudo systemctl status httpd  \u2190\uff08\u30b9\u30c6\u30fc\u30bf\u30b9\u78ba\u8a8d<br><\/span><\/pre>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<p>\u30a8\u30e9\u30fc\u304c\u3042\u308b\u3068\u4ee5\u4e0b\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u308b\u306e\u3067\u5177\u4f53\u7684\u306a\u884c\u756a\u53f7\u3092\u63a2\u3057\u3066\u30a8\u30e9\u30fc\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n\n\n<pre>Job for httpd.service failed because the control process exited with error code.<br>See \"systemctl status httpd.service\" and \"journalctl -xe\" for details.<\/pre>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"check-status\">\u30b5\u30fc\u30d3\u30b9\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b<\/h3>\n\n\n\n<p>80\u756a\u30dd\u30fc\u30c8\u3067LISTEN\u3057\u3066\u3044\u308c\u3070 \u300clsof \u300d\u30b3\u30de\u30f3\u30c9\u3067\u8868\u793a\u3055\u308c\u300ccurl\u300d\u3067\u30c6\u30ad\u30b9\u30c8\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n<pre><span style=\"font-size: 14pt; color: #0000ff;\">$ lsof -i:80<br><br>$ curl localhost<br><\/span><\/pre>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<p>\u30d6\u30e9\u30a6\u30b6\u306e\u30a2\u30c9\u30ec\u30b9\u30d0\u30fc\u304b\u3089\u300chttp:\/\/192.168.1.190\u300d\u3067welcome.conf\u753b\u9762\u304c\u898b\u3048\u308c\u3070OK\u3067\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/welcome_conf.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"582\" src=\"https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/welcome_conf-1024x582.png\" alt=\"\" class=\"wp-image-11105\" style=\"width:768px;height:437px\" srcset=\"https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/welcome_conf-1024x582.png 1024w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/welcome_conf-300x170.png 300w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/welcome_conf-768x436.png 768w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/welcome_conf-1536x872.png 1536w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/welcome_conf.png 1685w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<p>systemctl \u306e -l \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u8a73\u7d30\u30b9\u30c6\u30fc\u30bf\u30b9\u304c\u8868\u793a\u3067\u304d\u307e\u3059\u3002\u518d\u8d77\u52d5\u306f restart \u3067\u3059\u3002<\/p>\n\n\n<pre><span style=\"font-size: 14pt; color: #0000ff;\"># systemctl status httpd -l<br><br># systemctl restart httpd<br><\/span><\/pre>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-php8\">PHP8 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h2>\n\n\n\n<p>\u300cRHEL\u300d\u7cfb\u306eOS\u306b\u306f\u5225\u9014\u3001\u62e1\u5f35\u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u3042\u308b epel remi \u306a\u3069\u304c\u3042\u308a\u9ad8\u5ea6\u306a\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u300c dnf \u300d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068 \/etc\/yum.repos.d\u3078\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u8ffd\u52a0\u3055\u308c\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u6709\u52b9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3067\u306f\u65e9\u901f\u3001epel remi \u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089PHP8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u65e2\u5b58\u306ePHP\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u30ea\u30bb\u30c3\u30c8\u3057\u3066 php:remi-8.3 \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002config-manager \u3067powertools \u3092\u6709\u52b9\u306b\u3057\u3066\u2026<\/p>\n\n\n<pre><span style=\"font-size: 14pt; color: #0000ff;\"># dnf -y install epel-release  \u2190 epel\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/><br \/><br \/># dnf -y install https:\/\/rpms.remirepo.net\/enterprise\/remi-release-8.rpm  \u2190 remi\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/><br \/># dnf -y module reset php<br \/><br \/># dnf module enable php:remi-8.3<br \/><br \/># dnf config-manager --set-enabled powertools<br \/><\/span><\/pre>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<p>\u305d\u308c\u3067\u306fphp8.3\u3092\u307e\u308b\u3063\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n<pre><span style=\"font-size: 14pt; color: #0000ff;\"># dnf -y install --enablerepo=remi php php-devel php83-php-mysqlnd \\<br \/>php-common php-mbstring php-pdo php-gd \\<br \/>php-xml php-mcrypt php-intl php-mysql \\<br \/>gd-devel libxml2-devel mysql-devel \\<br \/>t1lib-devel bzip2-devel curl-devel \\<br \/>gmp-devel libmcrypt-devel php-opcache \\<br \/>php-mysqli php-fpm php-pecl-zip \\<br \/>pkgconfig php-pear \\<br \/>jasper-devel OpenEXR-devel ghostscript-devel jbigkit-devel \\<br \/>lcms2-devel openjpeg2-devel ImageMagick \\<br \/>ImageMagick-devel ImageMagick-perl php-pecl-imagick<\/span><\/pre>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"edit-php-ini\">php.ini \u3092\u7de8\u96c6<\/h3>\n\n\n\n<p>php.ini\u306e\u521d\u671f\u8a2d\u5b9a\u3092\u3059\u308b\u305f\u3081 php -i \u30b3\u30de\u30f3\u30c9\u3067\u63a2\u3057\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u306f \/etc \u306b\u3042\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n<pre><span style=\"font-size: 14pt; color: #0000ff;\"># php -i | grep ini<\/span>\nConfiguration File (php.<span style=\"color: #ff0000;\">ini<\/span>) Path =&gt; \/etc\nLoaded Configuration File =&gt; \/etc\/php.<span style=\"color: #ff0000;\">ini<\/span><\/pre>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<p>\u6700\u4f4e\u9650\u3067\u3059\u304c\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u3063\u3066\u304b\u3089 \/etc\/php.ini \u306b\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u3057\u3066\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n\n\n<pre><span style=\"font-size: 14pt; color: #0000ff;\"># cp \/etc\/php.ini{,.org}<br><br># vi \/etc\/php.ini<\/span><br>\nmbstring.encoding_translation = Off\nmbstring.http_output = pass\nmbstring.http_input = pass\nmbstring.internal_encoding = UTF-8\nmbstring.language = Japanese\nupload_max_filesize = 128M\npost_max_size = 128M\nexpose_php = Off\nsession.hash_function = 1<\/pre>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"start-php-fpm\">php-fpm \u3092\u8d77\u52d5\u3059\u308b<\/h3>\n\n\n\n<p>\u8a2d\u5b9a\u3092\u53cd\u6620\u3059\u308b\u305f\u3081 Apache\u518d\u8d77\u52d5 php-fpm \u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n<pre><span style=\"font-size: 14pt; color: #0000ff;\"># systemctl restart httpd<br>\n# systemctl start php-fpm\n# systemctl enable php-fpm\n# systemctl status php-fpm<\/span><\/pre>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"check-phpinfo\">phpinfo.php\u3067\u78ba\u8a8d\u3059\u308b<\/h3>\n\n\n\n<p>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u306b\u79fb\u52d5\u3057\u3066\u4ee5\u4e0b\u306e\u5185\u5bb9\u306e phpinfo.php \u30d5\u30a1\u30a4\u30eb\u3092\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n\n\n<pre><span style=\"font-size: 14pt; color: #0000ff;\"># cd \/var\/www\/html<br># vi phpinfo.php<br><\/span><\/pre>\n<pre>&lt;?php<br>\nphpinfo();<br>\n?&gt;<\/pre>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<p>\u6700\u5f8c\u306b\u30d6\u30e9\u30a6\u30b6\u306e\u30a2\u30c9\u30ec\u30b9\u30d0\u30fc\u304b\u3089PHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u8868\u793a\u3067\u304d\u308c\u3070\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6210\u529f\u3067\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"673\" height=\"1024\" src=\"https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/php-8.3.9-673x1024.png\" alt=\"\" class=\"wp-image-12150\" srcset=\"https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/php-8.3.9-673x1024.png 673w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/php-8.3.9-197x300.png 197w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/php-8.3.9-768x1169.png 768w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/php-8.3.9-1009x1536.png 1009w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/php-8.3.9-16x24.png 16w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/php-8.3.9-24x36.png 24w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/php-8.3.9-32x48.png 32w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2023\/02\/php-8.3.9.png 1052w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<p>\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"to-the-end\">\u304a\u308f\u308a\u306b<\/h2>\n\n\n\n<p>\u4eca\u56de\u306fApache HTTP\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3001PHP8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002MariaDB\u306fPHP\u3068\u9055\u3063\u3066\u30b5\u30dd\u30fc\u30c8\u671f\u9650\u304c2024\u5e74\u307e\u3067\u3068\u306a\u3063\u3066\u304a\u308a\u30ea\u30d7\u30ec\u30a4\u30b9\u4e88\u5b9a\u306f\u307e\u3060\u6c7a\u307e\u3063\u3066\u3044\u307e\u305b\u3093\u3002\u305d\u308c\u3067\u306f\u307e\u305f\u9022\u3046\u65e5\u307e\u3067\u3002<\/p>\n\n\n\n<p>\u697d\u3057\u3044RockyLinux\u30e9\u30a4\u30d5\u3092\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u306fTeraTerm\u30bf\u30fc\u30df\u30ca\u30eb\u3067SSH\u306e\u516c\u958b\u9375\u8a8d\u8a3c\u3092\u3057\u3066\u30ed\u30b0\u30a4\u30f3\u3092\u3057\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u3001\u300cRocky Linux\u300d\u306bLAMP\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081Apache HTTP\u30b5\u30fc\u30d0\u30fc\u306e\u8d77\u52d5\u8a2d\u5b9a\u3068PHP8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u521d\u671f\u8a2d\u5b9a\u3092\u3057\u307e\u3057 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,91],"tags":[],"class_list":["post-11058","post","type-post","status-publish","format-standard","hentry","category-php","category-rocky-linux"],"_links":{"self":[{"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/posts\/11058","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/comments?post=11058"}],"version-history":[{"count":79,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/posts\/11058\/revisions"}],"predecessor-version":[{"id":12151,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/posts\/11058\/revisions\/12151"}],"wp:attachment":[{"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/media?parent=11058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/categories?post=11058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/tags?post=11058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}