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

[root@server1 ~]# su - srijan
[srijan@server1 ~]$ vncpasswd
Password:<--yourvncpassword
Verify:<--yourvncpassword
[srijan@server1 ~]$

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

[root@server1 ~]# 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 ]
[root@server1 ~]#

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

[root@server1 ~]# su - srijan

[srijan@server1 ~]$ 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

[srijan@server1 ~]$

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.

VNC Server Installation on CentOS 6.5的更多相关文章

  1. CentOS 8 配置 VNC Server

    CentOS 8 配置 VNC Server 2020-12-31 | 标签: centos, vnc 前言 CentOS 8 配置 VNC Server, 使用户可以远程访问,本例介绍安装和配置流程 ...

  2. CentOS 安装VNC Server

    环境 服务器:192.168.10.181 系统:CentOS 6.0 安装过程 1.切换至root用户 2.检测系统是否安装VNC [root@Nginx canyouNgx]# rpm -q vn ...

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

    一.安装相应桌面环境与vnc服务端和客户端: # yum groupinstall "GNOME Desktop Environment"(CentOS 5.x安装GNOME桌面环 ...

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

    http://www.ha97.com/4634.html PS:偶以前基本不用Linux的远程图形桌面,前几天有开发的同事配置CentOS的vnc有问题,找我解决,就顺便记录总结一下,这个总结是比较 ...

  5. CentOS中配置VNC Server

    环境:CentOS 6.4 1.安装tigervnc-server及相关软件 首先检查系统中是否安装tigervnc-server安装包 rpm -qa tigervnc-server 如果没有就直接 ...

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

    something somewhere welcome in there…:) Just another techki site howto / Linux / Lotus Domino 0 Domi ...

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

    VNC概述 VNC (Virtual Network Console)是虚拟网络控制台的缩写.VNC 是一款优秀的远程控制工具软件,由著名的 AT&T 的欧洲研究实验室开发的.VNC 是在基于 ...

  8. Centos自动登录系统并自动打开VNC Server

    系统自动登录 修改配置文件 sudo vim /etc/gdm/custom.conf 增加配置 [daemon] AutomaticLogin=spark AutomaticLoginEnable= ...

  9. 在CentOS 7.6上安装VNC Server

    停止并禁用防火墙 systemctl stop firewalld.service systemctl disable firewalld.service 安装vnxserver yum instal ...

随机推荐

  1. http协议的MP4文件播放问题的分析

    现在手上有两个链接 (1) http://202.108.16.173/cctv/video/8C/35/EB/E8/8C35EBE84E7B483C8741CF9A60154993/gphone/4 ...

  2. bzoj2073

    状压dp 预处理每个状态的初始值,枚举子集就行了 #include<bits/stdc++.h> using namespace std; , inf = ; int W, n; < ...

  3. windows 多mysql 实例

  4. bzoj2730矿场搭建(Tarjan割点)

    2730: [HNOI2012]矿场搭建 Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 1771  Solved: 835[Submit][Statu ...

  5. 浅析SpringDataJpa继承结构

    一.SpringDataJpa的含义: SpringDataJpa: 是Spring基于ORM框架.JPA规范封装的一套JPA应用框架,是SpringData中的一个子模块,可让开发者用极简的代码即可 ...

  6. sql case when 用法

    sql语言中有没有类似C语言中的switch case的语句?? 没有,用case   when   来代替就行了.            例如,下面的语句显示中文年月         select  ...

  7. HDU 1754 Java

    退役后学java... 裸线段树 //By SiriusRen import java.util.*; import java.math.*; public class Main{ public st ...

  8. 自动保存草稿 asp+ajax自动存稿功能详解(转自影子)

    自动保存草稿功能的原理 我们都知道网页是一种无状态的,每次都需要请求,响应,当一次请求完成后就与服务器断开连接了,所以我们不能像网页一样实现实时的交互功能,但是为了满足更多的需求一个比较无敌的程序员还 ...

  9. IIS设置HTTP To HTTPS

    转自: http://www.cnblogs.com/yipu/p/3880518.html 1.购买SSL证书,参考:http://www.cnblogs.com/yipu/p/3722135.ht ...

  10. 研磨JavaScript系列(四):代码的时空

    对于过程式编程来说,代码执行的时间与数据标识的空间是密不可分的.我们只有把指令执行的具体时刻与标识映射的具体地址结合起来,才能确定程序在执行瞬间的上下文状态.于是,代码时刻与数据标识的结构,就形成了作 ...