Centos7 minimal 安装 配置

  • 选择minimal就是想避开沉重的桌面(当然,也可以使用developer等其他的安装方式,之后卸载桌面即可),并且minimal几百M的安装大小携带方便,安装快捷,
  • 使用Vmware安装,直接跟着指示 next即可
  • 配置主要是网络
    • 由于是minimal形式,所以没有ifconfig,wget等命令
    • 先通过ip addr 来查看网络的情况,获取本机的网卡名称
    • 之后利用vi编辑/etc/sysconfig/network-scripts/ifcfg-网卡名
      • BOOTPROTO=dhcp
      • ONBOOT=yes
      • 保存退出
    • 重新启动网络 
      • service network restart 也可以用 systemctl重启 其实是一样的
    • 这时候就可以上网了
  • yum install wget 安装wget
  • 配置 网络源
    • 安装yum yum-plugin-priorities保证优先级有效
    • mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    • wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
    • yum clean all
    • yum makecache
    • rpm -Ubh http://mirrors.opencas.cn/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
    • 并对上面两个repo进行编辑 在每个字段的后面增加priority=2
      • [epel]
      • name=Extra Packages for Enterprise Linux 7 - $basearch
      • #baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
      • mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
      • failovermethod=priority
      • enabled=1
      • gpgcheck=1
      • gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
      • priority=2
      • [epel-debuginfo]
      • name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
      • #baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
      • mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
      • failovermethod=priority
      • enabled=0
      • gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
      • gpgcheck=1
      • priority=2
      • ..
  • 配置本地源
    • mount -t auto /dev/cdrom /media/CentOS/
    • 在/etc/yum.repos.d/CentOS-Media.repo
      • 编辑
      • [c7-media]
      • name=CentOS-$releasever - Media
      • baseurl=file:///media/CentOS
      • enabled=1
      • gpgcheck=1
      • gpgkey=file:///media/CentOS/RPM-GPG-KEY-CentOS-7
      • priority=1
    • yum clean all
    • yum makecache
    • 这样就会优先查找本地的源,找不到之后才会查找网络源
    • 当然也可以根据需要添加其他源,这里不再赘述
    • 注意,网络源和本地源无法同时使用,如果使用本地源需要将网络源的"enabled=0"
  • 当然不安装kde和gnome,安装个Xfce4
    • yum groupinstall  Xfce
    • systemctl isolate graphical.target
    • systemctl get-default //查看当前的默认启动级别 Centos 6 以及之前是通过runlevel 来定义,7之后则用target
      • multi-user.target//级别3
      • graphical.target//级别5
    • systemctl set-default graphical.target //默认操作系统启动进入桌面,如果不需要的话
  • 修改语言
    • 在/etc/profile中查找export PATh
    • 在这一行的上面插入LANG="zh_CN.UTF-8"
    • 在这一行的后面追加LANG
      • export PATH...LANG
    • yum install cjkuni-ukai-fonts 安装中文字体
  • 安装ifconfig
    • 由于vmtools的安装需要ifconfig,所以我们再次安装上ifconfig
    • yum install net-tools
  • 安装Terminal
    • yum install xfce4-terminal
    • 设置默认的terminal
      • ->在桌面的Applications Menu
      • ->Settings
      • ->Preferred Applications
      • ->Utilities
      • ->Terminal Emulator 选择 Xfce Terminal
  • 安装火狐浏览器
    • yum install firefox
  • 然后安装说其他所需要的软件即可
  • 参考:http://blog.csdn.net/smstong/article/details/44802989#33-安装xfce4
posted @ 2015-08-23 16:27  劈马砍柴  阅读(814)  评论(0编辑  收藏  举报