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
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
 
 
 

最新文章

  1. DB监控-redis监控
  2. hdu1026.Ignatius and the Princess I(bfs + 优先队列)
  3. Java-集合类汇总
  4. CPU boot up过程
  5. WPF编译时提示“...不包含适合于入口点的静态‘Main’方法 ...”
  6. Hibernate 注解时 hibernate.hbm.xml的配置方法 以及与SSH整合里的配置方式
  7. MFC工程的复制
  8. 【JAVA高级】——myEclipse连接mysql启动数据库服务
  9. 也来“玩”Metro UI之磁贴
  10. 一个IT人士的个人经历,给迷失方向的朋友(转)
  11. OC语言中如何在便利构造器中利用便利初始化进行初始化
  12. 为实体类增加toJSON方法
  13. C语言Linix服务器网络爬虫项目(一)项目初衷和网络爬虫概述
  14. 如何在python脚本下启动django程序
  15. SQL Server创建存储过程——动态SQL
  16. linux安装anaconda3 conda: command not found
  17. android spf 存储 集合(实体等)
  18. Python创建随机用户名密码并存放于Access数据库
  19. liunx存储管理之基础知识
  20. web-msg-send 学习 http://www.workerman.net/web-sender

热门文章

  1. Windows10和Windows Server 2019支持OpenSSH
  2. Attention is all you need 详细解读
  3. 使用Python执行dos命令并获取输出的结果
  4. python装饰器使用详解
  5. [转帖]calico网络原理及与flannel对比
  6. 【Python】【demo实验17】【练习实例】【将一个正整数分解质因数】
  7. double write 双写
  8. 如何修改maven本地仓库位置
  9. luogu P2765 魔术球问题 (最小路径覆盖)
  10. Java EE javax.servlet.http中的HttpSession接口