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. codeforces round #427 div2

    A:读懂题,乘一下判断大小就行了 #include<bits/stdc++.h> using namespace std; int main() { int s, v1, v2, t1, ...

  2. Core Data的那点事儿~

    一.介绍下Core Data CoreData在早些年iOS开发中使用不多,因为其本身性能略低,以及不使用SQL语句而失去的灵活性,再加上FMDB之类封装SQLite的三方框架很好用,所以一直不受待见 ...

  3. node.js的模块引用

    1.模块的引用示例 var      math   =    require(‘math’): 在common.js规范中,存在require()方法,这个方法接受模块标识,此引引入一个模块的api ...

  4. easyui DatagrId 的实例讲解

    下面是代码实现 @{    ViewBag.Title = "人员查找";    ViewBag.LeftWidth = "200px";    ViewBag ...

  5. 51nod 1340 差分约束

    思路: 带未知量的Floyd 很强 http://yousiki.net/index.php/archives/87/ //By SiriusRen #include <bits/stdc++. ...

  6. ACM_整数反转

    整数反转 Time Limit: 2000/1000ms (Java/Others) Problem Description: 给定一个32位int型的整数,把这个整数反着输出,如123,输出321. ...

  7. HTML 表单 存为EXCEL文件时 中文显示乱码

    在做宣传品发放系统时,需求要把数据库查询的记录生成表单并转存excel文件. 在转存的EXCEL文件中文显示乱码,表格和其他字符正常,检查后发现是创建EXCEL文件打开模式不对 之前: myfile ...

  8. JS高级——apply与call

    上下文调用模式 可以修改this的值,也就是可以修改函数的调用方式,apply.call可以修改函数调用上下文,也就是this的值 <script> var name = "莱昂 ...

  9. 4th 循环结构概述和for语句的格式及其使用

    04.01_Java语言基础(循环结构概述和for语句的格式及其使用) A:循环结构的分类 for,while,do...while B:循环结构for语句的格式: for(初始化表达式;条件表达式; ...

  10. C# 设定时间内自动关闭提示框

    通过程序来自动关闭这个消息对话框而不是由用户点击确认按钮来关闭.然而.Net framework 没有为我们提供自动关闭MessageBox 的方法,要实现这个功能,我们需要使用Window API ...