VNC的安装

VNCSERVER安装

1.yum install vnc-server

如果是tplink的Yum源 则这样安装只是安装了以下包

tigervnc-server-module-1.1.0-16.el6.centos.x86_64

需要去其它镜像源(例如:mirror.163.com下载

 

tigervnc-server-1.1.0-16.el6.x86_64.rpm

file0001.jpg

在安装tigervnc之前需要安装

       xorg-x11-fonts-misc

yum install xorg-x11-fonts-misc

rpm �Civh tigervnc-server-1.1.0-16.el6.x86_64.rpm

 

安装完成后

#vncserver

[root@SMB3 system]# vncserver

 

You will require a password to access your desktops.

 

Password:输入登录密码

Verify:重复输入登录密码

xauth:  creating new authority file /root/.Xauthority

 

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

 

Creating default startup script /root/.vnc/xstartup

Starting applications specified in /root/.vnc/xstartup

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

 

配置vncserver

vim /etc/sysconfig/vncserver

# The VNCSERVERS variable is a list of display:user pairs.

#

# Uncomment the lines below to start a VNC server on display :2

# as my 'myusername' (adjust this to your own).  You will also

# need to set a VNC password; run 'man vncpasswd' to see how

# to do that. 

#

# DO NOT RUN THIS SERVICE if your local area network is

# untrusted!  For a secure way of using VNC, see this URL:

# https://access.redhat.com/knowledge/solutions/7027

 

# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

 

# Use "-localhost" to prevent remote VNC clients connecting except when

# doing so through a secure tunnel.  See the "-via" option in the

# `man vncviewer' manual page.

 

VNCSERVERS="2:root"    //取消注释并填写用来登录桌面的系统用户

  VNCSERVERARGS[2]="-geometry 1024x768 -nolisten tcp -localhost"  //定义窗口的分辨率

 

修改远程显示配置文件

sed -i 's/twm/gnome-session/g'/root/.vnc/xstartup

 

重启vncserver

#vnvserver

root@SMB3 ~]# vncserver

New 'SMB3:2 (root)' desktop is SMB3:2  

 //注意数字2.为端口号,在客户端登录方式为 ip:2

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/SMB3:2.log

 

(ps:需要关闭防火墙和禁用selinux)


你可能感兴趣的:(linux,远程桌面,vnc)