1. Installing VNC server
[email protected] ~]# yum Install tigervnc-server-y
2. Setting up VNC server boot
[email protected] ~]# chkconfig vncserver on
3. Modify the Vncserver configuration file
[email protected] ~]# vi/etc/sysconfig/vncservers
Add the following after the configuration file
Vncservers= "2:root"
vncserverargs[2]= "-geometry 1366x768-nolisten TCP"
Set the password for Vncserver
[email protected] ~]# vncpasswd
Password:
Verify:
4. Start the Sncserver service
[[email protected] ~]#/etc/init.d/vncserver start
5. Remote connection using the VNC viewer
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>
650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/977052/201609/977052-20160907115704926-968202129. PNG "style=" margin:0px;padding:0px;border:none; "/>
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>
CentOS7 Configuring VNC
650) this.width=650; "class=" Editor-attachment "src="/e/u261/themes/default/images/spacer.gif "alt=" CENTOS7 configuring VNC remote. pdf "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px Solid #ddd; "/>
One. Installation
Run the following command to install Vncserver as root user;
Yum Install Tigervnc-server
Also run the following command to install the vncviewer;
Yum Install VNC
Stop and disable the firewall;
Systemctl Stop Firewalld.service
Systemctl Disable Firewalld.service
Two. Configuration
Vncviewer is basically not configured;
Vncserver configuration, create a new profile to open windows 1th as an example (you can also open multiple windows at the same time, modify the number), as follows:
Cp/lib/systemd/system/[email protected]/lib/systemd/system/[email Protected]:1.service
Or add one more window:
Cp/lib/systemd/system/[email protected]/lib/systemd/system/[email Protected]:2.service
Edit/lib/systemd/system/[email Protected]:1.service, set user root related parameters
[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-geometry 800x600"
pidfile=/root/. vnc/%h%i.pid
Execstop=/bin/sh-c '/usr/bin/vncserver-kill%i >/dev/null 2>&1 | | :‘
Three. Application
Update Systemctl to make it effective;
Systemctl Daemon-reload
Set the vncserver password;
VNCPASSWD Root
Follow the prompts to enter your password and confirm your password
Start the 1th window that the service uses to enable VNC;
Systemctl start [email protected]:1.service or vncserver:1
Close Window # 1th:
Systemctl Stop [email protected]:1.service or vncserver-kill:1
set to boot automatically;
Systemctl Enable [email protected]:1.service
Linux VNC Server Installation configuration