Skip to content

centos7可视化

what: centos7可视化安装

when: 2021/12/19

who:JRT

where:arm ,ecs

why:记录过程

1.换源

CentOS-AltArch的镜像地址为:https://repo.huaweicloud.com/centos-altarch/
1、备份配置文件:
cp -a /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
2、下载新的CentOS-Base.repo文件到/etc/yum.repos.d/目录下(因gpgkey无法动态适配,已将gpgcheck设置为0,关闭校验,如需打开请设置为1,并修改gpgkey地址),执行如下命令:
wget -O /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-AltArch-7.repo
3、执行yum clean all清除原有yum缓存。
4、执行yum makecache(刷新缓存)或者yum repolist all(查看所有配置可以使用的文件,会自动刷新缓存)。

2.安装依赖

执行以下命令,安装图形桌面组件。
# yum groupinstall "Server with GUI" -y
说明:
如果安装结束后提示Failed : python -urllibs3.noarch 0:1.10.2-7.e17,可以执行以下命令:

mv /usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname /usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname.bak

yum install python-urllib3 -y

2.1 安装依赖执行结果

  Verifying  : chkconfig-1.7.4-1.el7.aarch64               879/890 
  Verifying  : 1:dbus-libs-1.10.24-13.el7_6.aarch64        880/890 
  Verifying  : cryptsetup-libs-2.0.3-5.el7.aarch64         881/890 
  Verifying  : nss-util-3.44.0-3.el7.aarch64               882/890 
  Verifying  : firewalld-filesystem-0.6.3-2.el7_7.2.noar   883/890 
  Verifying  : avahi-libs-0.6.31-19.el7.aarch64            884/890 
  Verifying  : systemd-219-67.el7_7.2.aarch64              885/890 
  Verifying  : policycoreutils-2.5-33.el7.aarch64          886/890 
  Verifying  : plymouth-core-libs-0.8.9-0.32.20140113.el   887/890 
  Verifying  : kpartx-0.4.9-127.el7.aarch64                888/890 
  Verifying  : python-firewall-0.6.3-2.el7_7.2.noarch      889/890 
  Verifying  : 7:device-mapper-libs-1.02.158-2.el7_7.2.a   890/890 

Installed:
......
  nss-util.aarch64 0:3.67.0-1.el7_9                                
  plymouth.aarch64 0:0.8.9-0.34.20140113.el7.centos                
  plymouth-core-libs.aarch64 0:0.8.9-0.34.20140113.el7.centos      
  policycoreutils.aarch64 0:2.5-34.el7                             
  python-firewall.noarch 0:0.6.3-13.el7_9                          
  systemd.aarch64 0:219-78.el7_9.3                                 
  systemd-libs.aarch64 0:219-78.el7_9.3                            
  systemd-sysv.aarch64 0:219-78.el7_9.3                            

Complete!
[root@ecs-143a ~]# 

3.重启服务器

安装结束后,执行以下命令设置默认启动级别为graphical.target
# systemctl set-default graphical.target

执行以下命令启动graphical.target
# systemctl start graphical.target

reboot或在ecs控制台执行开关机操作

操作日志

[root@ecs-143a ~]# systemctl set-default graphical.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.
[root@ecs-143a ~]# systemctl start graphical.target
[root@ecs-143a ~]# 

4.登录

接下来操作按照图形化提示完成,文档到此结束,图形化安装完成。