{"id":3009,"date":"2021-12-05T02:31:22","date_gmt":"2021-12-04T17:31:22","guid":{"rendered":"https:\/\/www.dogrow.net\/linux\/?p=3009"},"modified":"2022-07-08T06:38:59","modified_gmt":"2022-07-07T21:38:59","slug":"blog131","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/linux\/blog131\/","title":{"rendered":"(131)\u3010\u9023\u8f092-3\u3011\u307e\u3063\u3055\u3089\u306a\u72b6\u614b\u306e RHEL8\u3092 WEB\u30b5\u30fc\u30d0\u3068\u3057\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u3044"},"content":{"rendered":"<h1 class=\"my_h\">1. \u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3070\u304b\u308a\u306e\u307e\u3063\u3055\u3089\u306a\u72b6\u614b\u306e RHEL8.5\u30de\u30b7\u30f3\u3092 <span class=\"my_fc_deeppinkBBig\">WEB\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3002<\/span><\/p>\n<h1 class=\"my_h\">2. \u3084\u3063\u3066\u307f\u308b<\/h1>\n<p>\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u4f5c\u696d\u3059\u308b\u3002<br \/>\n1\/3 : firewall\u3067 HTTP\u901a\u4fe1\u3092\u8a31\u53ef<br \/>\n2\/3 : WEB\u30b5\u30fc\u30d0(Apache)\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n3\/3 : TOP\u30da\u30fc\u30b8\u3092\u4f5c\u308b<\/p>\n<h2 class=\"my_h\">1\/3 : firewall\u3067 HTTP\u901a\u4fe1\u3092\u8a31\u53ef<\/h2>\n<p>\u4ee5\u4e0b\u3001root\u6a29\u9650\u3067\u64cd\u4f5c\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<p>\u73fe\u5728\u4f7f\u7528\u53ef\u80fd\u306a\u30b5\u30fc\u30d3\u30b9\u3092\u8868\u793a\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre\">\r\n# firewall-cmd --list-services\r\n\r\ncockpit dhcpv6-client ssh\r\n<\/pre>\n<p>http\u304c\u7121\u3044\u306e\u3067\u3053\u308c\u3092\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre\">\r\n# firewall-cmd --permanent --add-service=http\r\n# firewall-cmd --reload\r\n<\/pre>\n<p>\u3082\u3046\u4e00\u5ea6\u3001\u4f7f\u7528\u53ef\u80fd\u306a\u30b5\u30fc\u30d3\u30b9\u3092\u8868\u793a\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre\">\r\n# firewall-cmd --list-services\r\n\r\ncockpit dhcpv6-client http ssh\r\n<\/pre>\n<p>\u4f7f\u7528\u53ef\u80fd\u306a\u30b5\u30fc\u30d3\u30b9\u306b <span class=\"my_fc_deeppinkB\">http\u304c\u8ffd\u52a0\u3055\u308c\u305f\u3002<\/span><\/p>\n<p>public zone\u306e\u8a2d\u5b9a\u3092\u8868\u793a\u3057\u3066\u773a\u3081\u308b\u3002<\/p>\n<pre class=\"my_pre\">\r\n# firewall-cmd --zone=public --list-all\r\n\r\npublic (active)\r\n  target: default\r\n  icmp-block-inversion: no\r\n  interfaces: eno1\r\n  sources:\r\n  services: cockpit dhcpv6-client http ssh\r\n  protocols:\r\n  forward: no\r\n  masquerade: no\r\n  forward-ports:\r\n  source-ports:\r\n  icmp-blocks:\r\n  rich rules:\r\n<\/pre>\n<h2 class=\"my_h\">2\/3 : WEB\u30b5\u30fc\u30d0(Apache)\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u3082\u3057\u304b\u3057\u3066\u65e2\u306b\u5165\u3063\u3066\u3044\u308b\uff1f<\/p>\n<pre class=\"my_pre\">\r\n# systemctl status httpd.service\r\n\r\n\u25cf httpd.service - The Apache HTTP Server\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/httpd.service; disabled; vendor preset: disabled)\r\n   Active: inactive (dead)\r\n     Docs: man:httpd.service(8)\r\n<\/pre>\n<p>\u672a\u8d77\u52d5\u72b6\u614b\u306a\u3060\u3051\u3002<br \/>\n\u65e2\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u305f\u3002<\/p>\n<p>\u3082\u3057\u3044\u306a\u3051\u308c\u3070 yum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre\">\r\n# yum install -y httpd httpd-devel httpd-tools\r\n<\/pre>\n<p>\u96fb\u6e90\u6295\u5165\u6642\u306b Apache\u3092\u5e38\u6642\u8d77\u52d5\u306b\u3057\u3066\u304a\u304f\u3002<\/p>\n<pre class=\"my_pre\">\r\n# systemctl enable httpd.service\r\n# systemctl list-unit-files | grep httpd\r\n\r\nhttpd-init.service                         static\r\nhttpd.service                              enabled\r\nhttpd@.service                             disabled\r\nhttpd.socket                               disabled\r\n<\/pre>\n<h2 class=\"my_h\">3\/3 : TOP\u30da\u30fc\u30b8\u3092\u4f5c\u308b<\/h2>\n<p>Apache\u306e DocumentRoot\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre\">\r\n# less \/etc\/httpd\/conf\/httpd.conf\r\n<\/pre>\n<p>DocumentRoot\u306f \/var\/www\/html \u3068\u306e\u3053\u3068\u3002<br \/>\n\u5909\u3048\u308b\u5fc5\u8981\u3082\u306a\u3044\u306e\u3067\u3053\u306e\u307e\u307e\u4f7f\u7528\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre\">\r\n# DocumentRoot: The directory out of which you will serve your\r\n# documents. By default, all requests are taken from this directory, but\r\n# symbolic links and aliases may be used to point to other locations.\r\n#\r\n<span class=\"my_fc_deeppink\">DocumentRoot \"\/var\/www\/html\"<\/span>\r\n<\/pre>\n<p><span class=\"my_fc_blueB\">\/var\/www\/html<\/span> \u306b\u9069\u5f53\u306aWEB\u30da\u30fc\u30b8\u3092\u7f6e\u304f\u3002<\/p>\n<pre class=\"my_pre\">\r\nvi \/var\/www\/html\/index.html\r\n<\/pre>\n<p>\u3053\u3053\u3067\u306f\u3001\u4ee5\u4e0b\u306e 1\u884c\u3060\u3051\u3092\u8a18\u8ff0\u3057\u305f\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb <span class=\"my_fc_blueB\">index.html<\/span> \u3092\u4f5c\u6210\u3057\u305f\u3002<\/p>\n<pre class=\"my_pre\">\r\nHello! I'm DeskMini H470. \r\n<\/pre>\n<p>WEB\u30b5\u30fc\u30d0\u30fc\u304c\u52d5\u3044\u3066\u3044\u306a\u3051\u308c\u3070\u3001\u8d77\u52d5\u3057\u3066\u304a\u304f\u3002<\/p>\n<pre class=\"my_pre\">\r\n# systemctl status httpd.service\r\n# systemctl start httpd.service\r\n<\/pre>\n<p>WEB\u30d6\u30e9\u30a6\u30b6\u306b\u3053\u306e\u30de\u30b7\u30f3\u306e IP\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u3066\u307f\u308b\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/linux\/wp-content\/uploads\/2021\/12\/i001-3.png\" alt=\"\" class=\"my_add_bs1\" \/><\/p>\n<p><span class=\"my_fc_deeppinkBBig\">\u3067\u304d\u305f\uff01<\/span><\/p>\n<h1 class=\"my_h\">3. \u95a2\u9023\u6295\u7a3f<\/h1>\n<p><span class=\"my_fc_blueBBig\">\u307e\u3063\u3055\u3089\u306a\u72b6\u614b\u306eRHEL8\u306b&#8230; \u30b7\u30ea\u30fc\u30ba<\/span><br \/>\n<a href=\"https:\/\/www.dogrow.net\/linux\/blog129\/\" rel=\"noopener\">(129) \u307e\u3063\u3055\u3089\u306a\u72b6\u614b\u306e RHEL8\u306b EPEL\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0<\/a><br \/>\n<a href=\"https:\/\/www.dogrow.net\/linux\/blog130\/\" rel=\"noopener\">(130) \u307e\u3063\u3055\u3089\u306a\u72b6\u614b\u306e RHEL8\u306b CodeReady Builder\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0<\/a><br \/>\n<a href=\"https:\/\/www.dogrow.net\/linux\/blog131\/\" rel=\"noopener\">(131) \u307e\u3063\u3055\u3089\u306a\u72b6\u614b\u306e RHEL8\u3092 WEB\u30b5\u30fc\u30d0\u3068\u3057\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u3044<\/a> <b>\u2190\u672c\u7a3f<\/b><br \/>\n<a href=\"https:\/\/www.dogrow.net\/linux\/blog132\/\" rel=\"noopener\">(132) \u307e\u3063\u3055\u3089\u306a\u72b6\u614b\u306e RHEL8\u306b VirtualBox \uff06 Ubuntu\u3092\u5165\u308c\u305f\u3044<\/a><\/p>\n<hr class=\"my_hr_bottom\">\n","protected":false},"excerpt":{"rendered":"<p>1. \u3084\u308a\u305f\u3044\u3053\u3068 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3070\u304b\u308a\u306e\u307e\u3063\u3055\u3089\u306a\u72b6\u614b\u306e RHEL8.5\u30de\u30b7\u30f3\u3092 WEB\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3002 2. \u3084\u3063\u3066\u307f\u308b \u4ee5\u4e0b\u306e\u624b\u9806\u3067\u4f5c\u696d\u3059\u308b\u3002 1\/3 : firewall\u3067 HTTP\u901a\u4fe1\u3092\u8a31\u53ef\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/linux\/blog131\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57,127],"tags":[],"class_list":["post-3009","post","type-post","status-publish","format-standard","hentry","category-apache","category-rhel"],"views":3972,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/3009","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/comments?post=3009"}],"version-history":[{"count":20,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/3009\/revisions"}],"predecessor-version":[{"id":3281,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/3009\/revisions\/3281"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/media?parent=3009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/categories?post=3009"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/tags?post=3009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}