{"id":3015,"date":"2022-08-09T11:39:32","date_gmt":"2022-08-09T02:39:32","guid":{"rendered":"https:\/\/www.choco.org.uk\/chocodb\/?p=3015"},"modified":"2022-08-09T11:39:32","modified_gmt":"2022-08-09T02:39:32","slug":"rokeylinux8%e3%81%a7php7-4%e3%80%81mariadb10%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.choco.org.uk\/chocodb\/?p=3015","title":{"rendered":"RokeyLinux8\u3067PHP7.4\u3001MariaDB10\u3092\u4f7f\u3063\u3066\u307f\u308b\u3002"},"content":{"rendered":"<p>\u4e00\u901a\u308a\u691c\u8a3c\u304c\u6e08\u3093\u3060\u306e\u3067\u3001\u6295\u7a3f\u3057\u307e\u3059\u3002<br \/>\n\u3053\u306e\u65b9\u6cd5\u3067PHP8.1\u307e\u3067\u306f\u81ea\u7531\u306b\u5165\u308c\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>SELinux\u304c\u4e0d\u53ef\u306b\u306a\u3063\u3066\u3044\u308b\u4e8b\u3092\u78ba\u8a8d<br \/>\n\u203b\u6709\u52b9\u3060\u3063\u305f\u3089\u3001\u7121\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5168\u3066\u306e\u8a2d\u5b9a\u304c\u7d42\u308f\u3063\u3066\u304b\u3089\u6709\u52b9\u306b\u3059\u308b\u306e\u3092\u304a\u52e7\u3081\u81f4\u3057\u307e\u3059\u3002<br \/>\n\u305f\u3060\u3057\u3001SELinux\u306b\u9650\u3063\u3066\u306f\u8a73\u3057\u3044\u4eba\u4ee5\u5916\u306f\u7121\u52b9\u306e\u307e\u307e\u304c\u5b9c\u3057\u3044\u304b\u3068\u3002<br \/>\n\uff1egetenforce<\/p>\n<p>\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u304c\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u4e8b\u3092\u78ba\u8a8d<br \/>\n\u203b\u6709\u52b9\u3060\u3063\u305f\u3089\u3001\u7121\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5168\u3066\u306e\u8a2d\u5b9a\u304c\u7d42\u308f\u3063\u3066\u304b\u3089\u6709\u52b9\u306b\u3059\u308b\u306e\u3092\u304a\u52e7\u3081\u81f4\u3057\u307e\u3059\u3002<br \/>\n\uff1esystemctl status firewalld<\/p>\n<p>\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u3092\u5165\u308c\u307e\u3059\u3002<br \/>\n\uff1ednf install epel-release yum-utils<\/p>\n<p>remi\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\n\uff1ednf install https:\/\/rpms.remirepo.net\/enterprise\/remi-release-8.rpm<\/p>\n<p>\u66f4\u65b0\u3057\u3066\u304a\u304f<br \/>\n\uff1ednf update<\/p>\n<p>\u30b5\u30fc\u30d0\u30fc\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002<br \/>\n\uff1ereboot<\/p>\n<p>PHP\u306e\u72b6\u6cc1\u3092\u78ba\u8a8d\u3059\u308b\u3002<br \/>\n\uff1ednf module list php<\/p>\n<p>\u6709\u52b9\u306b\u3057\u305f\u3044\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u6709\u52b9\u306b\u3059\u308b\u3002<br \/>\n\u4eca\u56de\u306f7.4\u3057\u305f\u304b\u3063\u305f\u306e\u3067\u30018\u306b\u3057\u305f\u3044\u4eba\u306f8.0\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\uff1ednf module enable php:remi-7.4 -y<\/p>\n<p>\u3053\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3001\u300cAppstream\u300d\u306f7.2[d]\u3060\u304c\u3001\u300cremi\u300d\u306f7.4[e]\u3068\u306a\u3063\u3066\u3044\u308b\u3002<br \/>\n\u3053\u308c\u3067\uff2f\uff2b\u3089\u3057\u3044\u3067\u3059\u3002<\/p>\n<p>Apache\u3068PHP\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n\u3053\u3053\u3067\u4eca\u56de\u5fc5\u8981\u306a\u5168\u3066\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5165\u308c\u3066\u3057\u307e\u3046\u3002<br \/>\n\uff1ednf install httpd php php-xml php-mbstring php-zlib php-gd php-zip php-pdo_mysql php-opcache php-common php-devel php-json php-ldap php-imap php-intl php-xmlpc php-soap<\/p>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3059\u308b\u3002<br \/>\n\uff1ewhich php<br \/>\n\uff1ephp -v<\/p>\n<p>PHP\u306e\u8a2d\u5b9a\uff08php.ini\uff09<br \/>\n\uff1evi \/etc\/php.ini<br \/>\nexpose_php = Off<br \/>\ndefault_charset = &#8220;UTF-8&#8221;<br \/>\ndate.timezone = &#8220;Asia\/Tokyo&#8221;<br \/>\nmbstring.language = Japanese<br \/>\nmbstring.internal_encoding = UTF-8<br \/>\nmbstring.http_input = UTF-8<br \/>\nmbstring.http_output = pass<br \/>\nmbstring.encoding_translation = On<br \/>\nmbstring.detect_order = auto<br \/>\nmbstring.substitute_character = none<br \/>\nmax_input_vars = 5000<\/p>\n<p>MariaDB\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n\uff1ednf install mariadb-server<\/p>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d<br \/>\n\uff1erpm -qa | grep mariadb<\/p>\n<p>Mariadb\u306e\u8d77\u52d5<br \/>\n\uff1esystemctl enable mariadb<br \/>\n\uff1esystemctl start mariadb<\/p>\n<p>MariaDB\u306e\u521d\u671f\u5316<br \/>\n\uff1emysql_secure_installation<\/p>\n<p>ROOT\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a\u4ee5\u5916\u306f\u3001\u5168\u3066\u30a8\u30f3\u30bf\u30fc<br \/>\nroot\u30d1\u30b9\u30ef\u30fc\u30c9\uff1a12345678\uff08\u2190\u4efb\u610f\u306e\u6587\u5b57\u5217\u3092\u5165\u308c\u3066\u304f\u3060\u3055\u3044\u3002\uff09<\/p>\n<p>MariaDB\u306e\u30e6\u30fc\u30b6\u30fc\u3068DB\u4f5c\u6210<br \/>\n\u21d2DB\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d\u306b\u4f5c\u6210\u53ef\u80fd\u306a\u306e\u3067\u3001\u3053\u3053\u3067\u306fROOT\u306e\u63a5\u7d9a\u78ba\u8a8d\u306e\u307f\u3002<br \/>\n\uff1emysql -u root -p<\/p>\n<p>Apache\u306e\u6c38\u7d9a\u7684\u306a\u8d77\u52d5\u3092\u8a2d\u5b9a<br \/>\n\uff1esystemctl enable httpd.service<\/p>\n<p>Apache\u3092\u8d77\u52d5<br \/>\n\uff1esystemctl start httpd.service<\/p>\n<p>\u3053\u308c\u3067\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u3060\u3068\/var\/www\/html\uff09\u306b\u4f55\u304b\u3092\u7f6e\u3044\u3066\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u5c1a\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5165\u308c\u308b\u306e\u306f\u30c9\u30e1\u30a4\u30f3\u53d6\u5f97\u3001SSL\u8a2d\u5b9a\u5b8c\u4e86\u5f8c\u306b\u3084\u3063\u305f\u65b9\u304c\u624b\u9593\u304c\u5c11\u306a\u3044\u3067\u3059\u3002<br \/>\n\u203b\u79c1\u306f\u3053\u308c\u3067\u5931\u6557\u3057\u307e\u3057\u305f\uff08\uff57<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u901a\u308a\u691c\u8a3c\u304c\u6e08\u3093\u3060\u306e\u3067\u3001\u6295\u7a3f\u3057\u307e\u3059\u3002 \u3053\u306e\u65b9\u6cd5\u3067PHP8.1\u307e\u3067\u306f\u81ea\u7531\u306b\u5165\u308c\u3089\u308c\u307e\u3059\u3002 SELinux\u304c\u4e0d\u53ef\u306b\u306a\u3063\u3066\u3044\u308b\u4e8b\u3092\u78ba\u8a8d \u203b\u6709\u52b9\u3060\u3063\u305f\u3089\u3001\u7121\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5168\u3066\u306e\u8a2d\u5b9a\u304c\u7d42\u308f\u3063\u3066\u304b\u3089\u6709\u52b9\u306b\u3059\u308b\u306e\u3092\u304a\u52e7\u3081\u81f4\u3057\u307e\u3059\u3002 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[40,41,39],"tags":[197,196,195,194,167],"class_list":["post-3015","post","type-post","status-publish","format-standard","hentry","category-apache","category-php","category-server","tag-apache2-4-37","tag-mariadb10","tag-php7-4","tag-rockylinux8","tag-sakura-vps"],"_links":{"self":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/3015","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3015"}],"version-history":[{"count":2,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/3015\/revisions"}],"predecessor-version":[{"id":3017,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/3015\/revisions\/3017"}],"wp:attachment":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3015"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3015"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3015"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}