當前位置:博客首頁>>PC技術 >> 閱讀正文

CentOS6安裝gnome桌面及VNC的配置

作者: 鄭曉 分類: PC技術 發(fā)布于: 2013-03-18 14:45 瀏覽:10,034 沒有評論


之前一直是使用的命令行來運行安裝一些服務,這兩天又弄了臺袖珍VPS來學習一些常見系統(tǒng)(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使用網(wǎng)易的源

#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啟動后監(jiān)聽端口和環(huán)境參數(shù)

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

VNCSERVERS=”1:root”

# 桌面號:用戶 監(jiān)聽 590* 端口 ,也就是使用IP:590*來訪問。

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

5).重啟vncserver服務

#service vncserver restart

//接下來學習一下centos6的VPN服務的配置。

? ? ? ?

本文采用知識共享署名-非商業(yè)性使用 3.0 中國大陸許可協(xié)議進行許可,轉載時請注明出處及相應鏈接。

本文永久鏈接: http://www.yjfs.org.cn/centos6-install-gnome-desktop-and-vnc-configuration.html

發(fā)表評論

change vcode