{"id":2305,"date":"2021-12-19T20:24:45","date_gmt":"2021-12-19T11:24:45","guid":{"rendered":"https:\/\/dennie.tokyo\/it\/?p=2305"},"modified":"2022-03-13T12:13:34","modified_gmt":"2022-03-13T03:13:34","slug":"amazon-linux2-%e3%81%a7-php8-%e3%82%92%e5%8b%95%e3%81%8b%e3%81%99","status":"publish","type":"post","link":"https:\/\/dennie.tokyo\/it\/?p=2305","title":{"rendered":"\u3010Amazon linux\u3011 PHP8 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"\n<p>\u4eca\u56de\u306fAmazon linux2 \u3067 PHP8 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>\u4eca\u56de\u306e\u74b0\u5883\u306f\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002 Amazon Linux2 docker \u30b3\u30f3\u30c6\u30ca\u306b\u3066 Apache2.4 \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"title_box\"><span class=\"box-title\">\u53c2\u8003<\/span>\n<p><a href=\"https:\/\/dennie.tokyo\/it\/?p=2279\" rel=\"noopener\" target=\"_blank\">\u3010docker\u3011Amazon Linux2 apache \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/p>\n<\/div>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8b\u524d\u6e96\u5099<\/h1>\n\n\n\n<p>\u304a\u6c7a\u307e\u308a\u3067\u3059\u304c\u3001\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u6700\u65b0\u5316\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>yum -y update<\/code><\/pre><\/div>\n\n\n\n<h1 class=\"wp-block-heading\">PHP8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n\n\n\n<p>amazon-linux-extras\u304b\u3089PHP8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">amazon-linux-extras\u306e\u5b58\u5728\u78ba\u8a8d<\/h2>\n\n\n\n<p>amazon-linux-extras\u304c\u5b58\u5728\u3059\u308b\u4e8b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>which amazon-linux-extras<\/code><\/pre><\/div>\n\n\n\n<p>amazon-linux-extras\u306e\u7c21\u5358\u306a\u64cd\u4f5c\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u3067\u3082\u884c\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u53c2\u8003\u306b\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"title_box\"><span class=\"box-title\">\u53c2\u8003<\/span>\n<p><a href=\"https:\/\/dennie.tokyo\/it\/?p=2301\" rel=\"noopener\" target=\"_blank\">amazon-linux-extras \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u7c21\u5358\u306b\u89e6\u3063\u3066\u307f\u305f<\/a><\/p>\n<\/div>\n\n\n\n<p>\u305d\u3082\u305d\u3082 which\u30b3\u30de\u30f3\u30c9\u304c\u306a\u3044\u5834\u5408\u3001which\u30b3\u30de\u30f3\u30c9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>yum install which<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">amazon-linux-extras\u306e\u6700\u65b0\u5316<\/h2>\n\n\n\n<p>amazon-linux-extras\u3092\u6700\u65b0\u5316\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>yum update -y amazon-linux-extras<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">PHP8\u4ee5\u5916\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u306a\u3044\u4e8b\u306e\u78ba\u8a8d<\/h2>\n\n\n\n<p>\u65e2\u306bPHP8\u4ee5\u5916\u306ePHP\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u306a\u3044\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<br>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3001PHP\u95a2\u9023\u304c\u5168\u3066 available \u72b6\u614b\u306b\u306a\u3063\u3066\u3044\u308c\u3070OK\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30fb\u30b3\u30de\u30f3\u30c9<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>amazon-linux-extras<\/code><\/pre><\/div>\n\n\n\n<p>\u30fb\u7d50\u679c<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>  0  ansible2                 available    \\\n        [ =2.4.2  =2.4.6  =2.8  =stable ]\n  2  httpd_modules            available    [ =1.0  =stable ]\n  3  memcached1.5             available    \\\n        [ =1.5.1  =1.5.16  =1.5.17 ]\n  5  postgresql9.6            available    \\\n        [ =9.6.6  =9.6.8  =stable ]\n  6  postgresql10             available    [ =10  =stable ]\n  9  R3.4                     available    [ =3.4.3  =stable ]\n 10  rust1                    available    \\\n        [ =1.22.1  =1.26.0  =1.26.1  =1.27.2  =1.31.0  =1.38.0\n          =stable ]\n 11  vim                      available    [ =8.0  =stable ]\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          =7.2.16  =7.2.17  =7.2.19  =7.2.21  =7.2.22  =7.2.23\n          =7.2.24  =7.2.26  =stable ]\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  =10.2.10_7.2.16  =10.2.10_7.2.17\n          =10.2.10_7.2.19  =10.2.10_7.2.22  =10.2.10_7.2.23\n          =10.2.10_7.2.24  =stable ]\n 18  libreoffice              available    \\\n        [ =5.0.6.2_15  =5.3.6.1  =stable ]\n 19  gimp                     available    [ =2.8.22 ]\n 20  docker                   available    \\\n        [ =17.12.1  =18.03.1  =18.06.1  =18.09.9  =stable ]\n 21  mate-desktop1.x          available    \\\n        [ =1.19.0  =1.20.0  =stable ]\n 22  GraphicsMagick1.3        available    \\\n        [ =1.3.29  =1.3.32  =1.3.34  =stable ]\n 23  tomcat8.5                available    \\\n        [ =8.5.31  =8.5.32  =8.5.38  =8.5.40  =8.5.42  =8.5.50\n          =stable ]\n 24  epel                     available    [ =7.11  =stable ]\n 25  testing                  available    [ =1.0  =stable ]\n 26  ecs                      available    [ =stable ]\n 27  corretto8                available    \\\n        [ =1.8.0_192  =1.8.0_202  =1.8.0_212  =1.8.0_222  =1.8.0_232\n          =1.8.0_242  =stable ]\n 28  firecracker              available    [ =0.11  =stable ]\n 29  golang1.11               available    \\\n        [ =1.11.3  =1.11.11  =1.11.13  =stable ]\n 30  squid4                   available    [ =4  =stable ]\n 31  php7.3                   available    \\\n        [ =7.3.2  =7.3.3  =7.3.4  =7.3.6  =7.3.8  =7.3.9  =7.3.10\n          =7.3.11  =7.3.13  =stable ]\n 32  lustre2.10               available    \\\n        [ =2.10.5  =2.10.8  =stable ]\n 33  java-openjdk11           available    [ =11  =stable ]\n 34  lynis                    available    [ =stable ]\n 35  kernel-ng                available    [ =stable ]\n 36  BCC                      available    [ =0.x  =stable ]\n 37  mono                     available    [ =5.x  =stable ]\n 38  nginx1                   available    [ =stable ]\n 39  ruby2.6                  available    [ =2.6  =stable ]\n 40  mock                     available    [ =stable ]\n 41  postgresql11             available    [ =11  =stable ]\n 42  php7.4                   available    [ =stable ]\n 43  livepatch                available    [ =stable ]\n 44  python3.8                available    [ =stable ]\n 45  haproxy2                 available    [ =stable ]\n 46  collectd                 available    [ =stable ]\n 47  aws-nitro-enclaves-cli   available    [ =stable ]\n 48  R4                       available    [ =stable ]\n 49  kernel-5.4               available    [ =stable ]\n 50  selinux-ng               available    [ =stable ]\n 51  php8.0                   available    [ =stable ]\n 52  tomcat9                  available    [ =stable ]\n 53  unbound1.13              available    [ =stable ]\n 54  mariadb10.5              available    [ =stable ]\n 55  kernel-5.10              available    [ =stable ]\n 56  redis6                   available    [ =stable ]\n 57  ruby3.0                  available    [ =stable ]\n 58  postgresql12             available    [ =stable ]\n 59  postgresql13             available    [ =stable ]\n 60  mock2                    available    [ =stable ]\n 61  dnsmasq2.85              available    [ =stable ]<\/code><\/pre><\/div>\n\n\n\n<p>PHP8\u4ee5\u5916\u306ePHP\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u5834\u5408\u3001\u7121\u52b9\u5316\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u7121\u52b9\u5316\u3059\u308b\u30b3\u30de\u30f3\u30c9\u306e\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>amazon-linux-extras disable php7.2<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">PHP8\u306e\u6709\u52b9\u5316<\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067PHP8\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30fb\u30b3\u30de\u30f3\u30c9<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>amazon-linux-extras enable php8.0<\/code><\/pre><\/div>\n\n\n\n<p>\u30fb\u7d50\u679c\u4e00\u90e8\u629c\u7c8b<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code> 50  selinux-ng               available    [ =stable ]\n 51  php8.0=latest            enabled      [ =stable ]\n 52  tomcat9                  available    [ =stable ]\n 53  unbound1.13              available    [ =stable ]\n 54  mariadb10.5              available    [ =stable ]\n 55  kernel-5.10              available    [ =stable ]\n 56  redis6                   available    [ =stable ]\n 57  ruby3.0                  available    [ =stable ]\n 58  postgresql12             available    [ =stable ]\n 59  postgresql13             available    [ =stable ]\n 60  mock2                    available    [ =stable ]\n 61  dnsmasq2.85              available    [ =stable ]\n\nNow you can install:\n # yum clean metadata\n # yum install php-cli php-pdo php-fpm php-mysqlnd\n<\/code><\/pre><\/div>\n\n\n\n<p>PHP8.0\u304cenabled\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u4ee5\u4e0b\u3092\u5b9f\u884c\u3057\u3066\u304f\u308c\u3068\u8a00\u308f\u308c\u308b\u306e\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30fb\u30b3\u30de\u30f3\u30c9<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>yum install -y php-cli php-pdo php-fpm php-mysqlnd<\/code><\/pre><\/div>\n\n\n\n<h1 class=\"wp-block-heading\">\u6700\u5f8c\u306b<\/h1>\n\n\n\n<p>\u6b21\u56de\u306fApache\u3067PHP\u3092\u5b9f\u884c\u3059\u308b\u70ba\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"title_box\"><span class=\"box-title\">\u6b21\u56de<\/span>\n<p><a href=\"https:\/\/dennie.tokyo\/it\/?p=2511\" target=\"_blank\" rel=\"noopener\">Apache PHP\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3064\u3044\u3066<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306fAmazon linux2 \u3067 PHP8 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":957,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,4],"tags":[],"class_list":["post-2305","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-amazon-linux","category-php"],"_links":{"self":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/2305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2305"}],"version-history":[{"count":29,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/2305\/revisions"}],"predecessor-version":[{"id":3136,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/2305\/revisions\/3136"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/media\/957"}],"wp:attachment":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}