Disclaimer: This article is a blogger original article, follow the CC 4.0 by-sa copyright agreement, reproduced, please attach the original source link and this statement.
1, turn off the firewall and selinux
-
systemctl stop firewalld .service
-
setenforce 0
2, install the graphics support
yum groups install "GNOME Desktop"或yum groups install "X Window System"
3, install vncserver
yum -y install tigervnc-server
4, modify the configuration file
-
-
-
vim /etc/systemd/ system/vncserver@\: 1.service
To find two lines
-
ExecStart= /usr/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i"
-
PIDFile= /home/ <USER>/.vnc/%H%i.pid
I logged in as root, so as to modify
-
ExecStart= /usr/sbin/runuser -l root -c "/usr/bin/vncserver %i"
-
PIDFile= /root/.vnc/%H%i.pid
5, reload systemd
systemctl daemon-reload
6, set vnc login password
vncpasswd
7, start vncserver
-
systemctl enable vncserver@: 1.service
-
systemctl start vncserver@: 1.service
8, to see whether it is normal to start
ps -ef | grep vnc
So far vncserver set up is completed.