6 软件管理
6.1 配置本地yum仓库安装wireshark,wget
-
先在media目录下创建cd目录
[root@localhost ~]# mkdir /media/cd
-
将其挂载在光盘上
[root@localhost ~]# mount /dev/cdrom /media/cd [root@localhost ~]# df //查看磁盘信息
- 配置yum本地仓库文件
-
创建仓库配置文件前先删除默认仓库配置
[root@localhost ~]# rm -rf /etc/yum.repos.d/*
-
创建local仓库配置文件
[root@localhost ~]# vim /etc/yum.repos.d/local.repo
[localrepo] name=this is a test baseurl=file:///media/cd gpgcheck=0 enabled=1
-
清除上一个仓库的缓存文件
[root@localhost ~]# yum clean all
-
查看仓库信息
[root@localhost ~]# yum repolist
可以看到一共有425个包
-
yum install 安装软件
[root@localhost ~]# yum install wget [root@localhost ~]# yum install wireshark
PS:这里wget已安装,所以没有操作
本地仓库里没有wireshark包 ,下载不了。
需要配置镜像文件库。
- 这里先配置一个清华的镜像站来下载wireshark
-
创建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
-
清除上一个仓库的缓存文件
[root@localhost ~]# yum clean all
-
查看仓库信息
[root@localhost ~]# yum repolist
-
yum install 安装软件
[root@localhost ~]# yum install wireshark
5. 查看软件包安装
[root@localhost ~]# rpm -qa wireshark