Taking centos6.5 as an example
1. Server-side
1.1 Installing server-side software
#yuminstall Tigervnc-server
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/53/97/wKioL1RsCKqB9Q44AAMfcmKjSYM833.jpg "title=" Tigervnc-server.png "alt=" Wkiol1rsckqb9q44aamfcmkjsym833.jpg "/>
1.2 Setting the VNC password
#vncserver
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/53/99/wKiom1RsCIrgoPniAAEw-otNzrE305.jpg "title=" Vncserver.png "alt=" Wkiom1rscirgopniaaew-otnzre305.jpg "/>
1.3 Configuring Desktop Types
#vi ~/.vnc/xstartup
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/53/99/wKiom1RsCMCi7NghAAD-9u7rb88064.jpg "title=" Xstartup.png "alt=" Wkiom1rscmci7nghaad-9u7rb88064.jpg "/>
Description: commented out on the last two lines of the configuration file and added a line of code to indicate that the Gnome desktop is being used
1.4 Configure login account, desktop resolution, connection mode
#vi/etc/sysconfig/vncservers
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/53/99/wKiom1RsCQrzkVG_AAEjjUeLoGY918.jpg "title=" Vncservers2.png "alt=" Wkiom1rscqrzkvg_aaejjuelogy918.jpg "/>
Description: Vncservers This line is configured to start several Vncserver,vncserverargs on the system startup to configure the desktop resolution and connection mode.
1.5 Configuring firewalls to allow VNC connections
#vi/etc/sysconfig/iptables
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/53/99/wKiom1RsCVDwzK2ZAAHQxtQTzLc331.jpg "title=" Iptables2.png "alt=" Wkiom1rscvdwzk2zaahqxtqtzlc331.jpg "/>
Description
1) Vncserver monitoring port starting from 5900, display:1 monitoring 5901,display:2 monitoring 5902, and so on. The CentOS firewall default is not allowed to connect these ports, so you need to use the above steps to open the firewall (requires root privileges).
2) above we added a root account and desktop 11, so here according to the above rules, add a "5911" Port number (virtual machine centosx2 port).
1.6 Restarting the firewall
#serviceiptables restart
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/53/97/wKioL1RsCliCMROVAACrkso7V1I204.jpg "title=" Restartiptables.png "alt=" Wkiol1rsclicmrovaacrkso7v1i204.jpg "/>
1.7 Setting up VNC auto-start
#chkconfigvncserver on
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/53/99/wKiom1RsCpSy-h2oAABiWKjxbMU202.jpg "title=" Vnc.png "alt=" Wkiom1rscpsy-h2oaabiwkjxbmu202.jpg "/>
Note: Once the server is restarted, VNC service will be stopped, manual restart is not convenient, so the VNC service is set to start automatically
2. Client
2.1 Installing the Client software
#yuminstall Tigervnc
Note: If you are a Windows user, install the VNC viewer directly, as follows
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/53/9A/wKiom1RsDdCRDz-MAADGmhR5810408.jpg "title=" Vncviewer.png "alt=" Wkiom1rsddcrdz-maadgmhr5810408.jpg "/>
2.2 Remote connection with Vncviewer
#vncviewer192.168.137.107:11
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/53/98/wKioL1RsDSnixTXyAAM5E4cPd1w808.jpg "title=" Vnc11.png "alt=" Wkiol1rsdsnixtxyaam5e4cpd1w808.jpg "/>
This article is from the "Learning" blog, so be sure to keep this source http://learnwithme.blog.51cto.com/7148047/1579451
Linux VNC Installation and configuration