RedHat使用自带的yum源是需要注册的,不想注册的可以替换本地源使用
工控机型号:QOTOM 190G4-M
系统: Red Hat Enterprise Linux Server release 6.7 (Santiago) x86_64
Red Hat Enterprise Linux ISO 镜像下载:
https://wanghualang.pipipan.com/dir/13133650-26232498-a8efb3/
软件包下载地址:
x86 地址:http://mirrors.163.com/centos/6/os/i386/Packages/
x64 地址:http://mirrors.163.com/centos/6/os/x86_64/Packages/
替换centos6源
- 卸载yum源
rpm -qa|grep yum|xargs rpm -e --nodeps
- 安装yum软件包
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
- 更改yum源 ,编辑CentOS6-Base-163.repo文件,存放到/etc/yum.repo.d
[base]
name=CentOS-6 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-6 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-6 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
- 清除缓存文件及目录
yum clean all
- 获取yum列表
yum makecache
图形界面安装
- 查看当前系统运行级别
runlevel
- 查看桌面环境的组件
yum grouplist|more
- 安装GNOME图形界面
yum groupinstall “X Window System” -y
yum groupinstall “Desktop” -y
安装成功后输入startx,或者init 5, 即可切换到图形界面(临时生效) 修改/etc/inittab文件中的id:3:initdefault将3改为5(永久生效)
卸载图形化界面
利用组卸载命令 yum groupremove + 组包名即可,其中组包名就是我们之前上面安装的。