I. Installation of VNC
By default, CentOS 6.4 is not installed.
Check whether the installation, enter:
[Email protected] ~]# rpm-q VNC vnc-server
Get:
Package VNC isn't installed
If the prompt is not installed, then start the installation and enter:
[email protected] ~]# Yum install VNC vnc-server
Second, set the VNC password
Start VNC when installation is complete otherwise the first step of Centos will still be reported without VNC installed
[Email protected] ~]$ Vncserver
Set the VNC password, enter: (Enter the user under a user is it, if su imiss switch to Imiss user, input vncserver start is another desktop, the same to set the password, The password to be set under this user will be required for Vncserver to be launched under this account. )
You are prompted for the password because it is configured for the first time. Repeat the input two times.
[Email protected] ~]$ VNCPASSWD
Password:
Verify:
Third, configure the desktop type
[[email protected] ~] $vi ~/.vnc/xstartup
In general, we use the Linux desktop is a "Gnome" desktop, it is configured to this desktop comparison habits.
Press "I" key to enter the editing state, mainly modify the last two lines. Switch
# xterm-geometry 80x24+10+10-ls-title "$VNCDESKTOP Desktop" &
# TWM &
Gnome-session &
Focus on editing the last two lines, remove the two lines of comments, get:
Iv. Configuring login account, desktop resolution, connection mode
Input:
[Email protected] ~]# vi/etc/sysconfig/vncservers
Modify the last two lines
Vncservers= "1:root"
vncserverargs[1]= "-geometry 1024x768"
V. Configuring firewalls to allow VNC connections
The VNC server listens on the port starting from 5900, Display:1 listens 5901,display:2 listens 5902, and so on. The CentOS firewall default is not allowed to connect these ports, so you need to use the following steps to open the firewall (requires root permission):
Input EDIT:
[Email protected] ~]# Vi/etc/sysconfig/iptables
Above we only added a root account and desktop 1, so here according to the above rules, add a "5901" port number.
-A input-m state--state new-m tcp-p TCP--dport 5901-j ACCEPT
Six, restart the firewall
Service Iptables Restart
Seven, set up VNC automatic start
[Email protected] ~]# chkconfig vncserver on
Eight, close
Vncserver-kill:1 (Note that there is a space after kill)
Installation Successful
650) this.width=650; "src=" Http://www.centoscn.com/uploads/allimg/140504/1-140504234919525.png "style=" padding:0 px;margin:0px;border:none;width:643px;height:170px; "/>
Nine, client Installation
Download and install the VNC viewer
Log in after successful installation
192.168.10.1:5901
Then the password will pop up and the password is the one you just set.
650) this.width=650; "src=" Http://www.centoscn.com/uploads/allimg/140504/1-140504234932356.png "style=" padding:0 px;margin:0px;border:none;width:400px;height:210px; "/>
The password is not the password for the login account but the VNC setting.
This article is from "tossing the years." "Blog, be sure to keep this provenance http://990487026.blog.51cto.com/10133282/1720602
CentOS Installation Vnc_seerver