美创科技技术社区

注册

 

发新话题 回复该主题

linux 6.5-VNC配置 [复制链接]

1#










1.1设置root用户vncserver环境

注意:RHEL6默认不安装vnc的软件包,同时RHEL6更换了vnc的软件包为:tigervnc-server,tigervnc。

所有节点配置vncserver环境,以节点1-jyrac1为例:

1.1.1安装tigervnc-server,tigervnc软件包

[root@jyrac1 ~]# mount -o ro /dev/sr0 /mnt

[root@jyrac1 ~]# rpm –import /mnt/RPM-GPG-KEY-redhat-release

[root@jyrac1 ~]# vi /etc/yum.repos.d/local_rhel6.repo

[local_rhel6]

name=local_rhel6

baseurl=file:///mnt/

enabled=1

gpgcheck=0

[root@jyrac1 ~]# yum clean all

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Cleaning repos: InstallMedia local_rhel6

Cleaning up Everything

[root@jyrac1 ~]# yum install tigervnc tigervnc-server

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

local_rhel6                                                                             | 3.9 kB     00:00 …

local_rhel6/primary_db                                                                 | 3.1 MB     00:00 …

Setting up Install Process

Resolving Dependencies

–> Running transaction check

—> Package tigervnc.x86_64 0:1.1.0-5.el6_4.1 will be installed

—> Package tigervnc-server.x86_64 0:1.1.0-5.el6_4.1 will be installed

–> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================

Package                      Arch                Version                       Repository                Size

===============================================================================================================

Installing:

tigervnc                     x86_64              1.1.0-5.el6_4.1               local_rhel6              257 k

tigervnc-server              x86_64              1.1.0-5.el6_4.1               local_rhel6              1.1 M

Transaction Summary

===============================================================================================================

Install       2 Package(s)

Total download size: 1.4 M

Installed size: 3.5 M

Is this ok [y/N]: y

Downloading Packages:

—————————————————————————————————————

Total                                                                          64 MB/s | 1.4 MB     00:00    

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing : tigervnc-server-1.1.0-5.el6_4.1.x86_64                                                     1/2

  Installing : tigervnc-1.1.0-5.el6_4.1.x86_64                                                             2/2

local_rhel6/productid                                                                  | 1.7 kB     00:00 …

  Verifying : tigervnc-1.1.0-5.el6_4.1.x86_64                                                            1/2

  Verifying : tigervnc-server-1.1.0-5.el6_4.1.x86_64                                                     2/2

Installed:

  tigervnc.x86_64 0:1.1.0-5.el6_4.1                  tigervnc-server.x86_64 0:1.1.0-5.el6_4.1                

Complete!

1.1.2启动vncserver服务,第一次启动设置密码:

[root@jyrac1 ~]# vncserver

You will require a password to access your desktops.

Password:

Verify:

xauth:  creating new authority file /root/.Xauthority

New 'jyrac1:1 (root)' desktop is jyrac1:1

Creating default startup script /root/.vnc/xstartup

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/jyrac1:1.log

这里设置的root用户vnc密码和操作系统root用户密码一致。

1.1.3编辑vncserver默认启动脚本配置文件 /root/.vnc/xstartup

关闭vncserver进程

[root@jyrac1 ~]# vncserver -kill :1

Killing Xvnc process ID 2555

修改vnc配置危机/root/.vnc/xstartup:

[root@jyrac1 ~]# vi /root/.vnc/xstartup

注释最后一行:

#twm &

添加下面一行:

gnome-session &

1.1.4启动的vncserver

启动vncserver进程

[root@jyrac1 ~]# vncserver

New 'jyrac1:1 (root)' desktop is jyrac1:1

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/jyrac1:1.log

注意:每次服务器重启后都需要重新启动vncserver的进程。

1.1.5使用vnc-viewer连接服务器

运行vnc客户端程序VNC-Viewer-5.1.0-Windows-64bit.exe或VNC-Viewer-5.1.0-Windows-32bit.exe:

输入需要连接服务器的<服务器主机名对应IP>:<vnc桌面端口号>

点击"Connect"按钮

输入vncserver第一次启动时设置的密码:rootroot

点击"OK"按钮

RHEL6.5 vnc桌面登陆后的界面


分享 转发
TOP
发新话题 回复该主题