yum源的shell脚本配置

来源:互联网 发布:ios10软件不受信任 编辑:程序博客网 时间:2024/06/07 07:35
#!/bin/bashecho ********************   yum   ********************echo *   1.  FILE eg:file:///var/www/html/rhel7.2/   *echo *   2.  FTP  eg:ftp://172.25.254.250/pub/       *echo *   3.  HTTP eg:http://172.25.254.37/rhel7.2/   *echo *************************************************rm -rf /etc/yum.repos.d/*#清空yum源mkdir /etc/yum.reps.d/rhel7.2.repo#创建yum源文件read -p 'config method(eg:file:///var/www/html/rhel7.2/):'addresscat >>/etc/yum.reps.d/rhel7.2.repo<<end[rhel7.2]name=rhel7.2baseurl=$addressgpgcheck=0end#写入yum源配置文件yum clean all#更新yum源配置
原创粉丝点击