4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Oracle Cloud]Oracle Linux8 に vnc 接続してみた

Posted at

Oracle Cloud 上に Oracle Linux 8 でコンピュートインスタンスを起動し、オンプレミスのWindowsから vncで接続してみた。

今回は、opc ユーザで作業を実施

vncserverのインストール&パスワード設定

vncserver を インストール

$ sudo dnf group install "Server with GUI" -y 
$ sudo dnf install tigervnc-server tigervnc-server-module -y

vnc パスワードの設定

$ vncpasswd
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
A view-only password is not used
$

vncserverの初期設定

vncserver.users ファイルに接続ユーザを追加
例) :1=opc

$ sudo vi /etc/tigervnc/vncserver.users
vncserver.users
# TigerVNC User assignment
#
# This file assigns users to specific VNC display numbers.
# The syntax is <display>=<username>. E.g.:
#
# :2=andrew
# :3=lisa

:1=opc 

vncserver-config-defaults ファイルにデフォルト設定を追記
session=gnome
geometry=1280x1024

$ sudo vi /etc/tigervnc/vncserver-config-defaults
vncserver-config-defaults.
# Several common settings are shown below. Uncomment and modify to your
# liking.

# securitytypes=vncauth,tlsvnc
# desktop=sandbox
# geometry=2000x1200
# localhost
# alwaysshared

session=gnome
geometry=1280x1024

vncserverの起動

$ sudo systemctl daemon-reload
$ sudo systemctl enable --now vncserver@:1.service
$ sudo systemctl status vncserver@:1.service

vncviewerでの接続

(Windows PCからの接続の場合) powershell から Port フォワーディング
に接続するコンピュートインスタンスのパブリックIPアドレスを指定

PS C:\> ssh -L 5901:localhost:5901 opc@<VNC server host>

vncviewer で localhost:5901 へ接続
image.png

image.png

image.png

おわりに

Oracle Linux 8 に対して vnc で接続することができた。

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?