{"id":15994,"date":"2019-03-07T15:22:33","date_gmt":"2019-03-07T06:22:33","guid":{"rendered":"http:\/\/www.skyarch.net\/blog\/?p=15994"},"modified":"2019-03-07T15:22:33","modified_gmt":"2019-03-07T06:22:33","slug":"amazonlinux2%e3%82%92%e8%a7%a6%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f","status":"publish","type":"post","link":"https:\/\/www.skyarch.net\/blog\/amazonlinux2%e3%82%92%e8%a7%a6%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f\/","title":{"rendered":"AmazonLinux2\u3092\u89e6\u3063\u3066\u307f\u305f"},"content":{"rendered":"<h2>\u306f\u3058\u3081\u306b<\/h2>\n<p>\u4eca\u66f4\u306a\u304c\u3089\u306bAmazonLinux2\u3067\u74b0\u5883\u69cb\u7bc9\u3092\u3057\u3066\u307f\u305f\u306e\u3067\u7c21\u5358\u306b\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eca\u307e\u3067\u306fRH7\u3068\u304bAmazomLinux\u306e\u6848\u4ef6\u304c\u591a\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u308c\u304b\u3089AmazonLinux2\u3082\u5897\u3048\u3066\u3044\u304f\u306e\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001LAMP\u306e\u69cb\u7bc9\u307e\u3067\u30b3\u30de\u30f3\u30c9\u30d9\u30fc\u30b9\u3067\u66f8\u3044\u3066\u3044\u3053\u3046\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u5165\u308c\u308bM\/W<\/p>\n<ul>\n<li>Apache2.4\u7cfb\u30fbPHP7.3\u7cfb<\/li>\n<li>MySQL5.7\u7cfb<\/li>\n<li>Postfix3\u7cfb<\/li>\n<\/ul>\n<h2>\u76ee\u6b21<\/h2>\n<ul>\n<li><a href=\"#overview\">\u6982\u8981<\/a><\/li>\n<li><a href=\"#env\">\u74b0\u5883<\/a><\/li>\n<li><a href=\"#install1\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5<\/a><\/li>\n<li><a href=\"#setting1\">Apache<\/a><\/li>\n<li><a href=\"#setting2\">PHP<\/a><\/li>\n<li><a href=\"#setting3\">MySQL<\/a><\/li>\n<li><a href=\"#setting4\">Postfix<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#conclusion\">\u7d50\u8ad6<\/a><\/p>\n<\/li>\n<\/ul>\n<h2 id=\"overview\">\u6982\u8981<\/h2>\n<p>AmazonLinux2\u3067LAMP\u74b0\u5883\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<h2 id=\"env\">\u5b9f\u884c\u74b0\u5883<\/h2>\n<p>AmazonLinux2<\/p>\n<h2 id=\"install1\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5<\/h2>\n<p>\u30bd\u30fc\u30b9\u306f\u9762\u5012\u304f\u3055\u3044\u306e\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u5165\u308c\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3 id=\"setting1\">Apache<\/h3>\n<p>\u307e\u305a\u306fApache\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\u30b3\u30de\u30f3\u30c9\u4e00\u767a\u3067\u5165\u308a\u307e\u3057\u305f\u3002\u512a\u3057\u3044\u3067\u3059\u306d\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nyum install httpd\n<\/pre>\n<pre>======================================================================================================================================================================\n Package                                      Arch                            Version                                       Repository                           Size\n======================================================================================================================================================================\nInstalling:\n httpd                                        x86_64                          2.4.37-1.amzn2.0.1                            amzn2-core                          1.3 M\nInstalling for dependencies:\n apr                                          x86_64                          1.6.3-5.amzn2.0.2                             amzn2-core                          118 k\n apr-util                                     x86_64                          1.6.1-5.amzn2.0.2                             amzn2-core                           99 k\n apr-util-bdb                                 x86_64                          1.6.1-5.amzn2.0.2                             amzn2-core                           19 k\n generic-logos-httpd                          noarch                          18.0.0-4.amzn2                                amzn2-core                           19 k\n httpd-filesystem                             noarch                          2.4.37-1.amzn2.0.1                            amzn2-core                           23 k\n httpd-tools                                  x86_64                          2.4.37-1.amzn2.0.1                            amzn2-core                           87 k\n mailcap                                      noarch                          2.1.41-2.amzn2                                amzn2-core                           31 k\n mod_http2                                    x86_64                          1.11.1-1.amzn2                                amzn2-core                          150 k\n\nTransaction Summary\n======================================================================================================================================================================\nInstall  1 Package (+8 Dependent packages)\n<\/pre>\n<h3 id=\"setting2\">PHP<\/h3>\n<p>PHP\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u304c\u30017.3\u7cfb\u306fAmazon\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u306f\u5165\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br \/>\nextra\u3067\u5165\u308b\u30ea\u30dd\u30b8\u30c8\u30ea\uff08\u57f7\u7b46\u5f53\u6642\uff09\u3092\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\namazon-linux-extras\n<\/pre>\n<pre>  0  ansible2                 available    [ =2.4.2  =2.4.6 ]\n  2  httpd_modules            available    [ =1.0 ]\n  3  memcached1.5             available    [ =1.5.1 ]\n  4  nginx1.12                available    [ =1.12.2 ]\n  5  postgresql9.6            available    [ =9.6.6  =9.6.8 ]\n  6  postgresql10             available    [ =10 ]\n  8  redis4.0                 available    [ =4.0.5  =4.0.10 ]\n  9  R3.4                     available    [ =3.4.3 ]\n 10  rust1                    available    \\\n        [ =1.22.1  =1.26.0  =1.26.1  =1.27.2  =1.31.0 ]\n 11  vim                      available    [ =8.0 ]\n 13  ruby2.4                  available    [ =2.4.2  =2.4.4 ]\n 15  php7.2                   available    \\\n        [ =7.2.0  =7.2.4  =7.2.5  =7.2.8  =7.2.11  =7.2.13  =7.2.14 ]\n 16  php7.1                   available    [ =7.1.22  =7.1.25 ]\n 17  lamp-mariadb10.2-php7.2  available    \\\n        [ =10.2.10_7.2.0  =10.2.10_7.2.4  =10.2.10_7.2.5\n          =10.2.10_7.2.8  =10.2.10_7.2.11  =10.2.10_7.2.13\n          =10.2.10_7.2.14 ]\n 18  libreoffice              available    [ =5.0.6.2_15  =5.3.6.1 ]\n 19  gimp                     available    [ =2.8.22 ]\n 20  docker=latest            enabled      \\\n        [ =17.12.1  =18.03.1  =18.06.1 ]\n 21  mate-desktop1.x          available    [ =1.19.0  =1.20.0 ]\n 22  GraphicsMagick1.3        available    [ =1.3.29 ]\n 23  tomcat8.5                available    [ =8.5.31  =8.5.32 ]\n 24  epel                     available    [ =7.11 ]\n 25  testing                  available    [ =1.0 ]\n 26  ecs                      available    [ =stable ]\n 27  corretto8                available    [ =1.8.0_192  =1.8.0_202 ]\n 28  firecracker              available    [ =0.11 ]\n 29  golang1.11               available    [ =1.11.3 ]\n 30  squid4                   available    [ =4 ]\n<\/pre>\n<p>\u4ed5\u65b9\u304c\u306a\u3044\u306e\u3067\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u5165\u308c\u3066\u3044\u304d\u307e\u3059\u3002\u4eca\u56de\u306fremi\u3092\u4f7f\u3044\u307e\u3059\u3002<br \/>\nepel\u304c\u306a\u3044\u3068remi\u304c\u5165\u3089\u306a\u3044\u306e\u3067\u3001\u307e\u305a\u306fepel\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<br \/>\n\u4e0a\u306b\u66f8\u3044\u3066\u3042\u308b\u901a\u308a\u3001extra\u3067epel\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u305a\u3044\u3076\u3093\u3068\u4fbf\u5229\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\nremi\u306f\u6b8b\u5ff5\u306a\u304c\u3089URL\u6307\u5b9a\u3057\u3066\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\namazon-linux-extras enable epel\nyum install epel-release\n\nyum install http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-7.rpm\nyum install php73 --enablerepo=remi\n<\/pre>\n<pre>Dependencies Resolved\n\n======================================================================================================================================================================\n Package                                       Arch                          Version                                          Repository                         Size\n======================================================================================================================================================================\nInstalling:\n php73                                         x86_64                        2.0-1.el7.remi                                   remi                              2.3 k\nInstalling for dependencies:\n audit-libs-python                             x86_64                        2.8.1-3.amzn2.1                                  amzn2-core                         79 k\n checkpolicy                                   x86_64                        2.5-6.amzn2                                      amzn2-core                        294 k\n environment-modules                           x86_64                        3.2.10-10.amzn2.0.2                              amzn2-core                        107 k\n libX11                                        x86_64                        1.6.5-1.amzn2.0.2                                amzn2-core                        614 k\n libX11-common                                 noarch                        1.6.5-1.amzn2.0.2                                amzn2-core                        164 k\n libXau                                        x86_64                        1.0.8-2.1.amzn2.0.2                              amzn2-core                         29 k\n libargon2                                     x86_64                        20161029-2.el7                                   epel                               23 k\n libcgroup                                     x86_64                        0.41-15.amzn2                                    amzn2-core                         65 k\n libselinux-python                             x86_64                        2.5-12.amzn2.0.2                                 amzn2-core                        237 k\n libsemanage-python                            x86_64                        2.5-11.amzn2                                     amzn2-core                        115 k\n libxcb                                        x86_64                        1.12-1.amzn2.0.2                                 amzn2-core                        216 k\n ncurses-compat-libs                           x86_64                        6.0-8.20170212.amzn2.1.2                         amzn2-core                        314 k\n php73-php-cli                                 x86_64                        7.3.3-1.el7.remi                                 remi                              3.3 M\n php73-php-common                              x86_64                        7.3.3-1.el7.remi                                 remi                              634 k\n php73-php-json                                x86_64                        7.3.3-1.el7.remi                                 remi                               66 k\n php73-runtime                                 x86_64                        2.0-1.el7.remi                                   remi                              1.1 M\n policycoreutils-python                        x86_64                        2.5-22.amzn2                                     amzn2-core                        454 k\n python-IPy                                    noarch                        0.75-6.amzn2.0.1                                 amzn2-core                         32 k\n setools-libs                                  x86_64                        3.3.8-2.amzn2.0.2                                amzn2-core                        618 k\n tcl                                           x86_64                        1:8.5.13-8.amzn2.0.2                             amzn2-core                        1.9 M\n\nTransaction Summary\n======================================================================================================================================================================\nInstall  1 Package (+20 Dependent packages)\n<\/pre>\n<h3 id=\"setting3\">MySQL<\/h3>\n<p>MySQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\nMySQL8\u7cfb\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306b5.7\u7cfb\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n\u3053\u3053\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3059\u304c\u3001\u305d\u306e\u307e\u307e\u3060\u30688\u7cfb\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3001<br \/>\n8\u7cfb\u306e\u7121\u52b9\u5316\u30685.7\u7cfb\u306e\u6709\u52b9\u5316\u3092\u884c\u3063\u3066\u304b\u3089\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nyum install https:\/\/dev.mysql.com\/get\/mysql80-community-release-el7-1.noarch.rpm\nyum-config-manager --disable mysql80-community\nyum-config-manager --enable mysql57-community\nyum install mysql-community-server\n<\/pre>\n<pre>Dependencies Resolved\n\n======================================================================================================================================================================\n Package                                            Arch                          Version                              Repository                                Size\n======================================================================================================================================================================\nInstalling:\n mysql-community-libs                               x86_64                        5.7.25-1.el7                         mysql57-community                        2.2 M\n     replacing  mariadb-libs.x86_64 1:5.5.60-1.amzn2\n mysql-community-libs-compat                        x86_64                        5.7.25-1.el7                         mysql57-community                        2.0 M\n     replacing  mariadb-libs.x86_64 1:5.5.60-1.amzn2\n mysql-community-server                             x86_64                        5.7.25-1.el7                         mysql57-community                        165 M\nInstalling for dependencies:\n mysql-community-client                             x86_64                        5.7.25-1.el7                         mysql57-community                         24 M\n mysql-community-common                             x86_64                        5.7.25-1.el7                         mysql57-community                        274 k\n\nTransaction Summary\n======================================================================================================================================================================\nInstall  3 Packages (+2 Dependent packages)\n<\/pre>\n<h3 id=\"setting4\">Postfix<\/h3>\n<p>Postfix\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrpm -qa|grep postfix\n<\/pre>\n<pre>postfix-2.10.1-6.amzn2.0.3.x86_64\n<\/pre>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f2\u7cfb\u304c\u5165\u3063\u3066\u3044\u307e\u3057\u305f\u306e\u3067\u5165\u308c\u66ff\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u30ea\u30dd\u30b8\u30c8\u30ea\u306fgf-plus\u3092\u5229\u7528\u3002<br \/>\n\u3064\u3044\u3067\u306b\u30e1\u30fc\u30eb\u30b3\u30de\u30f3\u30c9\u3082\u5165\u308c\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nyum remove postfix.x86_64\nyum install http:\/\/mirror.ghettoforge.org\/distributions\/gf\/el\/7\/gf\/x86_64\/gf-release-7-10.gf.el7.noarch.rpm\n\u2191&#x5B;gf-plus]\u306eenabled=1\u306b\u5909\u66f4\n\nyum install postfix3\nyum install mailx\n<\/pre>\n<pre>Dependencies Resolved\n\n======================================================================================================================================================================\n Package                               Arch                                Version                                         Repository                            Size\n======================================================================================================================================================================\nInstalling:\n postfix3                              x86_64                              2:3.3.3-1.gf.el7                                gf-plus                              3.0 M\n\nTransaction Summary\n======================================================================================================================================================================\nInstall  1 Package\n<\/pre>\n<h3 id=\"conclusion\">\u307e\u3068\u3081<\/h3>\n<p>\u3084\u3063\u3066\u307f\u308b\u3068\u6848\u5916\u697d\u306b\u69cb\u7bc9\u3067\u304d\u307e\u3057\u305f\u3002Cent7\u7cfb\u306e\u30b3\u30de\u30f3\u30c9\u3084\u6982\u5ff5\u306b\u6163\u308c\u3066\u3044\u308c\u3070\u904b\u7528\u3082\u697d\u306b\u306a\u308b\u3068\u306f\u601d\u3044\u307e\u3059\u3002<br \/>\n\u3042\u3068\u306f\u5404MW\u306eEOL\u304c\u3069\u3053\u307e\u3067\u4f38\u3073\u308b\u304b\u3067\u3059\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u4eca\u66f4\u306a\u304c\u3089\u306bAmazonLinux2\u3067\u74b0\u5883\u69cb\u7bc9\u3092\u3057\u3066\u307f\u305f\u306e\u3067\u7c21\u5358\u306b\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002 \u4eca\u307e\u3067\u306fRH7\u3068\u304bAmazomLinux\u306e\u6848\u4ef6\u304c\u591a\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u308c\u304b\u3089AmazonLinux2\u3082\u5897\u3048\u3066\u3044\u304f\u306e\u304b\u3068\u601d\u3044\u307e\u3059&#8230;<\/p>\n","protected":false},"author":48,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"15994","footnotes":""},"categories":[326,20,29],"tags":[],"class_list":{"0":"post-15994","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-amazonlinux","7":"category-aws","8":"category-linux","9":"ja"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/15994","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/users\/48"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/comments?post=15994"}],"version-history":[{"count":12,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/15994\/revisions"}],"predecessor-version":[{"id":16007,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/15994\/revisions\/16007"}],"wp:attachment":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media?parent=15994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/categories?post=15994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/tags?post=15994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}