centos6.8安装xfce+vnc

linux环境

[[email protected] ~]# uname -a
Linux server1.52chenqi.cn 4.10.5-1.el6.elrepo.x86_64 #1 SMP Wed Mar 22 14:55:33 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] ~]# cat /etc/issue
CentOS release 6.9 (Final)
Kernel \r on an \m

安装xfce

1.yum upgrade

[[email protected] ~]# yum upgrade
Loaded plugins: fastestmirror
Setting up Upgrade Process
Loading mirror speeds from cached hostfile
 * base: mirrors.syringanetworks.net
 * elrepo-kernel: repos.lax-noc.com
 * extras: mirror.hostduplex.com
 * updates: repos-lax.psychz.net

2.yum install -y wget

[[email protected] ~]# yum install -y wget
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.tocici.com
 * elrepo-kernel: repos.lax-noc.com
 * extras: mirror.hostduplex.com
 * updates: repos-lax.psychz.net
Package wget-1.12-10.el6.x86_64 already installed and latest version
Nothing to do

我已经装过了
3.wget http://www.rpmfind.net/linux/centos/6.9/extras/x86_64/Packages/epel-release-6-8.noarch.rpm

[[email protected] ~]# wget http://www.rpmfind.net/linux/centos/6.9/extras/x86_64/Packages/epel-release-6-8.noarch.rpm
--2018-05-31 09:40:29--  http://www.rpmfind.net/linux/centos/6.9/extras/x86_64/Packages/epel-release-6-8.noarch.rpm
Resolving www.rpmfind.net... 195.220.108.108
Connecting to www.rpmfind.net|195.220.108.108|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14540 (14K) [application/x-rpm]
Saving to: “epel-release-6-8.noarch.rpm”

100%[======================================>] 14,540      88.7K/s   in 0.2s

2018-05-31 09:40:30 (88.7 KB/s) - “epel-release-6-8.noarch.rpm” saved [14540/14540]

4.rpm -ivh epel-release-6-8.noarch.rpm

[[email protected] ~]# rpm -ivh epel-release-6-8.noarch.rpm
Preparing...                ########################################### [100%]
        package epel-release-6-8.noarch is already installed

5.如果已经安装了epel-release,请先卸载,再重新安装
# rpm -e epel-release
# rpm -ivh epel-release-6-8.noarch.rpm

[[email protected] ~]# rpm -e epel-release
warning: /etc/yum.repos.d/epel.repo saved as /etc/yum.repos.d/epel.repo.rpmsave
[[email protected] ~]# rpm -ivh epel-release-6-8.noarch.rpm
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]

6.安装xfce yum groupinstall xfce

[[email protected] ~]# yum groupinstall xfce
Loaded plugins: fastestmirror
Setting up Group Process
Loading mirror speeds from cached hostfile
 * base: repos.forethought.net
 * elrepo-kernel: repos.lax-noc.com
 * epel: mirrors.develooper.com
 * extras: mirror.hostduplex.com
 * updates: repos-lax.psychz.net
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
--> Running transaction check
---> Package NetworkManager-gnome.x86_64 1:0.8.1-113.el6 will be installed
--> Processing Dependency: NetworkManager-glib = 1:0.8.1-113.el6 for package: 1:NetworkManager-gnome-0.8.1-113.el6.x86_64
--> Processing Dependency: NetworkManager = 1:0.8.1-113.el6 for package: 1:NetworkManager-gnome-0.8.1-113.el6.x86_64
--> Processing Dependency: libnotify >= 0.4.3 for package: 1:NetworkManager-gnome-0.8.1-113.el6.x86_64
.......

7.安装vnc yum install vnc vnc-server

[[email protected] ~]# yum install tigervnc-server
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.syringanetworks.net
 * elrepo-kernel: repos.lax-noc.com
 * epel: mirrors.develooper.com
 * extras: mirror.hostduplex.com
.........

8.配置VNC系统及分辨率

vi /etc/sysconfig/vncservers

然后在内容中添加

VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768"

上面的分辨率可以根据我们自己的需要修改,比如可以改成800x600等。
9.设置VNC密码 vncserver

[[email protected] ~]#  vncserver

You will require a password to access your desktops.

Password:
Verify:
xauth:  file /root/.Xauthority does not exist

New ‘server1.52chenqi.cn:1 (root)‘ desktop is server1.52chenqi.cn:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/server1.52chenqi.cn:1.log

10.修改xstartup配置文件

vi /root/.vnc/xstartup

所有内容都替换成:

#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop"&
#twm &
startxfce4 &

11.设置权限以及重启VNC/设置开机启动

service vncserver restart
chkconfig vncserver on

原文地址:http://blog.51cto.com/9552815/2122635

时间: 2024-10-07 05:48:46

centos6.8安装xfce+vnc的相关文章

