保存centos的rpm包

# centos7
    vim /etc/yum.conf
    cachedir=/var/cache/yum/    #是rpm包保存的路径
    keepcache=1                       #改为1


# centos8 rocky8.3
    #在[main]里面添加
    cachedir=/var/cache/dnf    #默认目录
    keepcache=1                    #改为1

# 保存并移动
    mkdir -p net_tools
    find  /var/cache/dnf -name "*.rpm" | xargs -t -I '{}' mv {} net_tools

  

posted on 2023-09-13 11:21  luokeli  阅读(138)  评论(0)    收藏  举报

导航