配置本地yum仓库安装wireshark,wget

6 软件管理

6.1 配置本地yum仓库安装wireshark,wget
  • 先在media目录下创建cd目录

    [root@localhost ~]# mkdir /media/cd
    
  • 将其挂载在光盘上

    [root@localhost ~]# mount /dev/cdrom /media/cd
    [root@localhost ~]# df //查看磁盘信息
    

df

  • 配置yum本地仓库文件
  1. 创建仓库配置文件前先删除默认仓库配置

    [root@localhost ~]# rm -rf /etc/yum.repos.d/*
    

rm -rf

  1. 创建local仓库配置文件

    [root@localhost ~]# vim /etc/yum.repos.d/local.repo
    
    [localrepo]
    name=this is a test
    baseurl=file:///media/cd
    gpgcheck=0
    enabled=1
    

cat

  1. 清除上一个仓库的缓存文件

    [root@localhost ~]# yum clean all
    
  2. 查看仓库信息

    [root@localhost ~]# yum repolist
    

yum repolist

可以看到一共有425个包

  1. yum install 安装软件

    [root@localhost ~]# yum install wget
    [root@localhost ~]# yum install wireshark
    

yum'

PS:这里wget已安装,所以没有操作

本地仓库里没有wireshark包 ,下载不了。

需要配置镜像文件库。

  • 这里先配置一个清华的镜像站来下载wireshark
  1. 创建tsinghua仓库配置文件

     [root@localhost ~]# vim /etc/yum.repos.d/tsinghua.repo
     
    [tsinghuarepo] 
    name=this is a tsinghuatest
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/7/os/x86_64/
    gpgcheck=0
    enabled=1
    

tsinghua

  1. 清除上一个仓库的缓存文件

    [root@localhost ~]# yum clean all
    
  2. 查看仓库信息

    [root@localhost ~]# yum repolist
    

yum repolist

  1. yum install 安装软件

    [root@localhost ~]# yum install wireshark
    

yum wireshark
5. 查看软件包安装

[root@localhost ~]# rpm -qa wireshark

rpm

  • 3
    点赞
  • 45
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值