首先配置 yum源

1、挂载DVD光盘到/mnt   因为配置时候路径名里面不能有空格,否则不能识别  [root@ mnt]# mount /dev/cdrom /mnt  

 

2、在目录/etc/yum.repos.d/创建文件文件名.repo 

3、配置本地yum源

cd /etc/yum.repos.d/   #进入yum配置目录 

touch  rhel7.repo   #建立yum配置文件 

vim  rhel7.repo   #编辑配置文件,添加以下内容 

[rhel-yum]

name=rhel7   #自定义名称 

baseurl=file:///mnt#本地光盘挂载路径 

enabled=1   #启用yum源,0为不启用,1为启用 

gpgcheck=0  #检查GPG-KEY,0为不检查,1为检查 

:wq! #保存退出 

Linux yum源的安装  及 压缩

 

4、、测试使用yum命令自动安装软件

yum clean all   #清除yum缓存 

yum makecache  #缓存本地yum源中的软件包信息

 

 

 

然后安装unzip Zip

 

mount /dev/cdrom /mnt

ls /mnt/ 查看是否挂载上

yum -y install  zip

 yum -y install  unzip

 

 

压缩

zip x.zip 原文件

zip -r  递归压缩

 

解压缩

unzip x.zip

相关文章:

  • 2021-08-10
  • 2022-02-16
  • 2022-12-23
  • 2022-02-24
  • 2022-12-23
  • 2021-12-10
  • 2022-01-01
  • 2021-12-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2022-02-20
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案