0
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 5 years have passed since last update.

CentOS7 で VNCサーバにつながらない時の確認事項

Last updated at Posted at 2020-06-17

vncサーバがインストールされているか確認

  • インストール
    yum install tigervnc-server

  • 設定ファイル複製
    cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:3.service

  • 設定ファイルの部分にvncユーザーを設定
    /lib/systemd/system/vncserver@.service

     [Unit]
     Description=Remote desktop service (VNC)
     After=syslog.target network.target
    
     [Service]
     Type=forking
     # Clean any existing files in /tmp/.X11-unix environment
     ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
     ExecStart=/usr/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i"
     PIDFile=/home/<USER>/.vnc/%H%i.pid
     ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
    
     [Install]
     WantedBy=multi-user.target
    

vnc のサービスが起動しているか確認

vncserver :1
または
vncserver :2

ファイアウォール(firewalld)にてVNC通信を許可

firewall-cmd --permanent --add-port=5901/tcp
(またはfirewall-cmd --permanent --add-port=5902/tcp)
firewall-cmd --reload
firewall-cmd --list-all

参考URL

CentOS 7 でのVNCServerのインストールと設定 (TigerVNC Serverのインストール) (CentOS Tips)

CentOS7にWindowsからVNCで接続する方法

0
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
0
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?