RHEL7中配置本地YUM软件源
2024-09-03 21:04:44
1、创建目录,挂载光盘
[root@localhost ~]# mkdir /mnt/iso
[root@localhost ~]# mount /dev/sr0 /mnt/iso
mount: /dev/sr0 is write-protected, mounting read-only
2、删除原来的仓库配置文件,新建配置文件
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
redhat.repo
[root@localhost yum.repos.d]# rm -f redhat.repo
[root@localhost yum.repos.d]# vi base.repo
[rhel7]
name=rhel7
baseurl=file:///mnt/iso
enabled=1
gpgcheck=1
:x
[root@localhost yum.repos.d]# yum clean all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: rhel7
Cleaning up everything
[root@localhost yum.repos.d]# yum makecache
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
rhel7 | 4.1 kB 00:00
(1/5): rhel7/group_gz | 136 kB 00:00
(2/5): rhel7/filelists_db | 3.3 MB 00:00
(3/5): rhel7/primary_db | 3.9 MB 00:00
(4/5): rhel7/other_db | 1.5 MB 00:00
(5/5): rhel7/productid | 1.6 kB 00:00
Metadata Cache Created
3、查看配置
[root@localhost yum.repos.d]# yum repolist all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id repo name status
rhel7 rhel7 enabled: 4,751
repolist: 4,751
最新文章
- DB监控-redis监控
- hdu1026.Ignatius and the Princess I(bfs + 优先队列)
- Java-集合类汇总
- CPU boot up过程
- WPF编译时提示“...不包含适合于入口点的静态‘Main’方法 ...”
- Hibernate 注解时 hibernate.hbm.xml的配置方法 以及与SSH整合里的配置方式
- MFC工程的复制
- 【JAVA高级】——myEclipse连接mysql启动数据库服务
- 也来“玩”Metro UI之磁贴
- 一个IT人士的个人经历,给迷失方向的朋友(转)
- OC语言中如何在便利构造器中利用便利初始化进行初始化
- 为实体类增加toJSON方法
- C语言Linix服务器网络爬虫项目(一)项目初衷和网络爬虫概述
- 如何在python脚本下启动django程序
- SQL Server创建存储过程——动态SQL
- linux安装anaconda3 conda: command not found
- android spf 存储 集合(实体等)
- Python创建随机用户名密码并存放于Access数据库
- liunx存储管理之基础知识
- web-msg-send 学习 http://www.workerman.net/web-sender
热门文章
- Windows10和Windows Server 2019支持OpenSSH
- Attention is all you need 详细解读
- 使用Python执行dos命令并获取输出的结果
- python装饰器使用详解
- [转帖]calico网络原理及与flannel对比
- 【Python】【demo实验17】【练习实例】【将一个正整数分解质因数】
- double write 双写
- 如何修改maven本地仓库位置
- luogu P2765 魔术球问题 (最小路径覆盖)
- Java EE javax.servlet.http中的HttpSession接口