VNC Server Installation on CentOS 6.5

In my case I have a fresh installed CentOS6.5 Server on which I will be installing the VNC-server so that I can access the CentOS server with GUI. You can follow the guide for the basic installation of the CentOS server till Chapter 7. Please don‘t install the Development Tools. All of the cases are same as per the guide. My details are as follows:

IP address 192.168.0.100
Gateway 192.168.0.1
DNS     8.8.8.8    8.8.4.4
Hostname server1.example.com

VNC-server benefits

  • Remote GUI administration makes work easy & convenient.
  • Clipboard sharing between host CentOS server & VNC-client machine.
  • GUI tools can be installed on the host CentOS server to make the administration more powerful
  • Host CentOS server can be administered through any OS having the VNC-client installed.
  • More reliable over ssh graphics.
  • More reliable over RDP connections.

2 Installation

I am logged in my system with root, & now I will be installing the VNC-server.

yum groupinstall Desktop

Further install

yum install gnome-core xfce4 firefox

yum install tigervnc-server

Now make the service on after every reboot

chkconfig vncserver on

3 Adding VNC user

In my case I am using user=srijan it will differ in your case. You can use any username for the same.

useradd srijan

Now I will assign the vncpassword for the user with the user I just created before as:

su - srijan

vncpasswd

[[email protected] ~]# su - srijan
[[email protected] ~]$ vncpasswd
Password:<--yourvncpassword
Verify:<--yourvncpassword
[[email protected] ~]$

Now I will make the configuration file for the vncserver  by creating file as follows:

vi /etc/sysconfig/vncservers

Give the entries like this.

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

Here your port comes to be 5901 & 1024x768 resolution for the VNC client, you can choose resolution of your own choice.

Now I will restart the VNC server service as root user:

service vncserver restart

[[email protected] ~]# service vncserver restart
Shutting down VNC server:                                  [  OK  ]
Starting VNC server: 1:srijan xauth:  creating new authority file /home/srijan/.Xauthority

New ‘server1.example.com:1 (srijan)‘ desktop is server1.example.com:1

Creating default startup script /home/srijan/.vnc/xstartup
Starting applications specified in /home/srijan/.vnc/xstartup
Log file is /home/srijan/.vnc/server1.example.com:1.log

                                                           [  OK  ]
[[email protected] ~]#

Now to make the changes affective I will kill VNC & do some more configurations as follows:

pkill vnc

Open the file comment the line #twm & & add the line exec gnome-session as follows:

vi /home/srijan/.vnc/xstartup

#!/bin/sh

[ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
export LANG
export SYSFONT
vncconfig -iconic &
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=`uname -s`
if [ $OS = ‘Linux‘ ]; then
  case "$WINDOWMANAGER" in
    *gnome*)
      if [ -e /etc/SuSE-release ]; then
        PATH=$PATH:/opt/gnome/bin
        export PATH
      fi
      ;;
  esac
fi
if [ -x /etc/X11/xinit/xinitrc ]; then
  exec /etc/X11/xinit/xinitrc
fi
if [ -f /etc/X11/xinit/xinitrc ]; then
  exec sh /etc/X11/xinit/xinitrc
fi
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
exec gnome-session &

& Finally reboot the machine.

reboot

4 VNC Client

At client end my OS is Ubuntu14.04 with vino installed on my client
machine. Otherwise you can install any VNC-client of your choice. In
case other OS say windows-7 you can install Realvnc-client or any other
of your choice.

Again start the vncservice with the user srijan:

su - srijan

vncserver

[[email protected] ~]# su - srijan

[[email protected] ~]$ vncserver

New ‘server1.example.com:1 (srijan)‘ desktop is server1.example.com:1

Starting applications specified in /home/srijan/.vnc/xstartup

Log file is /home/srijan/.vnc/server1.example.com:1.log

[[email protected] ~]$

Now I am going to connect with the VNC server through my VNC-client

It will prompt for the password as follows:

Put yourvncpassword the same which you gave at the time of adding the user srijan.

Now
you are connected with the CentOS6.5 Server. In case you want to add
more users to access the vnc-console you need to add the user, assign
the vncpassword for the new-user as mentioned above & append the
entry in the file as:

vi /etc/sysconfig/vncservers

For instance I am using user kishore, entries will be like this

[..]

VNCSERVERS="2:kishore"
VNCSERVERARGS[2]="-geometry 1024x768"

