Reference: HTTP://WIC.XINGNING.GOV.CN/BLOG/29
Https://linux.cn/article-5335-1.html
1. Check if VNC is installed,
rpm-q Tigervnc tigervnc-server
2, Installation X-window
Yum check-"X Window System"yum install gnome-classic-session gnome-terminal nautilus-open-terminal Control-center liberation-mono-/etc/systemd/system/default-sf/lib/systemd/system/ graphical.target/etc/systemd/system/default. Targetreboot #重启机器
3. Installing VNC
Yum Install Tigervnc-server-y
4. Copy the service file from the VNC backup library to the system service Management directory "There is an error in the original, not creating [Email protected]:1.service folder ]
CP /lib/systemd/system/[email protected]/etc/systemd/system/[email protected]:1.service #复制并被重命名为 [email Protected]:1.service
5, modify [email protected]:1.service file
#进入/etc/systemd/System directory
/etc/systemd/system
#编辑配置文件
Vim [email protected]:1
Execstart<USER> -C "/usr/bin/vncserver%i"
pidfile=/home/<user>/.vnc/%h%
ExecstartRoot-C "/usr/bin/vncserver%i"
Pidfile=/root/.vnc/%h%i.pid
#如果不是root用户 pidfile=/Home/anjos/.vnc/%h%i.pid
6. Reload Systemd
#由于在systemd中添加了东东, let the system reload Systemctl daemon-reload
7. Set the password for [email Protected]:1.service]
vncpasswd
8. Turn off the firewall
CentoS7 Default with new firewall firewall, not with iptables
[Using firewall]
Firewall-cmd--permanent--add-service vnc-server# Add access rights
Systemctl Restart firewalld.service# Restart Firewalld
#systemctl Stop Firewalld.service #停止firewall (start, startup)
#systemctl Disable Firewalld.service #设置开机禁止firewall (Enable boot)
[Using iptables]
yum-y Install iptables-services# installation iptables
vi/etc/sysconfig/iptables# Modify the Iptables fire prevention rules, add the following sentence to the appropriate location
-A input-m state--state new-m tcp-p TCP--dport 5900:5903-j ACCEPT
Systemctl Restart Iptables.service #重启防火墙使配置生效-----systemctl Status iptables.service# view state
Systemctl Stop Iptables.service #启动iptables (start)
Systemctl Disable Iptables.service #禁止防火墙开机启动 (enable) #设置防火墙开机启动
[note] After installing iptables, you can use
service iptables status# View firewall status
Service Iptables stop# shutting down the firewall
Chkconfig iptables--list# View firewall boot status
Chkconfig iptables off# shut down firewall boot up
9. Start the VNC service (set boot up)
Systemctl Enable [email protected]:1.servicesystemctl start [email protected]:1.service
10. Download the VNC viewer on the Win7
: http://www.realvnc.com/download/viewer/
After downloading, directly double-click EXE can
11. Visit
Use your IP plus a 1.
CenOS7.1 Install vnc--let win7 Remote Desktop Linux