{"id":1235,"date":"2017-11-27T16:05:49","date_gmt":"2017-11-27T07:05:49","guid":{"rendered":"http:\/\/adan.jp.net\/blog\/?p=1235"},"modified":"2020-01-30T14:51:31","modified_gmt":"2020-01-30T05:51:31","slug":"centos7%e3%81%b8php7mysql5-7apache2-4%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%ef%bc%86%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/adan.jp.net\/blog\/programing\/1235","title":{"rendered":"\u3055\u304f\u3089\u306e\u30af\u30e9\u30a6\u30c9 CentOS7\u3078PHP7.3+MySQL5.7+Apache2.4\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff06\u8a2d\u5b9a"},"content":{"rendered":"\n<p>2020\u5e74\u306e2\u6708\u6642\u70b9\u3067\u306e\u6700\u65b0\u306ePHP\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u3055\u304f\u3089\u30af\u30e9\u30a6\u30c9\u3067\u306eCPU2\u30b3\u30a2\u3001\u30e1\u30e2\u30ea4GB\u3067\u306e\u4f5c\u6210\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u304b\u3089\u3001PHP7.3\u3068MySQL5.7\u3068Apache2.4\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u666e\u6bb5\u306f\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u30d3\u30eb\u30c9\u3057\u3066\u3068\u3084\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306fyum\u3092\u4f7f\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br>\u4eca\u56de\u306e\u521d\u3081\u3066\u306e\u8a66\u307f\u304c\u3001\u300cepel\u300d\u3068\u300cremi\u300d\u3068\u3044\u3046\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3057\u3066\u3001PHP\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u81ea\u4f53\u306f\u3059\u3050\u306b\u7d42\u308f\u308b\u3068\u601d\u3046\u306e\u3067\u3001\u5c11\u3057epel\u3084remi\u3063\u3066\u306a\u3093\u305e\u3084\u3068\u8a00\u3046\u3068\u3053\u308d\u306b\u89e6\u308c\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"hh hh21 wp-block-heading\" id=\"i-0\"><span class=\"ez-toc-section\" id=\"%E3%81%9D%E3%82%82%E3%81%9D%E3%82%82%E3%83%AA%E3%83%9D%E3%82%B8%E3%83%88%E3%83%AA%E3%81%A8%E3%81%AF%E3%81%AA%E3%81%AB%EF%BC%9F\"><\/span>\u305d\u3082\u305d\u3082\u30ea\u30dd\u30b8\u30c8\u30ea\u3068\u306f\u306a\u306b\uff1f<span class=\"ez-toc-section-end\"><\/span><\/h2><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\"><p class=\"ez-toc-title\" style=\"cursor:inherit\">\u76ee\u6b21<\/p>\n<\/div><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/adan.jp.net\/blog\/programing\/1235\/#%E3%81%9D%E3%82%82%E3%81%9D%E3%82%82%E3%83%AA%E3%83%9D%E3%82%B8%E3%83%88%E3%83%AA%E3%81%A8%E3%81%AF%E3%81%AA%E3%81%AB%EF%BC%9F\" >\u305d\u3082\u305d\u3082\u30ea\u30dd\u30b8\u30c8\u30ea\u3068\u306f\u306a\u306b\uff1f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/adan.jp.net\/blog\/programing\/1235\/#epel%E3%81%A8remi%E3%81%A3%E3%81%A6%E4%BD%95%EF%BC%9F%E3%83%A1%E3%83%AA%E3%83%83%E3%83%88%E3%81%AF%EF%BC%9F\" >epel\u3068remi\u3063\u3066\u4f55\uff1f\u30e1\u30ea\u30c3\u30c8\u306f\uff1f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/adan.jp.net\/blog\/programing\/1235\/#Apache%EF%BC%88%E3%82%A2%E3%83%91%E3%83%83%E3%83%81%EF%BC%89%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" >Apache\uff08\u30a2\u30d1\u30c3\u30c1\uff09\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/adan.jp.net\/blog\/programing\/1235\/#MySQL57%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" >MySQL5.7\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/adan.jp.net\/blog\/programing\/1235\/#PHP73%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" >PHP7.3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<p>Linux\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3068\u306f\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3084\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u7ba1\u7406\u3057\u3066\u3044\u308b\u30de\u30fc\u30b1\u30c3\u30c8\u3067\u3059\u3001<br>iPhone\u306eApp Store\u3084Android\u306eGooglePlay\u3092\u30a4\u30e1\u30fc\u30b8\u3059\u308b\u3068\u308f\u304b\u308a\u3084\u3059\u3044\u304b\u3082\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"hh hh21 wp-block-heading\" id=\"i-1\"><span class=\"ez-toc-section\" id=\"epel%E3%81%A8remi%E3%81%A3%E3%81%A6%E4%BD%95%EF%BC%9F%E3%83%A1%E3%83%AA%E3%83%83%E3%83%88%E3%81%AF%EF%BC%9F\"><\/span>epel\u3068remi\u3063\u3066\u4f55\uff1f\u30e1\u30ea\u30c3\u30c8\u306f\uff1f<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>epel\u3082remi\u3082\u305d\u308c\u305e\u308c\u306e\u30ec\u30dd\u30b8\u30c8\u30ea\u3092\u6307\u3059\u3088\u3046\u3067\u3059\u30012\u3064\u3068\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304f\u7406\u7531\u306f\u3001\u3069\u3061\u3089\u304b\u3044\u3044\u307b\u3046\u3092\u53d6\u308b\u305f\u3081\u3067\u3059\u3002<br>epel\u306b\u306a\u3044\u5834\u5408\u306fremi\u304b\u3089\u3001remi\u3088\u308a\u6700\u65b0\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u5834\u5408\u306fepel\u304b\u3089\u3068\u8a00\u3046\u4fdd\u967a\u7684\u306a\u611f\u3058\u3089\u3057\u3044\u3067\u3059\u3002\u9055\u3063\u3066\u305f\u3089\u3054\u3081\u3093\u306a\u3055\u3044\u3002<br>\u305d\u3082\u305d\u3082CentOS\u306b\u306f\u3001\u516c\u5f0f\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u3066\u3001\u901a\u5e38\u306eyum\u30b3\u30de\u30f3\u30c9\u3067\u5229\u7528\u53ef\u80fd\u3067\u3059\u3001\u3067\u3059\u304c\u3001CentOS\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306f\u3001\u4fdd\u5b88\u7684\u3067\u6700\u65b0\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3084\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u66f4\u65b0\u304c\u884c\u308f\u308c\u306a\u3044\u306e\u3067\u3001CentOS\u306bepel\u3084remi\u3068\u3044\u3046\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001\u5404\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u3042\u308b\u6700\u65b0\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u4f7f\u304a\u3046\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<br>\u5b9f\u306f\u3001\u975e\u516c\u5f0f\u306aepel\u3068remi\u30ea\u30dd\u30b8\u30c8\u30ea\u306a\u3093\u3067\u3059\u304c\u3001epel\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3082remi\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3082\u516c\u5f0f\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u51fa\u6765\u308b\u3068\u3044\u3046\u70b9\u3067\u5c11\u3057\u5b89\u5fc3\u3057\u3066\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<br>\u4f8b\u3048\u3067\u8a00\u3046\u3068\u3001iPhone\u3067\u3001AppStore\u304b\u3089GooglePlay\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001Android\u306e\u30a2\u30d7\u30ea\u3092\u4f7f\u3063\u3061\u3083\u304a\u3046\u3063\u3066\u611f\u3058\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u306f\u3001CentOS\u81ea\u4f53\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# yum -y update<\/code><\/pre>\n\n\n\n<p>CentOS\u306f\u4fdd\u5b88\u7684\u3067\u3001\u6700\u65b0\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3084\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304c\u53cd\u6620\u3055\u308c\u308b\u306e\u9045\u3044\u306e\u3067\u3001<br>EPEL\u3068remi\u30ec\u30dd\u30b8\u30c8\u30ea\u306e\u8ffd\u52a0\u3057\u3001\u6700\u65b0\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# yum install epel-release\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror\nLoading mirror speeds from cached hostfile\n * epel: ftp.jaist.ac.jp\n\u30d1\u30c3\u30b1\u30fc\u30b8 epel-release-7-11.noarch \u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u304b\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3059\n\u4f55\u3082\u3057\u307e\u305b\u3093<\/code><\/pre>\n\n\n\n<p>\u3093\uff01\uff1f\u5165\u3063\u3066\u308b\u305e\u30fb\u30fb\u30fb\u3055\u304f\u3089\u30af\u30e9\u30a6\u30c9\u3067\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u5165\u3063\u3066\u308b\u3089\u3057\u3044\u3067\u3059\u3002\u3002\u3002<br>\u7d9a\u304d\u307e\u3057\u3066\u3001remi\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# rpm -Uvh http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-7.rpm\nhttp:\/\/rpms.famillecollet.com\/enterprise\/remi-release-7.rpm \u3092\u53d6\u5f97\u4e2d\n\u8b66\u544a: \/var\/tmp\/rpm-tmp.exexDG: \u30d8\u30c3\u30c0\u30fc V4 DSA\/SHA1 Signature\u3001\u9375 ID 00f97f56: NOKEY\n\u6e96\u5099\u3057\u3066\u3044\u307e\u3059...              ################################# [100%]\n\u66f4\u65b0\u4e2d \/ \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d...\n   1:remi-release-7.3-2.el7.remi      ################################# [100%]<\/code><\/pre>\n\n\n\n<p>\u4e0a\u624b\u304f\u884c\u3063\u305f\u3063\u307d\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306b\u306f\u3001epel\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u512a\u5148\u7684\u306b\u4f7f\u3046\u3088\u3046\u306a\u8a2d\u5b9a\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br>\u306a\u306e\u3067\u3001yum update\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u516c\u5f0f\u30d1\u30c3\u30b1\u30fc\u30b8\u304cEPEL\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u4e0a\u66f8\u304d\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3001\u306a\u306b\u3076\u3093\u975e\u516c\u5f0f\u306a\u3082\u306e\u306a\u306e\u3067\u3001\u5fc5\u8981\u306a\u3068\u304d\u306b\u3060\u3051\u3001epel\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f7f\u3046\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> epel\u306e\u7121\u52b9\u8a2d\u5b9a\u306f\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u3001<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# vi \/etc\/yum.repos.d\/epel.repo<\/code><\/pre>\n\n\n\n[epel]\u306e\u90e8\u5206\u306eenable=1\u3092\u3001enable=0 \u66f8\u304d\u63db\u3048\u3066\u308b\u306e\u307f\u3067\u3059\u3002 <\/p>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> remi\u306e\u5834\u5408\u306f\u3001\u4e0b\u8a18<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# vi \/etc\/yum.repos.d\/remi.repo<\/code><\/pre>\n\n\n\n[remi]\u306e\u90e8\u5206\u306eenable=1\u3092\u3001enable=0 \u66f8\u304d\u63db\u3048\u3066\u308b\u306e\u307f\u3067\u3059\u3002 <\/p>\n\n\n\n<p>\u305d\u308c\u3067\u306f\u3001\u672c\u984c\u306ePHP\u3068MySQL\u3068Apache\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u306b\u9032\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"hh hh21 wp-block-heading\" id=\"i-2\"><span class=\"ez-toc-section\" id=\"Apache%EF%BC%88%E3%82%A2%E3%83%91%E3%83%83%E3%83%81%EF%BC%89%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\"><\/span>Apache\uff08\u30a2\u30d1\u30c3\u30c1\uff09\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> Apache\u306f\u3001\u516c\u5f0f\u30b5\u30a4\u30c8\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u6700\u65b0\u306b\u8fd1\u3044\u72b6\u614b\u3067\u3042\u3063\u305f\u306e\u3067\u3001\u516c\u5f0f\u30b5\u30a4\u30c8\u304b\u3089\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# yum -y install httpd<\/code><\/pre>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u5b8c\u4e86\u5f8c\u306b\u3001Apache\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u8868\u793a\u3055\u305b\u3066\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u78ba\u8a8d\u3092\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# httpd -v\nServer version: Apache\/2.4.6 (CentOS)\nServer built:   Apr 20 2018 18:10:38<\/code><\/pre>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> \u30a2\u30d1\u30c3\u30c1\u304c\u8d77\u52d5\u3057\u3066\u3044\u308b\u304b\u3001OS\u518d\u8d77\u52d5\u5f8c\u3082\u81ea\u52d5\u8d77\u52d5\u306b\u306a\u3063\u3066\u308b\u304b\u306e\u78ba\u8a8d<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# systemctl is-enabled httpd\ndisabled<\/code><\/pre>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> \u30a2\u30d1\u30c3\u30c1\u3092OS\u518d\u8d77\u52d5\u5f8c\u3082\u81ea\u52d5\u3067\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# systemctl enable httpd.service\nCreated symlink from \/etc\/systemd\/system\/multi-user.target.wants\/httpd.service to \/usr\/lib\/systemd\/system\/httpd.service.<\/code><\/pre>\n\n\n\n<p>\u203b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306b\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u78ba\u8a8d\u3067\u304d\u306a\u3044\u5834\u5408\u306fCentOS7\u306efirewalld\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u304b\u3082\u266a<br><a href=\"\/blog\/programing\/1242\" target=\"_blank\" rel=\"noopener noreferrer\">CentOS7\u306efirewalld\u306bhttp\u3068https\u30b5\u30fc\u30d3\u30b9\u3092\u8a31\u53ef\uff08Apache\u3078\u306e\u5916\u90e8\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u3092\u8a31\u53ef\uff09\u3059\u308b<\/a><\/p>\n\n\n\n<h2 class=\"hh hh21 wp-block-heading\" id=\"i-3\"><span class=\"ez-toc-section\" id=\"MySQL57%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\"><\/span>MySQL5.7\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>MySQL\u958b\u767a\u5143\u306eOracle\u304c\u516c\u958b\u3057\u3066\u3044\u308byum\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u3092\u5229\u7528\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/p>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> \u65e2\u5b58\u306eMySQL\u3068\u304b\u306f\u5168\u90e8\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# yum remove mysql* <\/code><\/pre>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> \u307e\u305a\u306f\u3001\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u767b\u9332<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# rpm -ivh http:\/\/dev.mysql.com\/get\/mysql57-community-release-el7-7.noarch.rpm<\/code><\/pre>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u958b\u59cb<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# yum install -y mysql-community-server<\/code><\/pre>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3057\u3070\u3089\u304f\u6642\u9593\u306f\u304b\u304b\u308a\u307e\u3057\u305f\u304c\u3002\u7121\u4e8b\u5b8c\u4e86\u3067\u3054\u3056\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# mysql --version\nmysql  Ver 14.14 Distrib 5.7.22, for Linux (x86_64) using  EditLine wrapper<\/code><\/pre>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> MySQL\u8d77\u52d5\u3059\u308b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# systemctl start mysqld.service<\/code><\/pre>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> MySQL5.7\u306f\u3001\u521d\u671f\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u30ed\u30b0\u306b\u51fa\u529b\u3055\u308c\u308b\u3068\u306e\u3053\u3068\u306a\u306e\u3067\u3001mysqld.log\u306e\u4e2d\u3092grep\u3067\u691c\u7d22<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# grep password \/var\/log\/mysqld.log<\/code><\/pre>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> \u6b21\u306b\u3001mysql_secure_installation\u3092\u4f7f\u3063\u3066\u521d\u671f\u8a2d\u5b9a\u3092\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002\u5bfe\u8a71\u5f62\u5f0f\u3067\u308f\u304b\u308a\u3084\u3059\u306e\u3067\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# \/usr\/bin\/mysql_secure_installation\n\u4e0b\u8a18\u9806\u756a\u306b\u805e\u304b\u308c\u307e\u3059\u3002\u203b\u65b0\u3057\u3044\u30eb\u30fc\u30c8\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u3001\u5927\u6587\u5b57\u3001\u5c0f\u6587\u5b57\u3001\u6570\u5b57\u3001\u8a18\u53f7\u306e\u5168\u3066\u304c\u5165\u3063\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u6ce8\u610f\nEnter password for user root: \/\/\u3055\u3063\u304d\u30ed\u30b0\u306b\u5410\u304b\u308c\u3066\u3044\u305f\u521d\u671f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\nSet root password?\u3000\/\/\u30eb\u30fc\u30c8\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u5909\u66f4\u3059\u308b? Y\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a\nRemove anonymous users?\u3000\/\/\u8ab0\u3067\u3082\u30ed\u30b0\u30a4\u30f3\u51fa\u6765\u308b\u72b6\u614b\u3060\u3051\u3069\u6d88\u3059\uff1f Y\u3067\u6d88\u3057\u3068\u304f\nDisallow root login remotely?\u3000\/\/\u30ea\u30e2\u30fc\u30c8\u304b\u3089root\u30ed\u30b0\u30a4\u30f3\u3092\u8a31\u53ef\u3057\u307e\u305b\u3093\u304b\uff1f Y\u3067\u3057\u306a\u3044\nRemove test database and access to it?\u3000\/\/\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u6d88\u3059\u3088\uff1f Y\u3067\u6d88\u3059\nReload privilege tables now?\u3000\/\/\u8a2d\u5b9a\u3092\u3059\u3050\u306b\u53cd\u6620\u3059\u308b\u304b\uff1f Y\u3067\u53cd\u6620\nAll done!\n<\/code><\/pre>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> MySQL\u3078\u30ed\u30b0\u30a4\u30f3\u3059\u308b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# mysql -u root -p<\/code><\/pre>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> MySQL 5.7 \u304b\u3089\u30e6\u30fc\u30b6\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u6709\u52b9\u671f\u9650\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3067360\u65e5\u306b\u306a\u308a\u307e\u3057\u305f\u3002 360\u65e5\u3059\u308b\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5909\u66f4\u3092\u4fc3\u3055\u308c\u3066\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\u3002<br>\u306a\u3093\u3068\u3001MySQL5.7\u304b\u3089360\u65e5\u5f8c\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5909\u66f4\u3092\u4fc3\u3055\u308c\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u306a\u3063\u3066\u308b\u3089\u3057\u3044\u3002<br>\u305d\u3093\u306a\u3042\u308a\u304c\u305f\u8ff7\u60d1\u6a5f\u80fd\u3092OFF\u306b\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# vi \/etc\/my.cnf\n\/\/\u4e0b\u8a18\u3092\u8ffd\u52a0\uff08\u3064\u3044\u3067\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u3092UTF-8\u306b\u3057\u3066\u304a\u304f\uff09\ncharacter-set-server=utf8\ndefault_password_lifetime=0\n\n[root@adan ~]# systemctl restart mysqld.service <\/code><\/pre>\n\n\n\n<p>\u305d\u306e\u4ed6\u8af8\u3005\u3084\u3063\u3066\u304a\u3044\u305f\u307b\u3046\u304c\u3044\u3044\u8a2d\u5b9a\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u3068\u308a\u3042\u3048\u305a\u3053\u3093\u306a\u6240\u3067\u3002<\/p>\n\n\n\n<p>MySQL\u306e\u81ea\u52d5\u8d77\u52d5\u306e\u8a2d\u5b9a\u3082ON\u306b\u3057\u3066\u304a\u304f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# systemctl enable mysqld.service\n[root@adan ~]# systemctl is-enabled mysqld.service\nenabled<\/code><\/pre>\n\n\n\n<h2 class=\"hh hh21 wp-block-heading\" id=\"i-4\"><span class=\"ez-toc-section\" id=\"PHP73%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\"><\/span>PHP7.3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>11\u5e74\u3076\u308a\u306e\u30e1\u30b8\u30e3\u30fc\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3089\u3057\u304f\u3001\u306b\u308f\u304b\u306b\u76db\u308a\u4e0a\u304c\u3063\u3066\u3044\u307e\u3059\u306d\u3047\u3002php6\u306f\u958b\u767a\u9014\u4e2d\u3067\u30c0\u30e1\u306b\u306a\u3063\u305f\u3089\u3057\u3044\u3067\u3059\u3002<br>\u805e\u304f\u3068\u3053\u308d\u306b\u3088\u308b\u3068\u3001\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306eZend\u30a8\u30f3\u30b8\u30f3\u3092\u642d\u8f09\u3001PHP5.6\u306b\u6bd4\u3079\u30662\u500d\u4ee5\u4e0a\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u5411\u4e0a\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u524a\u6e1b\u3057\u3001<br>\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30fc\u30b9\u306b\u62bd\u8c61\u69cb\u6587\u6728\u3092\u63a1\u7528\u3001\u30b9\u30ab\u30e9\u30fc\u578b\u5ba3\u8a00\u3001\u623b\u308a\u5024\u306e\u578b\u5ba3\u8a00\u3001null\u5408\u4f53\u6f14\u7b97\u5b50\u306e\u8ffd\u52a0\u3001\u306a\u3069\u306a\u3069\u3001<br>\u5404\u7a2e\u306e\u6539\u826f\u3068\u65b0\u6a5f\u80fd\u3092\u642d\u8f09\u3057\u305f\u3089\u3057\u3044\u304c\u3001\u3088\u304f\u308f\u304b\u3089\u3093\u304c\u826f\u304f\u306a\u3063\u305f\u3089\u3057\u3044\u266a<\/p>\n\n\n\n<p>\u3064\u3065\u3044\u3066\u3001PHP\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# rpm -qa | grep php<\/code><\/pre>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# yum remove php-* <\/code><\/pre>\n\n\n\n<p>\u3067\u3001\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3057\u3088\u3046\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001libmcrypt\u3092\u5165\u308c\u3066\u304a\u304b\u306a\u3044\u3068\u3001php-mcrypt\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u306a\u3044\u306e\u3067\u3001\u524d\u3082\u3063\u3066\u5165\u308c\u3066\u304a\u304f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# yum --enablerepo=epel install libmcrypt <\/code><\/pre>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u305d\u306e\u524d\u306b\u3001PHP7.3\u304c\u4f7f\u3048\u308b\u304b\u78ba\u8a8d<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# yum info --enablerepo=remi,remi-php73 php\n\n\/\/\uff50\uff48\uff50\u30d1\u30b1\u30fc\u30b8\u4e00\u89a7\u3092\u78ba\u8a8d\u3057\u3066\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066\u3064\u3051\u308b\n[root@adan ~]# yum search --enablerepo=remi,remi-php73 php<\/code><\/pre>\n\n\n\n<p>\u4e0b\u8a18\u3001\u304a\u5f85\u3061\u304b\u306d\u306ePHP7.3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# yum -y install --enablerepo=epel,remi,remi-php73 php php-mbstring php-xml php-xmlrpc php-gd php-pdo php-pecl-mcrypt php-mysqlnd php-pecl-mysql php-intl\n\n\u30fb\u30fb\u30fb\u7701\u7565\u30fb\u30fb\u30fb\n\u30fb\u30fb\u30fb\u7701\u7565\u30fb\u30fb\u30fb\n\n\u5b8c\u4e86\u3057\u307e\u3057\u305f!<\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f\uff1a\u300c\u2013enablerepo=epel,remi\u300d\u3068\u3001epel\u3092\u5165\u308c\u3066\u3042\u3052\u306a\u3044\u3068\u3001\u30a8\u30e9\u30fc\u3067\u52e7\u3081\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u30a8\u30e9\u30fc: \u30d1\u30c3\u30b1\u30fc\u30b8: php-7.3.7-1.el7.remi.x86_64 (remi-php72)\n             \u8981\u6c42: libargon2.so.0()(64bit)<\/code><\/pre>\n\n\n\n<p>\u7121\u4e8b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u305f\u304b\u78ba\u8a8d<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# rpm -qa | grep php\nphp-mysqlnd-7.3.14-1.el7.remi.x86_64\nphp73-php-json-7.3.14-1.el7.remi.x86_64\nphp-pecl-mcrypt-1.0.3-1.el7.remi.7.3.x86_64\nphp-xmlrpc-7.3.14-1.el7.remi.x86_64\n\u30fb\u30fb\u30fb\n[root@adan ~]# php -v \nPHP 7.3.14 (cli) (built: Jan 21 2020 09:59:50) ( NTS )\nCopyright (c) 1997-2018 The PHP Group\nZend Engine v3.3.14, Copyright (c) 1998-2018 Zend Technologies<\/code><\/pre>\n\n\n\n<p>\u3088\u3063\u3057\u3083\uff01\u6210\u529f\u266a<\/p>\n\n\n\n<p>PHP7.3\u306ephp.ini\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u3066\u304a\u304f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[root@adan ~]# vi \/etc\/php.ini\ndate.timezone = \"Asia\/Tokyo\"\nmbstring.language = Japanese\nmbstring.internal_encoding = UTF-8\nmbstring.http_input = UTF-8\nmbstring.http_output = pass\nmbstring.encoding_translation = On\nmbstring.detect_order = auto\nmbstring.substitute_charset = none<\/code><\/pre>\n\n\n\n<p><i class=\"fa fa-hand-o-down\"><\/i> Apache\u306e\u518d\u8d77\u52d5\u3092\u304a\u5fd8\u308c\u306a\u304f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># systemctl restart httpd.service<\/code><\/pre>\n<hr><div class='adan_banner'>\n<a href='\/contact'><img src='\/blog\/wp-content\/uploads\/2019\/02\/bosyu_banner.jpeg'><\/a>\n<\/div>  <div class=\"sng-box box26\"><div class=\"box-title\">\u30d7\u30ed\u306b\u805e\u3044\u3066\u307f\u308b<\/div><div class=\"box-content\">\u682a\u5f0f\u4f1a\u793eadan\u306f\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30ad\u30e3\u30ea\u30a2\u306b\u771f\u5263\u306b\u5411\u304d\u5408\u3063\u3066\u3044\u307e\u3059\u3002<br>\n<strong class='keiko_blue'>\u4f01\u696d\u306e\u60c5\u5831<\/strong>\u3084<strong class='keiko_blue'>\u30a8\u30f3\u30b8\u30cb\u30a2\u3068\u3057\u3066\u306e\u30ad\u30e3\u30ea\u30a2\u30a2\u30c3\u30d7<\/strong>\u306e\u65b9\u6cd5\u3001<strong class='keiko_blue'>\u73fe\u5728\u306e\u5f85\u9047\uff08\u7d66\u6599\u30fb\u5831\u916c\uff09<\/strong>\u3001<strong class='keiko_blue'>\u672a\u7d4c\u9a13\u304b\u3089\u306e\u30b9\u30c6\u30c3\u30d7\u30a2\u30c3\u30d7\u65b9\u6cd5<\/strong>\u306a\u3069\u306e\u3054\u76f8\u8ac7\u3092\u53d7\u3051\u4ed8\u3051\u3066\u3044\u307e\u3059\u3002<br>\n\u304a\u6c17\u8efd\u306b\u304a\u554f\u5408\u305b\u304f\u3060\u3055\u3044\u3002<div class=\"center\"><p>  <a href=\"\/contact\" class=\"btn raised accent-bc strong\">\u304a\u554f\u5408\u305b\u306f\u3053\u3061\u3089<\/a><\/p><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>2020\u5e74\u306e2\u6708\u6642\u70b9\u3067\u306e\u6700\u65b0\u306ePHP\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u3055\u304f\u3089\u30af\u30e9\u30a6\u30c9\u3067\u306eCPU2\u30b3\u30a2\u3001\u30e1\u30e2\u30ea4GB\u3067\u306e\u4f5c\u6210\u3067\u3059\u3002 \u3053\u308c\u304b\u3089\u3001PHP7.3\u3068MySQL5.7\u3068Apache2.4\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u666e\u6bb5\u306f &#8230; <\/p>\n","protected":false},"author":2,"featured_media":1778,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[56],"class_list":{"0":"post-1235","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-programing","8":"tag-linux"},"_links":{"self":[{"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/posts\/1235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/comments?post=1235"}],"version-history":[{"count":35,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/posts\/1235\/revisions"}],"predecessor-version":[{"id":2646,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/posts\/1235\/revisions\/2646"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/media\/1778"}],"wp:attachment":[{"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/media?parent=1235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/categories?post=1235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/tags?post=1235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}