搭建网络yum源

   #!/bin/bash
   #Linux搭建163网络yum源
    cd /etc/yum.repos.d/
    echo "-------------------下载163-repo--------------------"
    wget  http://mirrors.163.com/.help/CentOS6-Base-163.repo    2&>/dev/null
    sed -i "s/\$releasever/6/g" /etc/yum.repos.d/CentOS6-Base-163.repo
    sed -i "s/RPM-GPG-KEY-CentOS-6/RPM-GPG-KEY-CentOS-6/g"  /etc/yum.repos.d/CentOS6-Base-163.repo
    yum clean all        2&>/dev/null
    yum makecache        2&>/dev/null

 

posted on 2016-10-16 16:50  losbyday  阅读(298)  评论(0编辑  收藏  举报

导航