Python学习之路——Linux基础之yum

yum本地源

  • 修改yum源配置文件 /etc/yum.repo.d/local/repo
    Python学习之路——Linux基础之yum
    Python学习之路——Linux基础之yum
    yum clean all : 清除yum缓存

    网络yum源

  • 修改yum源配置文件 /etc/yum.repo.d/local/repo 为网络yum源
    修改baseurl为网络yum源路径(注意需要存在依赖关系repodata目录的路径下)

    自定义yum源

    1. 安装createrepo
    2. 创建yum源目录 : mkdir /test
    3. 拷贝软件包到/test
    4. createrepo /test :创建依赖性关系 (得先安装createrepo)
    5. 修改/etc/yum.repos.d/local.repos:【baseurl=file:///test】

      yum安装与删除

      yum install <软件包名>
      yum reinstall <软件包名> :重新安装
      yum erase <软件包名>

      yum安装后软件包保留

      修改 /etc/yum.conf 中keepcache=1

猜你喜欢

转载自blog.51cto.com/14052013/2311865