centos7上传镜像做本地yum源安装GUI

1、上传镜像到centos虚拟机上,注意镜像的everything的版本

centos7上传镜像做本地yum源安装GUI

2、创建文件夹,将镜像挂在在这个文件夹下

centos7上传镜像做本地yum源安装GUI

3、进入yum源目录/etc/yum.repos.d,清空目录下文件,创建新yum仓库文件,写入如下内容

centos7上传镜像做本地yum源安装GUI

[[email protected] yum.repos.d]# cat yum.repo
[centos7]
name=centos7
baseurl=file:///home/XX/centos7
enabled=0
gpgcheck=0

4、执行yum clean all提示enable,再执行 yum-config-manager --enable 

centos7上传镜像做本地yum源安装GUI

5、安装GUI,输入yum groupinstall "GNOME Desktop" "Graphical Administration Tools"

centos7上传镜像做本地yum源安装GUI6、输入ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target 修改系统级别,然后重启reboot

centos7上传镜像做本地yum源安装GUI

centos7上传镜像做本地yum源安装GUI