Centos 7 Installation VNC step
VNC allows Linux systems to access Linux desktops like Remote Desktop access in Windows. This document configures the machine to operate in a CentOS 7 HP server Environment of the Xingning Network Information Center.
First try the server with VNC.
[Root@wic ~]# rpm-q Tigervnc tigervnc-server
If not installed, it will appear directly.
Package tigervnc are not installedpackage Tigervnc-server are not installed
If you do not have the X-windows desktop installed, install Xwindows first
[Root@wic ~]# yum Check-update[root@wic ~]# yum groupinstall "X Window System" [Root@wic ~]# yum Install gnome-classic-sess Ion gnome-terminal nautilus-open-terminal control-center Liberation-mono-fonts[root@wic ~]# unlink/etc/systemd/ System/default.target[root@wic ~]# ln-sf/lib/systemd/system/graphical.target/etc/systemd/system/default.target[ Root@wic ~]# reboot
The first step is to install the VNC packages:
[Root@wic ~]# Yum Install tigervnc-server-y
The second step, modify the configuration information, create a folder under/etc/systemd/system/Vncserver@:1.service example config file from/lib/systemd/system/ Vncserver@.service copy into the inside
[Root@wic ~]# Cp/lib/systemd/system/vncserver@.service/etc/systemd/system/vncserver@:1.service
Then open the configuration file/etc/systemd/system/vncserver@:1.service Replace the default user name
Find this line
Execstart=/sbin/runuser-l-
C "/usr/bin/vncserver%i" pidfile=/home/
/.vnc/%h%i.pid
Here I log in directly with the root user, so I replaced
Execstart=/sbin/runuser-l root-c "/usr/bin/vncserver%i" pidfile=/root/.vnc/%h%i.pid
If it's another user, such as John, replace the following
Execstart=/sbin/runuser-l-
C "/usr/bin/vncserver%i" pidfile=/home/
/.vnc/%h%i.pid
Step three, Reload Systemd
[Root@wic ~]# Systemctl Daemon-reload
Fourth step, set the password for VNC
[Root@wic ~]# vncpasswd
Fifth step, because CentOS 7 on my side is using iptable firewall, so
Vim/etc/sysconfig/iptables
In the right place add
-A input-m state--state new-m tcp-p TCP--dport 5900:5903-j ACCEPT
Restart Iptable
Service Iptables Restart
If you are using the CentOS 7 default firewall, you may need to
[Root@wic ~]# firewall-cmd--permanent--add-service vnc-server[root@wic ~]# systemctl Restart Firewalld.service
Sixth step, set the default startup and enable VNC
[Root@wic ~]# systemctl enable Vncserver@:1.service[root@wic ~]# systemctl start Vncserver@:1.service
So basically the CentOS end is set up, the Windows side to go to the next VNC Viewer software. Connect it and try it a little rough, but up there.
http://www.bkjia.com/PHPjc/1092478.html www.bkjia.com true http://www.bkjia.com/PHPjc/1092478.html techarticle Centos 7 Installation VNC step VNC allows Linux systems to access Linux desktops like Remote Desktop access in Windows. This article configures the machine is a Xingning network Information center ...