{"id":3455,"date":"2022-07-17T02:04:45","date_gmt":"2022-07-16T17:04:45","guid":{"rendered":"https:\/\/www.dogrow.net\/linux\/?p=3455"},"modified":"2022-08-09T03:21:58","modified_gmt":"2022-08-08T18:21:58","slug":"blog144","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/linux\/blog144\/","title":{"rendered":"(144) \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3070\u304b\u308a\u306e RHEL8.6\u3067 VNC\u30b5\u30fc\u30d0\u30fc\u304c\u4f7f\u3048\u308b\u307e\u3067\u306e\u624b\u9806"},"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 RHEL(Red Hat Enterprize Linux)8.6 \u306b\u3001\u5916\u90e8\u304b\u3089 VNC\u63a5\u7d9a\u3057\u3066 GUI\u64cd\u4f5c\u3057\u305f\u3044\u3002<br \/>\n\u305d\u306e\u305f\u3081\u306e\u624b\u9806\u3092\u8a18\u9332\u3057\u3066\u304a\u304f\u3002<\/p>\n<p>\u53c2\u8003\u307e\u3067\u306b&#8230;<br \/>\nRHEL9.0\u3067\u3082\u540c\u3058\u624b\u9806\u3067\u3088\u304b\u3063\u305f\u3002<\/p>\n<h1 class=\"my_h\">2. \u3084\u3063\u3066\u307f\u308b<\/h1>\n<h3 class=\"my_h\">(1) \u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3067\u30dd\u30fc\u30c8#5901\u3092\u958b\u3051\u308b\u3002<\/h3>\n<p>VNC\u30b5\u30fc\u30d0\u30fc\u3067\u306f\u3001\u5916\u90e8\u304b\u3089\u306e\u63a5\u7d9a\u3092<br \/>\n<span class=\"my_fc_blueBBig\">\u30dd\u30fc\u30c8\u756a\u53f7 : 5900 + \u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u756a\u53f7<\/span><br \/>\n\u3067\u53d7\u3051\u308b\u3002<\/p>\n<p>\u3088\u3063\u3066\u3001\u3053\u306e\u30dd\u30fc\u30c8\u3092\u5fc5\u8981\u306a\u5206\u3060\u3051\u958b\u3051\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002<br \/>\n\u4eca\u56de\u306f\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u756a\u53f71\u756a\u3057\u304b\u4f7f\u308f\u306a\u3044\u306e\u3067\u30015900 + 1 = 5901 \u756a\u306e\u30dd\u30fc\u30c8\u3092\u958b\u3051\u3066\u304a\u304f\u3002<\/p>\n<pre class=\"my_pre\">\r\n[root@]# firewall-cmd --permanent --zone=public --add-port=<span class=\"my_fc_deeppinkB\">5901\/tcp<\/span>\r\n[root@]# firewall-cmd --reload\r\n<\/pre>\n<p>\u5ff5\u306e\u305f\u3081\u306b\u78ba\u8a8d\u3059\u308b\u3002\u2192 OK\u3060\u3002<\/p>\n<pre class=\"my_pre\">\r\n[root@]# firewall-cmd --list-all\r\n\r\npublic (active)\r\n  target: default\r\n  icmp-block-inversion: no\r\n  interfaces: eth0\r\n  sources:\r\n  services: cockpit dhcpv6-client ssh\r\n  <span class=\"my_fc_deeppinkB\">ports: 5901\/tcp<\/span>\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<h3 class=\"my_h\">(2) VNC\u30b5\u30fc\u30d0\u30fc\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/h3>\n<p>\u3053\u3053\u3067\u306f <span class=\"my_fc_deeppinkB\">tigervnc-server<\/span> \u3092\u4f7f\u7528\u3059\u308b\u3002<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre\">\r\n[root@]# yum install tigervnc-server\r\n<\/pre>\n<p>\u4ee5\u4e0b\u3001HOWTO \u3092\u53c2\u8003\u306b\u4f5c\u696d\u3092\u9032\u3081\u308b\u3002<br \/>\nHOWTO\u306f\u3001\u4ee5\u4e0b\u3092\u53c2\u7167\u306e\u3053\u3068\u3002<\/p>\n<pre class=\"my_pre\">\r\n[root@]# less <span class=\"my_fc_blueB\">\/usr\/share\/doc\/tigervnc\/HOWTO.md<\/span>\r\n<\/pre>\n<h3 class=\"my_h\">(3) VNC\u30e6\u30fc\u30b6\u30fc\u30de\u30c3\u30d7\u3092\u8ffd\u8a18\u3059\u308b\u3002<\/h3>\n<pre class=\"my_pre\">\r\n[root@]# vi <span class=\"my_fc_blueB\">\/etc\/tigervnc\/vncserver.users<\/span>\r\n<\/pre>\n<p>\u958b\u3044\u305f\u30d5\u30a1\u30a4\u30eb\u306b\u30e6\u30fc\u30b6\u30fc\u30de\u30c3\u30d7\u3092\u4ee5\u4e0b\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u8ffd\u8a18\u3059\u308b\u3002<br \/>\n<span class=\"my_fc_deeppinkB\">:{\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u756a\u53f7}={\u30e6\u30fc\u30b6\u30fc\u540d}<\/span><\/p>\n<pre class=\"my_pre\">\r\n:1=hoge\r\n<\/pre>\n<p>\u203b\u3053\u3053\u3067\u306f\u3001\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u756a\u53f7 1\u756a\u306b\u3001\u30e6\u30fc\u30b6\u30fc\u540d hoge \u3092\u5272\u308a\u5f53\u3066\u305f\u3002<\/p>\n<h3 class=\"my_h\">(4) \u5168VNC\u30e6\u30fc\u30b6\u30fc\u306e\u5171\u901a\u8a2d\u5b9a\u3092\u8ffd\u8a18\u3059\u308b\u3002<\/h3>\n<p>\u3053\u308c\u306f\u5fc5\u8981\u306a\u3051\u308c\u3070\u3084\u3089\u306a\u304f\u3066\u3082\u3088\u3044\u3002<br \/>\n\u4eca\u56de\u306f\u3001\u5168\u30e6\u30fc\u30b6\u30fc\u3067\u30c7\u30d5\u30a9\u30eb\u30c8\u753b\u9762\u30b5\u30a4\u30ba\u3092 Full HD\u306b\u3057\u305f\u304b\u3063\u305f\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u884c\u3063\u305f\u3002<\/p>\n<pre class=\"my_pre\">\r\n[root@]# vi <span class=\"my_fc_blueB\">\/etc\/tigervnc\/vncserver-config-defaults<\/span>\r\n<\/pre>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u753b\u9762\u89e3\u50cf\u5ea6\u3092 1920&#215;1080 \u306b\u6307\u5b9a\u3057\u305f\u3002<\/p>\n<pre class=\"my_pre\">\r\ngeometry=1920x1080\r\n<\/pre>\n<h3 class=\"my_h\">(5) \u30e6\u30fc\u30b6\u30fc\u3054\u3068\u306e\u6e96\u5099<\/h3>\n<p>\u672c\u9805\u306e\u4f5c\u696d\u306f\u30e6\u30fc\u30b6\u30fc\uff08\uff1d\u975eroot\uff09\u3067\u884c\u3046\u3002<\/p>\n<pre class=\"my_pre\">\r\n[hoge@]$ vncpasswd\r\n<\/pre>\n<p>VNC\u30ed\u30b0\u30a4\u30f3\u306e\u305f\u3081\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3059\u308b\u3002<br \/>\n \u2192 <span class=\"my_fc_blueB\">~\/.vnc<\/span> \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<h3 class=\"my_h\">(6) VNC\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3059\u308b\u3002<\/h3>\n<p>\u3044\u3088\u3044\u3088\u30b5\u30fc\u30d0\u30fc\u5074\u4f5c\u696d\u306e\u6700\u7d42\u6bb5\u968e\u3060\u3002<br \/>\n\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u3001\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u756a\u53f7 1\u3067 VNC\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3059\u308b\u3002<\/p>\n<pre class=\"my_pre\">\r\n[root@]# systemctl start <span class=\"my_fc_deeppinkB\">vncserver@:1<\/span>\r\n<\/pre>\n<p>\u5ff5\u306e\u305f\u3081\u306b\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\u3002 \u2192 <span class=\"my_fc_greenB\">active (running)<\/span> \u3068\u8868\u793a\u3055\u308c\u3066\u3044\u308c\u3070\u8d77\u52d5\u306b\u6210\u529f\uff01<\/p>\n<pre class=\"my_pre\">\r\n[root@]# systemctl status vncserver@:1\r\n\r\n<span class=\"my_fc_greenB\">\u25cf<\/span> vncserver@:1.service - Remote desktop service (VNC)\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/vncserver@.service; enabled; vendor preset: disabled)\r\n   Active: <span class=\"my_fc_greenB\">active (running)<\/span> since Sun 2022-07-17 01:35:39 JST; 23min ago\r\n\uff1a\r\n<\/pre>\n<p>\u30de\u30b7\u30f3\u8d77\u52d5\u6642\u306b VNC\u30b5\u30fc\u30d0\u30fc\u3092\u81ea\u52d5\u8d77\u52d5\u3055\u305b\u305f\u3044\u5834\u5408\u306f\u6709\u52b9\u5316\u3057\u3066\u304a\u304f\u3002<\/p>\n<pre class=\"my_pre\">\r\n[root@]# systemctl enable vncserver@:1\r\n<\/pre>\n<p>\u4ee5\u4e0a\u3067 VNC\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u6700\u4f4e\u9650\u306e\u6e96\u5099\u304c\u3067\u304d\u305f\u3002<\/p>\n<h1 class=\"my_h\">3. \u304a\u307e\u3051 : VNC\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u304b\u3089\u306e\u63a5\u7d9a\u624b\u9806<\/h1>\n<p>\u3053\u3061\u3089\u306e\u904e\u53bb\u8a18\u4e8b\u3092\u53c2\u7167\u3055\u308c\u305f\u3044\u3002<br \/>\n<a href=\"https:\/\/www.dogrow.net\/linux\/blog46\/\" target=\"_blank\" rel=\"noopener\">(46) VNC Viewer 6.0.2\u306b\u5165\u308c\u66ff\u3048\u308b\u3002<\/a><\/p>\n<h1 class=\"my_h\">4. \u4f59\u8ac7<\/h1>\n<h3 class=\"my_h\">(1) \u30dd\u30fc\u30c8\u756a\u53f7 5900\u756a\u306f\u5909\u66f4\u53ef\u80fd<\/h3>\n<p>TCP\u30dd\u30fc\u30c8\u756a\u53f7 5900\u756a\u306f\u3001<a href=\"https:\/\/ja.wikipedia.org\/wiki\/Internet_Assigned_Numbers_Authority\" target=\"_blank\" rel=\"noopener\">IANA<\/a>\u3067 VNC\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u3066\u3044\u308b\u516c\u5f0f\u306a\u30dd\u30fc\u30c8\u756a\u53f7\u3068\u306e\u3053\u3068\u3002<br \/>\n\u3088\u3063\u3066\u3001\u7121\u7406\u306b\u3053\u308c\u3092\u5909\u3048\u308b\u5fc5\u8981\u306f\u306a\u3044\u306e\u3060\u304c\u3001SSH\u30dd\u30fc\u30c8\u756a\u53f7\u306a\u3069\u3068\u540c\u69d8\u306b<br \/>\n<span class=\"my_fc_deeppinkBBig\">\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u7406\u7531\u3067\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u96a0\u3057\u305f\u3044<\/span> \u5834\u5408\u3082\u3042\u308b\u3002<br \/>\n\u3053\u3093\u306a\u6642\u306b\u306f\u3001\u8ab0\u3082\u304c\u77e5\u3063\u3066\u3044\u308b 5900\u756a\u304b\u3089\u3001\u81ea\u5206\u3067\u52dd\u624b\u306b\u6c7a\u3081\u305f\u81ea\u5206\u3057\u304b\u77e5\u3089\u306a\u3044\u30dd\u30fc\u30c8\u756a\u53f7\u306b\u5909\u66f4\u3057\u3066\u3082\u3088\u3044\u306e\u3060\u3002<\/p>\n<p>\u4e0a\u8ff0\u306e\u901a\u308a\u3001vnc\u30b5\u30fc\u30d0\u30fc\u306f\u4ee5\u4e0b\u306e\u30eb\u30fc\u30eb\u3067\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u6c7a\u3081\u3066\u3044\u308b\u3002<br \/>\n5900 + {\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u756a\u53f7 1,2,3,&#8230;}<\/p>\n<p>\u3053\u306e 5900\u756a\u3092\u5909\u66f4\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d&#8230;<\/p>\n<pre class=\"my_pre\">\r\n[root@]# vi \/usr\/bin\/vncserver\r\n<\/pre>\n<p>\u4ee5\u4e0b\u306e\u8a18\u8ff0\u3092\u5909\u66f4\u3059\u308c\u3070\u3088\u3044\u3002\u4f8b\u3048\u3070 5900\u3092 56789\u306b\u3059\u308b\u306a\u3069\u3002<\/p>\n<pre class=\"my_pre\">\r\n$vncPort = <span class=\"my_fc_deeppinkB\">5900<\/span> + $displayNumber;\r\n<\/pre>\n<p><span class=\"my_fc_deeppinkBBig\">\u3069\u306e\u30dd\u30fc\u30c8\u3092\u4f7f\u3048\u3070\u3088\u3044\u306e\uff1f<\/span> \u306f\u3001<a href=\"https:\/\/ja.wikipedia.org\/wiki\/TCP%E3%82%84UDP%E3%81%AB%E3%81%8A%E3%81%91%E3%82%8B%E3%83%9D%E3%83%BC%E3%83%88%E7%95%AA%E5%8F%B7%E3%81%AE%E4%B8%80%E8%A6%A7\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089(\u2193)<\/a> \u3092\u53c2\u7167\u306e\u3053\u3068\u3002<br \/>\n<a href=\"https:\/\/ja.wikipedia.org\/wiki\/TCP%E3%82%84UDP%E3%81%AB%E3%81%8A%E3%81%91%E3%82%8B%E3%83%9D%E3%83%BC%E3%83%88%E7%95%AA%E5%8F%B7%E3%81%AE%E4%B8%80%E8%A6%A7\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/linux\/wp-content\/uploads\/2022\/07\/i010-1.jpg\" alt=\"\" class=\"my_add_bs1\" \/><\/a><\/p>\n<p>\u30b7\u30b9\u30c6\u30e0\u30dd\u30fc\u30c8 : 0 &#8211; 1023<br \/>\n\u30e6\u30fc\u30b6\u30fc\u30dd\u30fc\u30c8 : 1024 &#8211; 49151<br \/>\n\u52d5\u7684\u30fb\u79c1\u7528\u30dd\u30fc\u30c8 : 49152 &#8211; 65535 <span class=\"my_fc_blueB\">\u2190 \u3053\u3053\u304b\u3089\u81ea\u7531\u306b\u9078\u3093\u3067\u4f7f\u3048\u3070\u3088\u3044\u3002<\/span><\/p>\n<p>\u8a2d\u5b9a\u5f8c\u3001VNC\u30b5\u30fc\u30d0\u30fc\u3092\u518d\u8d77\u52d5\u3059\u308b\u3068\u9069\u7528\u3055\u308c\u308b\u3002<\/p>\n<pre class=\"my_pre\">\r\n[root@]# systemctl restart <span class=\"my_fc_deeppinkB\">vncserver@:1<\/span>\r\n<\/pre>\n<h1 class=\"my_h\">5. \u6240\u611f<\/h1>\n<p>\u3053\u3093\u306a\u306b\u5f79\u7acb\u3064\u30bd\u30d5\u30c8\u3092\u7121\u6599\u3067\u63d0\u4f9b\u3057\u3066\u304f\u3060\u3055\u3063\u3066\u3044\u308b\u65b9\u3005\u306b\u306f\u3001\u672c\u5f53\u306b\u611f\u8b1d\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u672c\u5f53\u306b\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002m(_ _)m<\/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 RHEL(Red Hat Enterprize Linux)8.6 \u306b\u3001\u5916\u90e8\u304b\u3089 VNC\u63a5\u7d9a\u3057\u3066 GUI\u64cd\u4f5c\u3057\u305f\u3044\u3002 \u305d\u306e\u305f\u3081\u306e\u624b\u9806\u3092\u8a18\u9332\u3057\u3066\u304a\u304f\u3002 \u53c2\u8003\u307e\u3067\u306b&#8230;\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/linux\/blog144\/\">\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":[127,7],"tags":[],"class_list":["post-3455","post","type-post","status-publish","format-standard","hentry","category-rhel","category-vnc"],"views":6158,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/3455","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=3455"}],"version-history":[{"count":23,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/3455\/revisions"}],"predecessor-version":[{"id":3549,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/3455\/revisions\/3549"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/media?parent=3455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/categories?post=3455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/tags?post=3455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}