redhat升级国产操作系统

举报
炒香菇的书呆子 发表于 2023/03/31 23:49:13 2023/03/31
【摘要】 2.5.2 辅助机挂载Bclinux for Euler 21.10安装httpd并启动httpdyum install -y httpdsystemctl start httpdsystemctl stop firewalld[root@localhost ~]# yum install -y httpd已加载插件:fastestmirror, langpacksDetermining ...

2.5.2 辅助机挂载Bclinux for Euler 21.10

安装httpd并启动httpd

yum install -y httpd
systemctl start httpd
systemctl stop firewalld
[root@localhost ~]# yum install -y httpd
已加载插件:fastestmirror, langpacks
Determining fastest mirrors
 * base: mirrors.nju.edu.cn
 * extras: mirrors.nju.edu.cn
 * updates: mirrors.163.com
base                                                                                | 3.6 kB  00:00:00     
extras                                                                              | 2.9 kB  00:00:00     
updates                                                                             | 2.9 kB  00:00:00     
(1/4): base/7/x86_64/group_gz                                                       | 153 kB  00:00:00     
(2/4): extras/7/x86_64/primary_db                                                   | 249 kB  00:00:00     
(3/4): base/7/x86_64/primary_db                                                     | 6.1 MB  00:00:00     
(4/4): updates/7/x86_64/primary_db                                                  |  20 MB  00:00:26     
正在解决依赖关系
--> 正在检查事务
---> 软件包 httpd.x86_64.0.2.4.6-98.el7.centos.6 将被 安装
--> 正在处理依赖关系 httpd-tools = 2.4.6-98.el7.centos.6,它被软件包 httpd-2.4.6-98.el7.centos.6.x86_64 需要
--> 正在处理依赖关系 /etc/mime.types,它被软件包 httpd-2.4.6-98.el7.centos.6.x86_64 需要
--> 正在处理依赖关系 libaprutil-1.so.0()(64bit),它被软件包 httpd-2.4.6-98.el7.centos.6.x86_64 需要
--> 正在处理依赖关系 libapr-1.so.0()(64bit),它被软件包 httpd-2.4.6-98.el7.centos.6.x86_64 需要
--> 正在检查事务
---> 软件包 apr.x86_64.0.1.4.8-7.el7 将被 安装
---> 软件包 apr-util.x86_64.0.1.5.2-6.el7 将被 安装
---> 软件包 httpd-tools.x86_64.0.2.4.6-98.el7.centos.6 将被 安装
---> 软件包 mailcap.noarch.0.2.1.41-2.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

===========================================================================================================
 Package                 架构               版本                                 源                   大小
===========================================================================================================
正在安装:
 httpd                   x86_64             2.4.6-98.el7.centos.6                updates             2.7 M
为依赖而安装:
 apr                     x86_64             1.4.8-7.el7                          base                104 k
 apr-util                x86_64             1.5.2-6.el7                          base                 92 k
 httpd-tools             x86_64             2.4.6-98.el7.centos.6                updates              94 k
 mailcap                 noarch             2.1.41-2.el7                         base                 31 k

事务概要
===========================================================================================================
安装  1 软件包 (+4 依赖软件包)

总下载量:3.0 M
安装大小:10 M
Downloading packages:
警告:/var/cache/yum/x86_64/7/base/packages/apr-1.4.8-7.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
apr-1.4.8-7.el7.x86_64.rpm 的公钥尚未安装
(1/5): apr-1.4.8-7.el7.x86_64.rpm                                                   | 104 kB  00:00:00     
(2/5): apr-util-1.5.2-6.el7.x86_64.rpm                                              |  92 kB  00:00:00     
(3/5): mailcap-2.1.41-2.el7.noarch.rpm                                              |  31 kB  00:00:00     
httpd-tools-2.4.6-98.el7.centos.6.x86_64.rpm 的公钥尚未安装
(4/5): httpd-tools-2.4.6-98.el7.centos.6.x86_64.rpm                                 |  94 kB  00:00:00     
(5/5): httpd-2.4.6-98.el7.centos.6.x86_64.rpm                                       | 2.7 MB  00:00:00     
-----------------------------------------------------------------------------------------------------------
总计                                                                       7.6 MB/s | 3.0 MB  00:00:00     
从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 检索密钥
导入 GPG key 0xF4A80EB5:
 用户ID     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 指纹       : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 软件包     : centos-release-7-6.1810.2.el7.centos.x86_64 (@anaconda)
 来自       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : apr-1.4.8-7.el7.x86_64                                                                 1/5 
  正在安装    : apr-util-1.5.2-6.el7.x86_64                                                            2/5 
  正在安装    : httpd-tools-2.4.6-98.el7.centos.6.x86_64                                               3/5 
  正在安装    : mailcap-2.1.41-2.el7.noarch                                                            4/5 
  正在安装    : httpd-2.4.6-98.el7.centos.6.x86_64                                                     5/5 
  验证中      : httpd-tools-2.4.6-98.el7.centos.6.x86_64                                               1/5 
  验证中      : mailcap-2.1.41-2.el7.noarch                                                            2/5 
  验证中      : apr-1.4.8-7.el7.x86_64                                                                 3/5 
  验证中      : httpd-2.4.6-98.el7.centos.6.x86_64                                                     4/5 
  验证中      : apr-util-1.5.2-6.el7.x86_64                                                            5/5 

