Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and configure VNC in CentOS 6.5system

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to install and configure VNC in the CentOS 6.5. it has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.

First, install VNC

By default, CentOS 6.4 is not installed.

To check if it is installed, enter:

[root@localhost] # rpm-Q vnc vnc-server

Get:

Package vnc is not installed

Prompt that there is no installation, then start the installation, type:

[root@localhost ~] # yum install vnc vnc-server

2. Set VNC password

You need to start VNC after the installation is complete, or Centos will still report that VNC is not installed if you perform the first step.

[root@localhost ~] $vncserver

Set the VNC password and enter: (if you enter it under a certain user, the login user is it. If su imiss switches to the imiss user, enter vncserver to start another desktop, and also set the password. Later, if you start vncserver login under this account, you need to set the password under this user. )

You will be prompted for your password because it is configured for the first time. Repeat the input twice.

[root@localhost ~] $vncpasswd

Password:

Verify:

Configure the desktop type

[root@localhost] $vi ~ / .vnc/xstartup

In general, the Linux desktop we use is a "Gnome" desktop, so we are used to configuring this desktop.

Press the "I" key to enter the editing state, mainly modifying the last two lines. Change to:

# xterm-geometry 80x24+10+10-ls-title "$VNCDESKTOP Desktop" &

# twm &

Gnome-session &

Focus on editing the last two lines and get rid of the comments to get:

Configure login account, desktop resolution and connection method

Enter:

[root@localhost ~] # vi / etc/sysconfig/vncservers

Modify the last two lines

VNCSERVERS= "1:root"

VNCSERVERARGS [1] = "- geometry 1024x768"

Configure the firewall to allow VNC connections

The port on which VNC server listens starts at 5900, the display:1 listens on 5901, and so on. Display:1 listens on 5902. CentOS's firewall does not allow connections to these ports by default, so you need to use the following steps to turn on the firewall (root permission is required):

Enter and edit:

[root@localhost ~] # vi / etc/sysconfig/iptables

We have only added a root account and desktop 1 above, so here we can add a "5901" port number according to the above rules.

-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 5901-j ACCEPT

Restart the firewall

Service iptables restart

7. Set VNC to start automatically

[root@localhost ~] # chkconfig vncserver on

VIII. Close

Vncserver-kill: 1 (note that there is a space after kill)

Installation succeeded

IX. Client installation

Download and install vnc viewer

Log in after successful installation

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

Thank you for reading this article carefully. I hope the article "how to install and configure VNC in CentOS 6.5 system" shared by the editor will be helpful to everyone. At the same time, I also hope you can support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report