centos6 下安装xfce+vnc

CentOS 安装图形界面的过程,简单记录一下.这里提供了两种图形界面的安装,分别是CentOS自带的gnome桌面及轻巧的xfce.据测试,我的精简版CentOS 6 64位系统安装gnome需要下载522M的文件,而安装xfce仅需下载89M的文件.下面分别介绍安装方法: 1,安装gnome桌面 [[email protected] ~]# yum groupinstall "GNOME Desktop Environment" (适合Centos 5) [[email prote

centos下安装xfce+vnc

首先安装桌面环境,我选择的是xfce,轻量级桌面,小巧实用不占太多内存,(占用内存方面,xfce少于kde,kde少于gnome). 安装xfce桌面一开始我以为第三方的软件源如rpmforge等应该会包含xfce桌面的,结果竟然木有包含,实在是有点儿意外. 根据系统版本打开相应的链接:CentOS 5 32位:http://download.fedoraproject.org/pub/epel/5/i386/CentOS 5 64位:http://download.fedoraproject.

CentOS:Xfce+VNC安装

准备构建一个VirtualBox虚拟机模板,当然是CentOS了,当前最新为6.6x86_64. 1.安装minimal版本,不安装任何其他包,磁盘新建为50G动态划分,选用LVM默认创建的逻辑卷,网卡桥接,网络配置为静态IP 2.安装完成后进入系统,执行系统更新 yum upgrade 3.安装EPEL源 yum install wget wget http://mirrors.hustunique.com/epel/6/x86_64/epel-release-6-8.noarch.rpm r

Ubuntu 18.04 安装 Xfce桌面和VNC的方法

首先安装Xfce4桌面环境.Xfce4是在Unix和Unix-like(Linux, FreeBSD)上运行的开源桌面环境,其特点是快速,轻量,同时拥有美观的交互界面,易于使用. Xfce4的安装十分简单,运行如下命令即可. 安装Xfce sudo apt-get install xfce4 安装VNCServer sudo apt-get install vnc4server # #注意:我安装的是 vnc4server 而非 tightvncserver 服务. 设置密码并运行vncserv

Centos6.3安装KVM

一.安装kvm 1 在安装CentOS6.3时可以选择安装好kvm 2 如果未安装好kvm,请按照下列方式安装 [创建本地yum源] 挂载iso文件mount -o loop -t iso9660 CentOS-6.3-x86_64-bin-DVD1.iso /mnt 设置本地yum源在/etc/yum.repos.d/创建   "任意文件名.repo"    文件  vi 刚才新建的文件名编辑[localyum]任意名称 ,不能有空格.name= local yum  任意名称bas

Centos6.5安装kvm虚拟化

Centos6.5安装kvm虚拟化 KVM简介:1.KVM是开源软件,全称是kernel-based virtual machine(基于内核的虚拟机).2.是x86架构且硬件支持虚拟化技术(如 intel VT 或 AMD-V)的Linux全虚拟化解决方案.3.KVM能在不改变linux或windows镜像的情况下同时运行多个虚拟机,(它的意思是多个虚拟机使用同一镜像)并为每一个虚拟机配置个性化硬件环境(网卡.磁盘.图形适配器--) 一.设置虚拟机支持虚拟化 二.先关闭防火墙和selinux

如何在CentOS6上安装Python2.7和Python3.3

原文来自http://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/,个人觉得对在linux安装新版本Python是很有参考意义,因而转载,原文是英文的,本人简单翻译下,大家看懂即可,有不妥的地方请留言. 如何在CentOS 6上同时安装Python 2.7和Python 3.3 本文将介绍如何在CentOS 6上安装Python 2.7和3.3.下面以Python 2.7.6和Python 3.3.5为例进行说明,但本人实

ubuntu10.10安装使用vnc

原文发表于:2010-12-15转载至cu于:2012-07-21 搭安全试验的环境,在vmware上安装了ubuntu10.10(大学的时候用过,最早用的好像是6系列吧).安装好后想用远程桌面控制,毕竟在vmware上看到的界面比较小,不太方便. 使用的是vnc, 相关信息请看http://www.realvnc.com/ 在安装上vnc,做了一些配置(vnc使用gnome-seeion启动)后,使用时出了两个问题: 1. 从远端使用vncviewer连接上后,只有一个终端,没有图形界面,有"

centos6.5安装docker

centos6.5 安装docker 防伪码:吃的苦中苦,方为人上人! 前言:在当今的主流社会中,docker和openstatick是一大主流方向,下面为大家讲解理论知识和实际操作现实中的docker! 理论知识: 相信大家都知道docker是什么?那在这里就不多说了! Docker 基于 Go 语言开发,代码托管在Github上,并遵循Apache 2.0 开源协议. docker的专业叫法是应用容器(Application Container). 为什么要使用docker? 1 .快速交付