打造基于CentOS7的xfce最简工作环境[转自smstong,在此记录一下]

3 安装步骤

3.1 执行CentOS7 最小安装

去官网下载CentOS-7.0-1406-x86_64-Minimal.iso,然后刻录光盘,安装之。

修改源

首先备份 CentOS-Base.repo

# sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

# vi /etc/yum.repos.d/CentOS-Base.repo

之后启用 TUNA 软件仓库, 将以下内容写入

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

更新软件包缓存

# yum makecache
安装完成后执行yum update更新系统。

删除多余的内核

1.首先列出系统中正在使用的内核:

# uname -a

2.查询系统中全部的内核:

# rpm -qa | grep kernel

3.将你想删除的内核删除掉:

#yum remove kernel-***

修改启动时间

# vim /etc/default/grub

# grub2-mkconfig -o /boot/grub2/grub.cfg

然后,执行

# yum install epel-release

安装额外包yum源(extra package for Enterprise Linux)。

3.2 安装X Window system

# yum groupinstall "X Window system"

3.3 安装Xfce4

# yum groupinstall xfce

# startxfce4

3.4 安装中文字体和中文输入法

# yum install cjkuni-ukai-fonts

【增加字体】

把Windows系统下C:\Windows\Fonts目录下需要的字体文件复制到CentOS的/usr/share/fonts/chinese/目录下,

然后执行如下命令即可安装这些字体:

# cd /usr/share/fonts/chinese/

# fc-cache -fv

# fc-list

【中文输入法】

# yum install ibus ibus-libpinyin

# ibus-setup

默认启动在用户根目录下 .bashrc中添加

export GTK_IM_MODULE=ibus

export XMODIFIERS=@im=ibus

export QT_IM_MODULE=ibus

ibus-daemon -drRx

 

设置图形界面启动

systemctl set-default graphical.target

安装VirtualBox Addon
  • yum install -y bzip2 gcc gcc-devel gcc-c++ gcc-c++-devel make kernel kernel-devel
    
    mount /dev/cdrom /media
    
    cd /media
    
    ./VBoxLinuxAdditions.run
    
    sudo usermod -a -G vboxsf $USER

----------以下是我加的----

3.5 xfce 字体美化

$ yum install http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

$ yum update

$ yum install freetype-infinality

$ ./etc/fonts/infinality/infctl.sh setstyle

选择 6)win7

设置自动登录

简单来说就是:vi /etc/gdm/custom.conf

然后在[daemon]下面添加:

[daemon]
AutomaticLoginEnable=True
AutomaticLogin=root  #你想自动登录的用户名

保存并重启,重启的时候已经以root用户登录了。
 

安装vnc

yum install -y tigervnc-server
echo 'VNCSERVERS="1:root"' > /etc/sysconfig/vncservers
echo 'VNCSERVERARGS[1]="-geometry 1280x960"' >> /etc/sysconfig/vncservers
vncserver 设置密码
vncpasswd 修改密码

echo '#!/bin/sh' > ~/.vnc/xstartup
echo '/usr/bin/startxfce4' >> ~/.vnc/xstartup

 

启动

开启三个vnc窗口

for i in `seq 1 3`; do vncserver -kill :$i; vncserver :$i;done

 

  • 4
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值