{"id":2768,"date":"2019-12-30T22:51:34","date_gmt":"2019-12-30T13:51:34","guid":{"rendered":"https:\/\/test.ji0vwl.net\/?p=2768"},"modified":"2020-01-01T10:24:55","modified_gmt":"2020-01-01T01:24:55","slug":"wordpress-5-3-%e3%82%92-%e3%82%bd%e3%83%bc%e3%82%b9%e3%83%93%e3%83%ab%e3%83%89%e3%81%97%e3%81%9f-php-7-4-%e3%81%a7%e5%8b%95%e3%81%8b%e3%81%99","status":"publish","type":"post","link":"https:\/\/ji0vwl.net\/index.php\/2019\/12\/30\/2768\/","title":{"rendered":"WordPress 5.3 \u3092 \u30bd\u30fc\u30b9\u30d3\u30eb\u30c9\u3057\u305f PHP 7.4 \u3067\u52d5\u304b\u3059"},"content":{"rendered":"<h1 style=\"text-align: left;\">CentOS7\u306bApache2.4.41+OpenSSL1.1.1d+PHP7.4.1\u3092\u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<p><a href=\"https:\/\/news.mynavi.jp\/article\/20191124-927256\/\">PHP 7.4\u304c\u30ea\u30ea\u30fc\u30b9<\/a>\u3055\u308c\u3066\u4e45\u3057\u3044\u3067\u3059\u304c\u3001PHP 7.3 \u306e\u30d3\u30eb\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u306f\u3059\u3050\u306b\u901a\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u5e74\u672b\u307e\u3067\u653e\u7f6e\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eca\u65e5\u306f\u4e38\u4e00\u65e5\u3001<a href=\"https:\/\/qiita.com\/cs_sonar\/items\/caed4c543d79605e717d\">\u3053\u3061\u3089\u3092\u53c2\u8003<\/a>\u306b CentOS 8 \u306eAMI\u3092\u81ea\u529b\u3067\u4f5c\u308d\u3046\u3068\u3082\u304c\u3044\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u5468\u308a\uff08GRUB2\uff09\u304c\u5168\u304f\u5206\u304b\u3089\u305a\u6483\u6c88\u3057\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u3001\u6bd4\u8f03\u7684\u7c21\u5358\u306a\u3053\u3061\u3089\u3092\u5bfe\u5fdc\u3057\u3066\u5fc3\u3092\u843d\u3061\u7740\u304b\u305b\u308b\u3053\u3068\u3068\u3057\u307e\u3059\uff08\u304a\u3044\uff09\u3002<\/p>\n<p>5. PHP 7.4 \u4ee5\u5916\u306f\u3068\u304f\u306b\u9055\u3044\u306f\u306a\u3044\u3067\u3059\u304c\u3001\u60c5\u5831\u304c\u6563\u5728\u3057\u306a\u3044\u69d8\u306b\u904e\u53bb\u306e\u60c5\u5831\u3092\u8ee2\u8a18\u3057\u3066\u304a\u304d\u307e\u3059\u3002<a href=\"https:\/\/test.ji0vwl.net\/index.php\/2018\/12\/24\/1436\/\">WordPress\u3068Let&#8217;s Encrypt \u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f<\/a>\u306e\u60f3\u5b9a\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a OpenSSL 1.0.2\u7cfb\u3067\u3059\u304c\u3001<a href=\"https:\/\/www.famlog.jp\/article\/3678\">\u660e\u65e5\u3092\u3082\u3063\u3066\u30b5\u30dd\u30fc\u30c8\u6e80\u4e86\u4e88\u5b9a<\/a>\u3068\u306a\u308a\u307e\u3059\u306e\u3067\u3001Web\u30b5\u30fc\u30d0\u30fc\u3092\u7ba1\u7406\u3055\u308c\u3066\u3044\u308b\u7686\u3055\u307e\u306f\u3001\u304a\u65e9\u3081\u306bOpenSSL 1.1.1d \u3078\u306e\u79fb\u884c\u3092\u304a\u52e7\u3081\u3057\u307e\u3059!<\/p>\n<p>&nbsp;<\/p>\n<h4>1. OpenSSL 1.1.1d \u3092 \/usr\/local\/ssl \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<pre># yum -y groupinstall base\r\n# yum -y groupinstall development\r\n# yum -y update\r\n# yum -y install zlib-devel\r\n# yum -y install perl-core\r\n# cd \/usr\/local\/src\/\r\n# wget https:\/\/www.openssl.org\/source\/openssl-1.1.1d.tar.gz\r\n# tar xvfz openssl-1.1.1d.tar.gz\r\n# cd openssl-1.1.1d\r\n# .\/config --prefix=\/usr\/local\/ssl --openssldir=\/usr\/local\/ssl shared zlib\r\n# make depend\r\n# make\r\n# make test\r\n# make install\r\n# ln -s \/usr\/local\/ssl\/lib\/libcrypto.so.1.1 \/lib64\/libcrypto.so.1.1   (\u521d\u3081\u3066\u306e\u3068\u304d)\r\n# ln -s \/usr\/local\/ssl\/lib\/libssl.so.1.1 \/lib64\/libssl.so.1.1    (\u521d\u3081\u3066\u306e\u3068\u304d)\r\n# echo \/usr\/local\/ssl\/lib &gt; \/etc\/ld.so.conf.d\/openssl111d.conf\r\n# ldconfig\r\n# \/usr\/local\/ssl\/bin\/openssl version<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4>2. Ngttp2\u3068Brotli\u3092 \/usr\/local\/lib \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<h5>2.1. <a href=\"https:\/\/nghttp2.org\">Ngttp2<\/a> 1.39.2\uff08libnghttp2\uff09<\/h5>\n<p>OpenSSL 1.1.1d\u306f \/usr\/local\/ssl \u914d\u4e0b\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3042\u308b\u306e\u3067\u3001env\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre># yum -y install jansson-devel\r\n# yum -y install libev-devel\r\n# yum -y install c-ares-devel\r\n# yum -y install centos-release-scl\r\n# yum -y install devtoolset-7\r\n# scl enable devtoolset-7 bash\r\n# cd \/usr\/local\/src\/\r\n# wget https:\/\/github.com\/nghttp2\/nghttp2\/releases\/download\/v1.39.2\/nghttp2-1.39.2.tar.gz\r\n# tar xvzf nghttp2-1.39.2.tar.gz\r\n# cd nghttp2-1.39.2\/\r\n# env OPENSSL_CFLAGS=\"-I\/usr\/local\/ssl\/include\" OPENSSL_LIBS=\"-L\/usr\/local\/ssl\/lib -lssl -lcrypto\" .\/configure -enable-app\r\n# make\r\n# make install<\/pre>\n<h5>2.2. <a href=\"https:\/\/github.com\/google\/brotli\/releases\">Brotli<\/a> 1.0.7<\/h5>\n<pre># yum -y install cmake\r\n# cd \/usr\/local\/src\/\r\n# wget https:\/\/github.com\/google\/brotli\/archive\/v1.0.7.tar.gz\r\n# tar xvzf v1.0.7.tar.gz\r\n# cd brotli-1.0.7\/\r\n# mkdir out &amp;&amp; cd out\r\n# ..\/configure-cmake\r\n# make\r\n# make test\r\n# make install\r\n# echo \/usr\/local\/lib &gt; \/etc\/ld.so.conf.d\/usr-local-lib.conf\r\n# ldconfig<\/pre>\n<h5><\/h5>\n<p>&nbsp;<\/p>\n<h4>3. Apache 2.4.41 \u3092 \/usr\/local\/httpd4 \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<h5>3.1. <a href=\"https:\/\/apr.apache.org\/download.cgi\">APR<\/a> 1.7.0<\/h5>\n<pre># cd \/usr\/local\/src\/\r\n# wget http:\/\/ftp.jaist.ac.jp\/pub\/apache\/\/apr\/apr-1.7.0.tar.gz\r\n# tar xvzf apr-1.7.0.tar.gz\r\n# cd apr-1.7.0\/\r\n# .\/configure\r\n# make\r\n# make install<\/pre>\n<h5>3.2. <a href=\"https:\/\/apr.apache.org\/download.cgi\">APR-util<\/a> 1.6.1<\/h5>\n<pre># cd \/usr\/local\/src\/\r\n# wget http:\/\/ftp.jaist.ac.jp\/pub\/apache\/\/apr\/apr-util-1.6.1.tar.gz\r\n# tar xvzf apr-util-1.6.1.tar.gz\r\n# cd apr-util-1.6.1\/\r\n# .\/configure --with-apr=\/usr\/local\/apr\r\n# make\r\n# make install<\/pre>\n<h5>3.3. <a href=\"https:\/\/httpd.apache.org\/download.cgi\">Apache<\/a> 2.4.41<\/h5>\n<p>&#8212;prefix=\/usr\/local\/httpd4 \u3068\u3059\u308b\u3053\u3068\u3067\u300chttpd4\u300d\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre># cd \/usr\/local\/src\/\r\n# wget http:\/\/ftp.jaist.ac.jp\/pub\/apache\/\/httpd\/httpd-2.4.41.tar.gz\r\n# tar xvzf httpd-2.4.41.tar.gz\r\n# cd httpd-2.4.41\/\r\n# .\/configure \\\r\n--prefix=\/usr\/local\/httpd4 \\\r\n--enable-http2 \\\r\n--enable-brotli \\\r\n--with-brotli=\/usr\/local\/lib \\\r\n--enable-ssl \\\r\n--with-ssl=\/usr\/local\/ssl \\\r\n--with-apr=\/usr\/local\/apr \\\r\n--with-apr-util=\/usr\/local\/apr \\\r\n--enable-so \\\r\n--enable-mods-shared=all \\\r\n--enable-mpms-shared=all\r\n# make\r\n# make install<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u3089Apache\u306e\u8a2d\u5b9a\u3002httpd.conf\u306e\u8a72\u5f53\u7b87\u6240\u3092\u6709\u52b9\u5316\u3001\u8ffd\u8a18\u30fb\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<pre># cd \/usr\/local\/httpd4\/conf\r\n# vi httpd.conf\r\n-----------------------------------------\r\n# for Brotli\r\nLoadModule brotli_module modules\/mod_brotli.so\r\nLoadModule mpm_event_module modules\/mod_mpm_event.so\r\n#LoadModule mpm_prefork_module modules\/mod_mpm_prefork.so\r\n#LoadModule mpm_worker_module modules\/mod_mpm_worker.so\r\n# for HTTPS\r\nLoadModule ssl_module modules\/mod_ssl.so\r\nLoadModule socache_shmcb_module modules\/mod_socache_shmcb.so\r\n# for HTTP\/2\r\nLoadModule http2_module modules\/mod_http2.so\r\n# for VirtualHost\r\nLoadModule vhost_alias_module modules\/mod_vhost_alias.so\r\n# for Rewrite\r\nLoadModule rewrite_module modules\/mod_rewrite.so\r\n# for php-fpm\r\nLoadModule proxy_module modules\/mod_proxy.so\r\nLoadModule proxy_fcgi_module modules\/mod_proxy_fcgi.so\r\n# for gZip\r\nLoadModule deflate_module modules\/mod_deflate.so\r\n# for cash expire\r\nLoadModule expires_module modules\/mod_expires.so\r\n.\r\n.\r\nUser apache\r\nGroup apache\r\n.\r\n.\r\n# for cash expire\r\n&lt;IfModule mod_expires.c&gt;\r\n    &lt;filesMatch \".(jpg|jpeg|png|gif|swf|js|css)$\"&gt;\r\n        ExpiresActive On\r\n        ExpiresDefault \"access plus 30 days\"\r\n    &lt;\/filesMatch&gt;\r\n&lt;\/IfModule&gt;\r\n.\r\n.\r\n&lt;IfModule dir_module&gt;\r\n    # index.php\u8ffd\u52a0\uff08WordPress\u306b\u5fc5\u8981\uff09\r\n    #DirectoryIndex index.html\r\n    DirectoryIndex index.html index.php\r\n&lt;\/IfModule&gt;\r\n.\r\n.\r\n# php\u8ffd\u52a0\r\nAddType application\/x-httpd-php .php\r\nAddType application\/x-httpd-php-source .phps\r\n.\r\n.\r\nInclude conf\/extra\/httpd-mpm.conf\r\n.\r\n.\r\n# Virtual hosts\uff08http\u7528\u3001https\u7528\u306f\u5206\u3051\u3066\u8a2d\u5b9a\u3057\u307e\u3059\uff09\r\n#Include conf\/extra\/httpd-vhosts.conf\r\nInclude conf\/extra\/httpd-vhosts-http.conf\r\nInclude conf\/extra\/httpd-vhosts-https.conf\r\n.\r\n.\r\nInclude conf\/extra\/httpd-ssl.conf\r\n-----------------------------------------\r\n:wq<\/pre>\n<p>mpm_event\u306e\u8a2d\u5b9a<\/p>\n<pre># cd extra\r\n# vi httpd-mpm.conf \r\n-----------------------------------------\r\n.\r\n.\r\n&lt;IfModule mpm_event_module&gt;\r\n    StartServers            2\r\n    MinSpareThreads         4\r\n    MaxSpareThreads         4\r\n    ThreadsPerChild         8\r\n    MaxRequestWorkers       8\r\n    MaxConnectionsPerChild 100\r\n&lt;\/IfModule&gt;\r\n.\r\n.\r\n-----------------------------------------\r\n:wq\r\n<\/pre>\n<p>HTTPS\u306e\u8a2d\u5b9a\u3002httpd-ssl.conf\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8ffd\u8a18\u30fb\u4fee\u6b63\u3057\u307e\u3059\u3002\u6700\u8fd1<a href=\"https:\/\/www.ssllabs.com\/ssltest\/\">SSL Labs<\/a>\u306e\u5224\u5b9a\u304c\u53b3\u3057\u3044\u306e\u3067\u3001TLS 1.2\u3001TLS 1.3\u306e\u7dd1\u8272\u306b\u306a\u308b\uff08Weak\u6271\u3044\u3055\u308c\u306a\u3044\uff09\u6697\u53f7\u30b9\u30a4\u30fc\u30c8\u3060\u3051\u6b8b\u3057\u307e\u3059\u3002<\/p>\n<pre># vi httpd-ssl.conf\r\n-----------------------------------------\r\n.\r\n.\r\n# \u5e38\u6642SSL\r\nHeader set Strict-Transport-Security \"max-age=31536000; includeSubDomains; preload\"\r\nHeader edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure\r\nHeader always set X-Frame-Options SAMEORIGIN\r\nHeader always set X-Content-Type-Options nosniff\r\n.\r\n.\r\n# \u660e\u793a\u7684\u306bSSL\u5727\u7e2e\u3092OFF\r\nSSLCompression off\r\n.\r\n.\r\nSSLCipherSuite \"TLS_AES_256_GCM_SHA384 \\\r\nTLS_CHACHA20_POLY1305_SHA256 \\\r\nECDHE-RSA-AES128-GCM-SHA256 \\\r\nECDHE-RSA-AES256-GCM-SHA384 \\\r\nDHE-RSA-AES128-GCM-SHA256 \\\r\nDHE-RSA-AES256-GCM-SHA384\r\n\r\nSSLProxyCipherSuite \"TLS_AES_256_GCM_SHA384 \\\r\nTLS_CHACHA20_POLY1305_SHA256 \\\r\nECDHE-RSA-AES128-GCM-SHA256 \\\r\nECDHE-RSA-AES256-GCM-SHA384 \\\r\nDHE-RSA-AES128-GCM-SHA256 \\\r\nDHE-RSA-AES256-GCM-SHA384 \r\n.\r\n.\r\nSSLProtocol all -SSLv3 -TLSv1 -TLSv1.1\r\nSSLProxyProtocol all -SSLv3 -TLSv1 -TLSv1.1\r\n.\r\n.\r\n# for OCSP\r\nSSLUseStapling on\r\nSSLStaplingResponderTimeout 5\r\nSSLStaplingReturnResponderErrors off\r\nSSLStaplingCache shmcb:\/var\/run\/ocsp(128000)\r\n.\r\n.\r\n#ServerName www.example.com:443\r\n#ServerAdmin you@example.com\r\n.\r\n.\r\nSSLEngine on\r\n    #Include \/etc\/letsencrypt\/options-ssl-apache.conf\r\n    SSLCertificateFile \/etc\/letsencrypt\/live\/ji0vwl.net\/cert.pem\r\n    SSLCertificateKeyFile \/etc\/letsencrypt\/live\/ji0vwl.net\/privkey.pem\r\n    SSLCertificateChainFile \/etc\/letsencrypt\/live\/ji0vwl.net\/chain.pem\r\n.\r\n.\r\n#SSLCertificateFile \"\/usr\/local\/httpd4\/conf\/server.crt\"\r\n.\r\n.\r\n#SSLCertificateKeyFile \"\/usr\/local\/httpd4\/conf\/server.key\"\r\n-----------------------------------------\r\n:wq<\/pre>\n<p>HTTP\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u306e\u8a2d\u5b9a<\/p>\n<pre># vi httpd-vhosts-http.conf\r\n-----------------------------------------\r\n&lt;VirtualHost *:80&gt;\r\n    DocumentRoot \/var\/www\/html\r\n    ServerName test.ji0vwl.net\r\n\r\n    &lt;Directory \"\/var\/www\/html\/\"&gt;\r\n        Options FollowSymlinks Includes\r\n        AllowOverride All\r\n        AddType text\/html .html\r\n        Require all granted\r\n    &lt;\/Directory&gt;\r\n    \r\n    # HTTPS\u306b\u30ea\u30e9\u30a4\u30c8\u3059\u308b\u5834\u5408\u306f\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u89e3\u9664\r\n    #RewriteEngine on\r\n    #RewriteCond %{SERVER_NAME} =test.ji0vwl.net\r\n    #RewriteRule ^ https:\/\/%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]\r\n&lt;\/VirtualHost&gt;\r\n-----------------------------------------\r\n:wq<\/pre>\n<p>HTTPS\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u306e\u8a2d\u5b9a<\/p>\n<p>Require not ip \u306f\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u5236\u9650\u3057\u305f\u3044IP\u30a2\u30c9\u30ec\u30b9\u7bc4\u56f2\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre># vi httpd-vhosts-https.conf\r\n-----------------------------------------\r\n&lt;IfModule mod_ssl.c&gt;\r\n&lt;VirtualHost *:443&gt;\r\n    DocumentRoot \/var\/www\/html\r\n    ServerName test.ji0vwl.net\r\n    \r\n    # HTTP\/2\u6709\u52b9\u5316\uff08h2\u8ffd\u52a0\uff09\r\n    Protocols h2 http\/1.1\r\n\r\n    &lt;Directory \"\/var\/www\/html\/\"&gt;\r\n        Options FollowSymlinks Includes\r\n        AllowOverride All\r\n        AddType text\/html .html\r\n        &lt;RequireAll&gt;\r\n          Require not ip xxx.xxx yyy.yyy zzz.zzz.zzz\r\n          Require all granted\r\n        &lt;\/RequireAll&gt;\r\n    &lt;\/Directory&gt;\r\n\r\n    # SSL\u8a3c\u660e\u66f8\r\n    SSLCertificateFile \/etc\/letsencrypt\/live\/ji0vwl.net\/fullchain.pem\r\n    SSLCertificateKeyFile \/etc\/letsencrypt\/live\/ji0vwl.net\/privkey.pem\r\n    #SSLCertificateFile \/etc\/letsencrypt\/live\/ji0vwl.net\/cert.pem\r\n    #SSLCertificateChainFile \/etc\/letsencrypt\/live\/ji0vwl.net\/chain.pem\r\n\r\n    # for gZip\u5727\u7e2e\r\n   &lt;IfModule mod_deflate.c&gt;\r\n       DeflateCompressionLevel 1\r\n       &lt;IfModule mod_filter.c&gt;\r\n        FilterDeclare COMPRESS\r\n        FilterProvider COMPRESS DEFLATE \"%{CONTENT_TYPE} =~ m#^text\/#i\"\r\n        FilterProvider COMPRESS DEFLATE \"%{CONTENT_TYPE} =~ m#^application\/(atom\\+xml|javascript|json|rss\\+xml|xml|xhtml\\+xml)#i\"\r\n        FilterProvider COMPRESS DEFLATE \"%{CONTENT_TYPE} =~ m#^image\/(svg\\+xml|vnd\\.microsoft\\.icon)#i\"\r\n        FilterChain COMPRESS\r\n        FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no\r\n       &lt;\/IfModule&gt;\r\n   &lt;\/Ifmodule&gt;\r\n\r\n   # for Brotli\u5727\u7e2e\r\n   &lt;IfModule mod_brotli.c&gt;\r\n       SetOutputFilter BROTLI_COMPRESS\r\n       SetEnvIfNoCase Request_URI \\.(?:gif|jpe?g|png)$ no-brotli\r\n\r\n       BrotliCompressionQuality 5\r\n       BrotliCompressionWindow 18\r\n\r\n       BrotliFilterNote Input instream\r\n       BrotliFilterNote Output outstream\r\n       BrotliFilterNote Ratio ratio\r\n       LogFormat '\"%r\" %{outstream}n\/%{instream}n (%{ratio}n%%)' brotli\r\n       CustomLog \"logs\/brotli_log\" brotli\r\n   &lt;\/IfModule&gt;\r\n\r\n   # for dosdetector\r\n   DoSDetection on\r\n   DoSPeriod 60\r\n   DoSThreshold 250\r\n   DoSBanPeriod 60\r\n   DoSTableSize 100\r\n   RewriteEngine On\r\n   RewriteCond %{ENV:SuspectDoS} =1\r\n   RewriteRule .* - [R=503,L]\r\n   ErrorDocument 503 \"&lt;h1&gt;Sorry, ji0vwl.net is busy.. Please access later.&lt;\/h1&gt;\"\r\n&lt;\/VirtualHost&gt;\r\n&lt;\/IfModule&gt;\r\n-----------------------------------------\r\n:wq\r\n<\/pre>\n<h4><\/h4>\n<p>&nbsp;<\/p>\n<h4>4. Apache 2.4.41 \u3092 httpd4.service \u306b\u767b\u9332<\/h4>\n<p>\u300csystemctl start httpd4\u300d\u3067\u8d77\u52d5\u3067\u304d\u308b\u3088\u3046\u306b\u3001httpd4 \u3068\u3044\u3046\u540d\u524d\u306e\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u767b\u9332\u3057\u307e\u3059\u3002reload=<a href=\"https:\/\/ex1.m-yabe.com\/archives\/2180\">graceful<\/a>\u52d5\u4f5c\u3067\u3059\u3002\u4eca\u56de\u306f\u306ehttpd4\u3092\u4f7f\u3044\u307e\u308f\u3057\u305f\u306e\u3067\u3068\u304f\u306b\u5bfe\u5fdc\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<pre> # vi \/etc\/systemd\/system\/httpd4.service\r\n-----------------------------------------\r\n[Unit]\r\nDescription=The Apache HTTP Server\r\nAfter=network.target remote-fs.target nss-lookup.target\r\n \r\n[Service]\r\nType=forking\r\nExecStart=\/usr\/local\/httpd4\/bin\/apachectl start\r\nExecReload=\/usr\/local\/httpd4\/bin\/apachectl graceful\r\nExecStop=\/usr\/local\/httpd4\/bin\/apachectl stop\r\n \r\n[Install]\r\nWantedBy=multi-user.target\r\n-----------------------------------------\r\n:wq<\/pre>\n<pre># systemctl daemon-reload\r\n# systemctl list-unit-files | grep httpd4<\/pre>\n<p>&nbsp;<\/p>\n<h4>5. PHP 7.4.1 \u3092 \/usr\/local\/php7.4 \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h4>\n<h5>5.1. <a href=\"https:\/\/secure.php.net\/downloads.php\">PHP<\/a>\u3068<a href=\"https:\/\/pecl.php.net\/package\/APCu\">APCu<\/a>\/<a href=\"https:\/\/pecl.php.net\/package\/apcu_bc\">APCu_bc<\/a>\u306e\u6e96\u5099<\/h5>\n<p>\u305d\u308c\u305e\u308c\u6700\u65b0\u306e\u30bd\u30fc\u30b9\u3092wget\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304d\u307e\u3059\u3002apcu\u3068apcu_bc\u306f\u3001PHP\u306e\u30bd\u30fc\u30b9\u5c55\u958b\u5f8c\u00a0php-7.4.1\/ext\/ \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b\u5c55\u958b\u3057\u3001\u305d\u308c\u305e\u308c\u30ea\u30cd\u30fc\u30e0\u3057\u307e\u3059\u3002<\/p>\n<pre>$ sudo -i\r\n# cd \/usr\/local\/src\r\n# yum -y install libxml2-devel systemd-devel libpng-devel libwebp libwebp-devel libwebp-tools\r\n# wget http:\/\/jp2.php.net\/get\/php-7.4.1.tar.gz\/from\/this\/mirror -O \/usr\/local\/src\/php-7.4.1.tar.gz\r\n# tar -xvzf php-7.4.1.tar.gz\r\n# cd php-7.4.1\/ext\r\n# wget -q https:\/\/pecl.php.net\/get\/apcu-5.1.18.tgz\r\n# wget -q https:\/\/pecl.php.net\/get\/apcu_bc-1.0.5.tgz\r\n# tar zxvf apcu-5.1.18.tgz\r\n# tar zxvf apcu_bc-1.0.5.tgz\r\n# mv apcu-5.1.18 apcu\r\n# mv apcu_bc-1.0.5 apcu_bc\r\n# cd ..\r\n# rm -rf configure\r\n# .\/buildconf --force\r\nbuildconf: Checking installation\r\nbuildconf: autoconf version 2.69 (ok)\r\nbuildconf: Forcing buildconf. The configure files will be regenerated.\r\nbuildconf: Cleaning cache and configure files\r\nbuildconf: Rebuilding configure\r\nbuildconf: Rebuilding main\/php_config.h.in\r\nbuildconf: Run .\/configure to proceed with customizing the PHP build.\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h5>5.2. PHP 7.4.1 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h5>\n<p>&#8211;prefix=[dir]\u3067PHP\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u307e\u305f&#8211;with-apxs2=[dir]\u3067PHP\u3068Apache\u3092\u3001&#8211;with-openssl=[dir]\u3067PHP\u3068OpenSSL\u3092\u3001&#8211;with-mysql-sock=[dir]\u3067PHP\u3068mySQL\u3092\u7d50\u3073\u3064\u3051\u307e\u3059\u3002<\/p>\n<p><b>(2020\/1\/1\u4fee\u6b63)<\/b><br \/>\n\u4eca\u56de sqlite-devel \u3068 oniguruma-devel libXpm-devel\u3001cmake3\u3068libzip\u304c\u304c\u8ffd\u52a0\u3067\u5fc5\u8981\u306b\u306a\u3063\u305f\u306e\u3067\u4e8b\u524d\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre>\r\n# yum -y install sqlite-devel oniguruma-devel libXpm-devel cmake3\r\n# ln -s \/usr\/bin\/cmake3 \/usr\/local\/bin\/cmake\r\n# cd \/usr\/local\/src\r\n# wget https:\/\/libzip.org\/download\/libzip-1.5.2.tar.gz\r\n# tar xvfz libzip-1.5.2.tar.gz\r\n# cd libzip-1.5.2\r\n# \/usr\/local\/bin\/cmake -DCMAKE_INSTALL_PREFIX=\/usr\r\n# make\r\n# make install\r\n<\/pre>\n<p><s>\u307e\u305fPHP 7.4\u304b\u3089\u7121\u304f\u306a\u3063\u305f\u3001\u4ee5\u4e0b\u306e\u30d3\u30eb\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u524a\u9664\u3057\u3066configure\u3057\u307e\u3059\u3002<br \/>\n&#8211;with-freetype-dir=\/usr \u00a0&#8211;with-png-dir=\/usr \u00a0&#8211;with-jpeg-dir=\/usr \u00a0&#8211;with-webp-dir=\/usr \u00a0&#8211;with-gd=shared<\/s><\/p>\n<p>PHP 7.4\u304b\u3089\u7121\u304f\u306a\u3063\u305f\u3001\u30d3\u30eb\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ee5\u4e0b\u306e\u3082\u306e\u306b\u7f6e\u304d\u63db\u3048\u3066configure\u3057\u307e\u3059\u3002<br \/>\n\u65e7\uff1a&#8211;with-freetype-dir=\/usr \u00a0&#8211;with-png-dir=\/usr \u00a0&#8211;with-jpeg-dir=\/usr \u00a0&#8211;with-webp-dir=\/usr \u00a0&#8211;with-gd=shared<br \/>\n\u65b0\uff1a&#8211;with-zip\u3000&#8211;with-jpeg\u3000&#8211;with-freetype\u3000&#8211;enable-gd<\/p>\n<pre>\r\n# cd \/usr\/local\/src\/php-7.4.1\r\n# .\/configure \\\r\n--prefix=\/usr\/local\/php7.4 \\\r\n--with-apxs2=\/usr\/local\/httpd4\/bin\/apxs \\\r\n--with-openssl=\/usr\/local\/ssl \\\r\n--with-mysql-sock=\/var\/lib\/mysql\/mysql.sock \\\r\n--with-mysqli \\\r\n--with-pdo-mysql \\\r\n--with-zlib \\\r\n--with-curl \\\r\n--with-zip \\\r\n--with-jpeg \\\r\n--with-xpm \\\r\n--with-freetype \\\r\n--with-fpm-systemd \\\r\n--with-fpm-user=apache \\\r\n--with-fpm-group=apache \\\r\n--enable-gd \\\r\n--enable-gd-jis-conv \\\r\n--enable-mbstring \\\r\n--enable-xml \\\r\n--enable-fpm \\\r\n--enable-ftp \\\r\n--enable-apc \\\r\n--enable-apcu \\\r\n--enable-opcache \\\r\n--enable-inline-optimization\r\n# make\r\n# make install\r\n# libtool --finish \/usr\/local\/src\/php-7.4.1\/libs<\/pre>\n<p>&nbsp;<\/p>\n<h5>5.3. php.ini\u3092\u4f5c\u6210\u3059\u308b<\/h5>\n<p>APCu\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306bphp.ini\u4f5c\u6210\u3057\u307e\u3059\u3002Opcache\u3082\u6709\u52b9\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002php.ini\u3092\u4f5c\u308b\u5834\u6240\u304c\u5206\u304b\u3089\u306a\u3044\u5834\u5408\u306f<a href=\"https:\/\/qiita.com\/ritukiii\/items\/624eb475b85e28613a70\">\u3053\u3061\u3089<\/a>\u3002\u4eca\u56de\u306f\u4f5c\u6210\u6e08\u307f\u306a\u306e\u3067\u7701\u7565\u3057\u307e\u3059\u3002<\/p>\n<pre># cd \/usr\/local\/php7.4\/lib\r\n# vim php.ini<\/pre>\n<pre>max_execution_time=600\r\nmemory_limit=128M\r\nerror_reporting=0\r\ndisplay_errors=0\r\nlog_errors=0\r\nuser_ini.filename=\r\nrealpath_cache_size=2M\r\ncgi.check_shebang_line=0\r\ndate.timezone = \"Asia\/Tokyo\"\r\nzend_extension=opcache.so\r\n\r\n[opcache]\r\nopcache.enable=1\r\n;opcache.enable_cli=0\r\nopcache.memory_consumption=64\r\nopcache.interned_strings_buffer=8\r\nopcache.max_accelerated_files=4000\r\n;opcache.max_wasted_percentage=5\r\n;opcache.use_cwd=1\r\n;opcache.validate_timestamps=1\r\nopcache.revalidate_freq=2\r\nopcache.revalidate_path=0\r\n;opcache.save_comments=1\r\nopcache.fast_shutdown=1\r\n;opcache.enable_file_override=0\r\nopcache.optimization_level=0xffffffff\r\n;opcache.inherited_hack=1\r\n;opcache.dups_fix=0\r\n;opcache.blacklist_filename=\/etc\/php.d\/opcache*.blacklist\r\n;opcache.max_file_size=0\r\n;opcache.consistency_checks=0\r\n;opcache.force_restart_timeout=180\r\n;opcache.error_log=\r\n;opcache.log_verbosity_level=1\r\n;opcache.preferred_memory_model=\r\n;opcache.protect_memory=0\r\n;opcache.restrict_api=\r\n;opcache.file_cache=\r\n;opcache.file_cache_only=0\r\n;\r\napc.enabled = 1\r\napc.enable_cli=1\r\napc.shm_size=40M\r\napc.ttl=3600\r\napc.gc_ttl=3600\r\n;apc.mmap_file_mask=\/tmp\/apc.XXXXXX\r\n;\r\n;;mbstring\r\nmbstring.language = Japanese\r\nmbstring.internal_encoding = UTF-8\r\nmbstring.http_input = UTF-8\r\nmbstring.http_output = pass\r\nmbstring.detect_order = UTF-8,SJIS,EUC-JP,JIS,ASCII<\/pre>\n<p>&nbsp;<\/p>\n<h4>6. \u00a0Passenger 6.0.4 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<p>Redmine\u3092\u52d5\u304b\u3055\u306a\u3044\u5834\u5408\u306f\u98db\u3070\u3057\u3066\u3044\u305f\u3060\u3044\u3066\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<pre># gem install passenger\r\n# chmod o+x \"\/root\"\r\n# passenger-install-apache2-module --apxs2-path \"\/usr\/local\/httpd4\/bin\/apxs\"      # \u3081\u3061\u3083\u304f\u3061\u3083\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\r\n1\r\n[Enter]\r\n\u25cfRuby\r\n\u25cfPython\r\n[Enter]\r\ny\r\n[Enter]\r\n.\r\n.\r\n.\r\n\u260530\u5206\u4ee5\u4e0a\u3002\u6c17\u9577\u306b\u5f85\u3061\u307e\u3057\u3087\u3046\u2605\r\n.\r\n.\r\n[Enter]\r\n[Enter]<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4>7. httpd4\u3092\u518d\u8d77\u52d5<\/h4>\n<pre># systemctl restart httpd4<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Apache 2.4.41\/OpenSSL 1.1.1d\/PHP 7.4.1\/(Passenger 6.0.4)<\/strong>\u306e\u74b0\u5883\u306b\u3066\u3001\u7121\u4e8b WordPress 5.3 \u306e\u52d5\u4f5c\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\uff01<a href=\"https:\/\/test.ji0vwl.net\/wp-content\/uploads\/2019\/01\/bf2e41e9ebf76b4d8f5e731583b8c902.png\"><br \/>\n<\/a><\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p>\uff08\u8ffd\u8a18\uff09<\/p>\n<p><s>\u3068\u601d\u3063\u305f\u3089\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306e Pz-LinkCard \u304c \u306a\u305c\u304b\u52d5\u4f5c\u3057\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\u30d7\u30e9\u30b0\u30a4\u30f3\u306a\u3069\u4e00\u90e8\u52d5\u4f5c\u3057\u306a\u304f\u306a\u308b\u5834\u5408\u3082\u60f3\u5b9a\u3055\u308c\u307e\u3059\u306e\u3067\u3001PHP\u306b\u9650\u3089\u305a\u74b0\u5883\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306f\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002<\/s><\/p>\n<p>\u79c1\u306e\u30d3\u30eb\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3\u6307\u5b9a\u30df\u30b9\u3067\u30d7\u30e9\u30b0\u30a4\u30f3\u306e Pz-LinkCard \u304c \u52d5\u4f5c\u3057\u306a\u304f\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002php 7.3\u307e\u3067\u306f\u4e0d\u8981\u3060\u3063\u305f\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u304b\u3063\u305f\u69d8\u3067\u3059\u3002\u5b9f\u969b\u306b\u3069\u308c\u304c\u52b9\u3044\u305f\u304b\u306f\u4e0d\u660e\u3067\u3059\u304c\u3001&#8211;enable-gd \u3042\u305f\u308a\u3067\u3057\u3087\u3046\u304b\uff1f\uff1f \u304a\u9a12\u304c\u305b\u3057\u3066\u3057\u307e\u3044\u5927\u5909\u7533\u3057\u8a33\u3054\u3056\u3044\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS7\u306bApache2.4.41+OpenSSL1.1.1d+PHP7.4.1\u3092\u30bd\u30fc\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PHP 7.4\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u3066\u4e45\u3057\u3044\u3067\u3059\u304c\u3001PHP 7.3 \u306e\u30d3\u30eb\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u306f\u3059\u3050\u306b\u901a\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u5e74\u672b &hellip; <a href=\"https:\/\/ji0vwl.net\/index.php\/2019\/12\/30\/2768\/\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">WordPress 5.3 \u3092 \u30bd\u30fc\u30b9\u30d3\u30eb\u30c9\u3057\u305f PHP 7.4 \u3067\u52d5\u304b\u3059<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2768","post","type-post","status-publish","format-standard","hentry","category-server"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/posts\/2768","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/comments?post=2768"}],"version-history":[{"count":0,"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/posts\/2768\/revisions"}],"wp:attachment":[{"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/media?parent=2768"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/categories?post=2768"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ji0vwl.net\/index.php\/wp-json\/wp\/v2\/tags?post=2768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}