已安装:
  httpd.x86_64 0:2.4.6-98.el7.centos.6                                                                     

作为依赖被安装:
  apr.x86_64 0:1.4.8-7.el7       apr-util.x86_64 0:1.5.2-6.el7  httpd-tools.x86_64 0:2.4.6-98.el7.centos.6 
  mailcap.noarch 0:2.1.41-2.el7 

完毕!
[root@localhost ~]# systemctl start httpd

#启动httpd后,打开下面目录,新建euler2110
cd /var/www/html
mkdir bceuler2110
# 将bclinux for Euler 21.10上传到/mnt下面
将镜像挂载到/var/www/html/bceuler2110
mount -o loop /mnt/BCLinux-for-Euler-21.10-everything-x86_64.iso /var/www/html/bceuler2110/

[root@localhost html]# mount -o loop /mnt/BCLinux-for-Euler-21.10-everything-x86_64.iso /var/www/html/bceuler2110/
mount: /dev/loop0 写保护,将以只读方式挂载

输入下面命令

yum clean all
yum makecache

3. 操作系统升级

在x2openEuler启动成功后,打开启动的web端

https://192.168.220.132:18082/x2openEuler/#/login

image-20230316005112513

设置初始密码

image-20230316005150559

登录

image-20230316005208117

新建任务–系统升级

image-20230316005232128

按照要求填写信息

源操作系统版本选择对应的centos即可

image-20230316005330080

repo源选择新建

image-20230316005412792

输入下面内容

[local]

name=local

baseurl=http://192.168.220.132/bceuler2110/
enabled=1
gpgcheck=0

配置完成后点击确认

image-20230316010253211

点击确认进行连通性测试

image-20230316011428713

测试通过,开始升级前检查

image-20230316011410705

升级前检查通过,开始升级

image-20230316011503867

此时升级报错,需要进入待升级节点查看报错详情

image-20230316011553717

cd /opt/x2openEuler-upgrade
# 进入目录手动安装x2openEuler-upgrade-1.1.3-33.x86_64.rpm
yum install -y x2openEuler-upgrade-1.1.3-33.x86_64.rpm

报错如下

image-20230316011855477

错误:软件包:x2openEuler-upgrade-1.1.3-33.x86_64 (/x2openEuler-upgrade-1.1.3-33.x86_64)
          需要:rsync >= 3.1.0
          已安装: rsync-3.0.9-17.el7.x86_64 (@anaconda/7.3)
              rsync = 3.0.9-17.el7
 您可以尝试添加 --skip-broken 选项来解决该问题
 您可以尝试执行:rpm -Va --nofiles --nodigest

这时需要手动将yum源更改为bclinux for euler21.10的yum源

cd /etc/yum.repos.d/
vi redhat73.repo

将内容改为如下

[redhat73]

name=redhat73

baseurl=http://192.168.220.132/bceuler2110/
#baseurl=file:///mnt/redhat73/
enabled=1
gpgcheck=0

yum clean all
yum makecache

 cd /opt/x2openEuler-upgrade/
 yum install -y x2openEuler-upgrade-1.1.3-33.x86_64.rpm

x2openEuler-upgrade-1.1.3-33.x86_64.rpm安装成功

image-20230316012243639

将yum源再改回redhat的yum源

[root@localhost x2openEuler-upgrade]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# vi redhat73.repo 

[redhat73]

name=redhat73

#baseurl=http://192.168.220.132/bceuler2110/
baseurl=file:///mnt/redhat73/
enabled=1
gpgcheck=0

yum clean all
yum makecache

回到辅助机web界面,选择回退

image-20230316012130236

再次选择开始升级

再次报错

image-20230316013655726

进入控制台手动安装yum-utils

可能是redhat回退重启导致redhat镜像挂载失败,重新挂载

[root@localhost yum.repos.d]# mount  -o loop  /mnt/rhel-server-7.3-x86_64-dvd.iso /mnt/redhat73/
mount: /dev/loop0 写保护,将以只读方式挂载
[root@localhost yum.repos.d]# yum makecache 
已加载插件:langpacks, product-id, search-disabled-repos
redhat73                                                                            | 4.1 kB  00:00:00     
(1/4): redhat73/group_gz                                                            | 136 kB  00:00:00     
(2/4): redhat73/filelists_db                                                        | 3.3 MB  00:00:00     
(3/4): redhat73/primary_db                                                          | 3.9 MB  00:00:00     
(4/4): redhat73/other_db                                                            | 1.5 MB  00:00:00     
元数据缓存已建立

再次升级

image-20230316013946077

升级完成

image-20230316022109756

重启节点,清理日志文件

image-20230316022245433

image-20230316022302995

去面板查看升级信息

cat /etc/os-release
cat /etc/redhat-release
rpm -qa |grep kernel
[root@localhost ~]# cat /etc/os-release 
NAME="BigCloud Enterprise Linux"
VERSION="21.10 (LTS-SP2)"
ID="bclinux"
VERSION_ID="21.10"
PRETTY_NAME="BigCloud Enterprise Linux For Euler 21.10 LTS"
ANSI_COLOR="0;31"

[root@localhost ~]# cat /etc/redhat-release
BigCloud Enterprise Linux For Euler release 21.10 (LTS-SP2)
[root@localhost ~]# rpm -qa |grep kernel
kernel-4.19.90-2211.4.0.0177.oe1.bclinux.x86_64
[root@localhost ~]# 

image-20230316022518585

升级成功。

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。