Environment: centos6.x desktop environment User Root
Install VNC Server Software
Yum install-y tigervnc-Server
Configure VNC
Vncserver: 1
The configuration file is automatically generated after the password is set.
As follows:
[Email protected] ~] # Vncserver: 1you will require a password to access your tops. password: Verify: Xauth: (stdin): 1: Bad display name "localhost: 1" in "add" commandnew 'localhost: 1 (Root) 'desktop is localhost: 1 Creating default startup script/root /. VNC/xstartupstarting applications specified in/root /. VNC/xstartuplog file is/root /. VNC/localhost: 1.log
Configure Firewall
By default, the VNC service uses ports later than 5900.
: 1 use 5901: 2 Use 5902 # and so on
View which port is used
Netstat-tupln | grep vnctcp 0 0 0.0.0.0: 5901 0.0.0.0: * Listen 5969/xvnc
Enable port 5901
Lokkit-P 5901: TCP
Configure boot to start the VNC service
Vim/etc/sysconfig/vncservers
Add
Vncservers = "1: Root"
Configure Automatic Start upon startup
Chkconfig vncserver on
VNC tool connection
Now you can use the VNC tool to connect
IP address format: 1
Other common commands
Vncserver-list # view the VNC Process List vncserver-kill: 1 shut down the process: 1
Appendix: RealVNC http://www.realvnc.com/download/viewer/