This will enable user kishore to get the access to the VNC-server with the port 5902. In the same way you can add the root user also.

Congrats you have configured the VNC-server successfully :)

Copyright © 2014 howtoforge
All Rights Reserved.

时间: 2024-10-21 20:35:06

VNC Server Installation on CentOS 6.5的相关文章

CentOS中配置VNC Server

环境:CentOS 6.4 1.安装tigervnc-server及相关软件 首先检查系统中是否安装tigervnc-server安装包 rpm -qa tigervnc-server 如果没有就直接安装 yum install tigervnc-server* 2.修改vncserver的配置文件,配置用户及分辨率 vncserver的配置文件/etc/sysconfig/vncservers 参照最后两行注释,对应自己的设置,添加新的两行 VNCSERVERS="2:test" V

Configure VNC Server on CentOS 7 / RHEL 7

The following simple guide help you to setup the VNC server on RHEL 7/CentOS 7 machines, VNC help to share the desktop with the other machines which has a client installed. VNC server and client are not installed by default, you need to setup the vnc

CentOS 下 VNC Server 的配置与使用

VNC 是一款优秀的远程控制工具软件.由著名的 AT&T 的欧洲研究实验室开发的.VNC 是在基于 UNIX 和 Linux 操作系统的免费的开源软件,远程控制能力强大,高效有用,其性能能够和 Windows 和 MAC 中的不论什么远程控制软件媲美. 在 Linux 中.VNC 包含下面四个命令:vncserver.vncviewer,vncpasswd,和 vncconnect. 大多数情况下用户仅仅须要当中的两个命令:vncserver 和 vncviewer. 1.命令描写叙述 vncs

CentOS Linux下VNC Server远程桌面配置详解

http://www.ha97.com/4634.html PS:偶以前基本不用Linux的远程图形桌面,前几天有开发的同事配置CentOS的vnc有问题,找我解决,就顺便记录总结一下,这个总结是比较完整的.下面的配置在CentOS5.x和6.x.SUSE企业版亲测验证,其他发行版按理也通用: 一.安装相应桌面环境与vnc服务端和客户端: # yum groupinstall "GNOME Desktop Environment"(CentOS 5.x安装GNOME桌面环境) # yu

Domino Server installation on Linux (Centos or Redhat) – something somewhere

something somewhere welcome in there-:) Just another techki site howto / Linux / Lotus Domino 0 Domino Server installation on Linux (Centos or Redhat) by nicolas · 30/07/2012 I have been struggling a little, on the configuration steps until I figured

CentOS 7 部署VNC Server

介绍 VNC是Virtual Network Console(虚拟网络控制台)的缩写.由著名的AT&T的欧洲研究实验室开发的一款开源软件.它是一款优秀的远程控制工具软件,其主作用就是访问服务器的图形界面,并且支持多个用户访问. 它的远程控制能力强大,高效实用,其性能可以和Windows和MAC中的其它远程控制软件相媲美. VNC由两部分组成服务器端和客户端.VNC Server是在可以运行在Linux.UNIX.Windows等多种操作系统上,客户端组件VNC Viewer也有多种平台上的版本.

How to install VNC server on CentOS 6

参考: https://rbgeek.wordpress.com/2012/06/26/how-to-install-vnc-server-on-centos-6/ VNC is a protocol that is used to share the desktop with other users/computers over the network/Internet.In order to share a desktop, VNC server must be install and co

(总结)CentOS Linux下VNC Server远程桌面配置详解

PS:偶以前基本不用Linux的远程图形桌面,前几天有开发的同事配置CentOS的vnc有问题,找我解决,就顺便记录总结一下,这个总结是比较完整的.下面的配置在CentOS5.x和6.x.SUSE企业版亲测验证,其他发行版按理也通用: 一.安装相应桌面环境与vnc服务端和客户端:# yum groupinstall "GNOME Desktop Environment"(CentOS 5.x安装GNOME桌面环境)# yum groupinstall "X Window Sy

在Centos 7上安装VNC server

VNC是个比较不错的远程工具,无论基于Windows平台或Linux平台,由于最近在学习Centos的相关知识,所以准备在Centos 7上搭建一个VNC server便于我从客户端机器通过VNC viewer来远程连接操作. 如果你没有安装桌面环境(X Windows),可以使用以下命令来安装,大概花费几分钟时间来安装此packages. [[email protected] ~]# yum check-update [[email protected] ~]# yum groupinstal