---
title: "vncserver安装"
author: "huiy"
date: "2015-12-13T10:37:05Z"
tags: []
categories: ["操作系统"]
slug: "vncserver"
draft: false
lastmod: "2015-12-13T10:50:33Z"
id: 2263702
url: "https://huiy.iteye.com/blog/2263702"
---

我的环境是centos6.5，如果没有安装桌面，先执行：
# yum groupinstall "X Window System" "Desktop"

# yum install tigervnc-server tigervnc

# vim /etc/sysconfig/vncservers
  最后面加入如下两行：

VNCSERVERS="1:root"
VNCSERVERARGS="-geometry 1024x768 -alwaysshared -depth 24"

# cd /usr/bin
启动
# ./vncserver :1
关闭 -kill 与 :之间必须要有空格
#  /vncserver -kill :1


参考文章：http://www.ha97.com/4634.html，这篇文章写的非常好。我一开始VNC连接之后，看不到桌面，最后经提醒发现是自己造成的，一开始安装系统时没有安装桌面环境。