当前位置:博客首页>>PC技术 >> 阅读正文

CentOS6安装gnome桌面及VNC的配置

作者: 郑晓 分类: PC技术 发布于: 2013-03-18 14:45 浏览:9,814 没有评论


之前一直是使用的命令行来运行安装一些服务,这两天又弄了台袖珍VPS来学习一些常见系统(centos、debian、ubuntu)的使用。今天搞的是Centos6的gnome桌面安装及vnc远程桌面访问。
一、首先需要配置163的yum源

1.导入CentOS-6的GPG证书

#rpm –import http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

2.让yum使用网易的源

#cd /etc/yum.repos.d/

#wget http://mirrors.163.com/.help/CentOS-Base-163.repo

3.修改repo文件

在所有mirrorlist前面加上#,把所有$releasever替换成6,保存

#sed -i ‘/mirrorlist/d’ CentOS-Base-163.repo

#sed -i ‘/\[addons\]/,/^$/d’ CentOS-Base-163.repo

#sed -i ‘s/\$releasever/6/’ CentOS-Base-163.repo

#sed -i ‘s/RPM-GPG-KEY-CentOS-5/RPM-GPG-KEY-CentOS-6/’ CentOS-Base-163.repo

4.清理并重新生成yum缓存

#yum clean metadata

#yum makecache

二.安装gnome图形化桌面

#yum groupinstall -y “X Window System”

#yum groupinstall -y “Desktop”

#yum groupinstall -y “Chinese Support”

三.安装vncserver并配置

1.安装vncserver

#yum install -y tigervnc-server

2.配置vncserver

1).配置为开机自启动

#chkconfig –level 345 vncserver on

2).配置vnc密码

#vncserver

You will require a password to access your desktop.

Password:

Verify:

3).配置为使用gnome桌面

修改 /root/.vnc/xstartup文件,把最后的 twm & 删掉 加上 gnome-session &。

4).配置vncserver启动后监听端口和环境参数

修改/etc/sysconfig/vncservers 文件添加以下内容

VNCSERVERS=”1:root”

# 桌面号:用户 监听 590* 端口 ,也就是使用IP:590*来访问。

VNCSERVERARGS[1]=”-geometry 1200×800″

5).重启vncserver服务

#service vncserver restart

//接下来学习一下centos6的VPN服务的配置。

       

本文采用知识共享署名-非商业性使用 3.0 中国大陆许可协议进行许可,转载时请注明出处及相应链接。

本文永久链接: https://www.zh30.com/centos6-install-gnome-desktop-and-vnc-configuration.html

发表评论

change vcode