CentOS6.5 install VNC

Source: Internet
Author: User
1. by default, CentOS6.4 is not installed when VNC is installed. Check for installation. enter [root @ localhost ~] # Rpm-qvncvnc-server: packagevncisnotinstalled. if you are prompted that the packagevncisnotinstalled is not installed, start the installation. enter [root @ localhost ~]. # Yuminstallvn 1. install VNC
By default, the CentOS 6.4 is not installed.
Check for installation. enter:
[Root @ localhost ~] # Rpm-q vnc-server
Get:
Package vnc is not installed
If the prompt is not installed, start the installation. enter:
[Root @ localhost ~] # Yum install vnc-server 2. after The VNC password is set, start VNC first. otherwise, Centos still reports that VNC is not installed. [root @ localhost ~] $ Vncserver
Set the VNC password and enter: (If you enter a VNC password under a user, the login user is the user. if su imiss switches to the imiss user, and the vncserver is input, another desktop is started and the password is also set, in the future, you will need to set the password for vncserver login started under this account .)
At this time, you will be prompted to enter the password because it is the first configuration. Repeat the input twice.
[Root @ localhost ~] $ Vncpasswd
Password:
Verify: 3. configure the desktop type [root @ localhost ~] $ Vi ~ /. Vnc/xstartup
Generally, the Linux desktop we use is a "Gnome" desktop, so it is a habit to configure this desktop.
Press the "I" key to enter the editing status. modify the last two rows. Changed:
# Xterm-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop "&
# Twm &
Gnome-session & focus on editing the last two lines, and remove the comments of the two lines to get:

IV. configure the logon account, desktop resolution, and connection mode
Input:
[Root @ localhost ~] # Vi/etc/sysconfig/vncservers modify the last two lines of VNCSERVERS = "1: root"
VNCSERVERARGS [1] = "-geometry 1024x768" 5. configure a firewall to allow VNC connection
The VNC server listening port starts from 5900. The display: 1 listening port is 5901, the display: 2 listening port is 5902, and so on. By default, the CentOS firewall does not allow connection to these ports. Therefore, you need to use the following steps to open the firewall (root permission required ):
Input and edit:
[Root @ localhost ~] # In vi/etc/sysconfig/iptables, only one root account and desktop 1 are added. Therefore, add a "5901" port number according to the above rules. -A input-m state -- state NEW-m tcp-p tcp -- dport 5901-j ACCEPT 6. restart firewall service iptables restart 7. set VNC to automatically start [root @ localhost ~] # Chkconfig vncserver on 8. disable
Vncserver-kill: 1 (note that there must be a space after kill) installation is successful 9. client installation and download and installation after vnc viewer installation is successful the login password is not the login account password but the vnc password
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.