麒麟系统设置本地yum源

2024-01-10 09:36:33

1、下载yum镜像源

Kylin-Server-10-SP1-Release-Build18-20210809-mips64el.iso

2、配置镜像源

[root@localhost soft]# mkdir /mnt/cdrom
[root@localhost soft]# mount -o loop -t iso9660 Kylin-Server-10-SP1-Release-Build18-20210809-mips64el.iso /mnt/cdrom
mount: /mnt/cdrom: WARNING: source write-protected, mounted read-only.
[root@localhost soft]# cd /mnt/cdrom
[root@localhost cdrom]# ls
boot  boot.catalog  EFI  images  LICENSE  manual  Packages  repodata  TRANS.TBL
[root@localhost yum.repos.d]# cat kylin.repo
[ks10-local-iso]
name = Kylin Linux Advanced Server 10 - local
baseurl = file:///mnt/cdrom/
gpgcheck = 1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kylin
enabled = 1

导入公钥
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-kylin

3、设置后就可以用yum下载和使用rpm包了

下载c++依赖包到/home/ppp/package/目录下

yum install --downloadonly ?--downloaddir=/home/ppp/package/ gcc-c++ libstdc++-devel -y

4、更新安装包
?yum update?+ rpm包

5、删除安装包

yum remove + rpm包

6、搜索包
yum search?+ rpm包

例如:

升级rpm

rpm -Uvh kernel-headers-4.19.90-25.35.v2101.ky10.x86_64.rpm

安装rpm

rpm -ivh kernel-headers-4.19.90-25.35.v2101.ky10.x86_64.rpm

文章来源:https://blog.csdn.net/weixin_60748184/article/details/135464166
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。