Install VNC_seerver in CentOS 6.4

Source: Internet
Author: User

Install VNC_seerver in CentOS 6.4
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. Set the VNC Password

After the installation is complete, you need to start VNC first. Otherwise, the first Centos still reports that the 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 &

Edit the last two lines and remove the comments of the two lines:

Iv. Configure the Logon account, desktop resolution, and connection mode
Input:
[Root @ localhost ~] # Vi/etc/sysconfig/vncservers

Modify the last two rows

VNCSERVERS = "1: root"
VNCSERVERARGS [1] = "-geometry 1024x768"

5. configure the 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 ~] # Vi/etc/sysconfig/iptables

Only one root account and one desktop 1 are added. Therefore, add a "5901" port according to the above rules.

-A input-m state -- state NEW-m tcp-p tcp -- dport 5901-j ACCEPT

6. Restart the Firewall

Service iptables restart

VII. Set VNC to automatically start

[Root @ localhost ~] # Chkconfig vncserver on

8. Disable
Vncserver-kill: 1 (Note that there must be a space behind kill)

Installed successfully

9. Client installation

Download and install vnc viewer

Log in after successful installation

192.168.10.1: 5901

Then the password will pop up. The password is the password just set.

The password is not the login account password but the password set by vnc.

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.