1:# yum install tigervnc-server -y 2:cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service 3: vim /etc/systemd/system/vncserver@:1.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=/sbin/runuser -l root -c "/usr/bin/vncserver %i" PIDFile=/root/.vnc/%H%i.pid ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' [Install] WantedBy=multi-user.target 4:# systemctl daemon-reload 5:# vncpasswd Password: Verify: 6:# vncserver 8: # iptables -F