Must understand:
Vncserver, when called, will enable the server-side listening port based on your configuration.
The port defaults to start at 5900, plus your desktop number.
For example, if your desktop number is 1, VNC's connection port number is 5900+1=5901
For example, if your desktop number is 10000, VNC's connection port number is 5900+10000=15900
====================================================================
The VNC server is configured below to enable a common user (YISAA) to remotely connect to the Linux system's graphical interface via VNC clients (provided your server installs the desktop)
1, check whether the Linux system installed VNC
Enter command in terminal window: Rpm-q vnc-server
The return information is as follows
Package Vnc-server is not DWORD
Indicates that the VNC server is not installed
2, run the following command to install:
Yum Install Vnc-server
3. Start VNC Service
Vncserver
You'll require a password to access your desktops.
Password:
Verify:
Will be prompted to enter the password, this password is a remote login required to enter the password, input password, enter
4, switch to root account: Su root and then enter the password of the root account
Vi/etc/sysconfig/vncservers #vnc配置文件
Vncservers= "10000:YISAA" # lifted the front # 10000:YISAA (Desktop number: User)
# vncserverargs[2]= "-geometry 800x600-nolisten tcp-localhost"
Last Saved exit
5, configure the firewall, allow the 10000+5900=15900 port through the firewall (otherwise remote connect VNC server)
Vi/etc/sysconfig/iptables
-A input-m state--state new-m tcp-p TCP--dport 15900-j ACCEPT (allow 15900 ports through the firewall)
Save exit
6, restart VNC server/etc/init.d/vncserver restart
Service Vncserver Restart
7, restart the firewall, so that just the port configuration effective
/etc/init.d/iptables restart
Service Iptables Restart
8, set up VNC server automatically start
The first method: Use the "NTSYSV" command to start the graphical service configuration program, add an asterisk before the Vncserver service, click OK, configuration complete.
The second method: use "Chkconfig" to operate in command line mode, using the following command
Chkconfig Vncserver on
Chkconfig--list Vncserver
Vncserver 0:off 1:off 2:on 3:on 4:on 5:on 6:off
9, change VNC connection password
vncpasswd
Up to this, the VNC server is set up and the VNC client can connect the ip:15900