日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

制作基于http的yum源2

發布時間:2025/4/16 编程问答 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 制作基于http的yum源2 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

yum源的創建腳本

#!/bin/bash #?Title:?yumcreate.sh #?Author:?cliang(gnome_dj@163.com) #?Description:?This?is?a?script #?Date:20140317?16:54 #?Version:?0.1#mount?the?Linux?disk?dvd1?&?dvd2. #Web?directory?for?storage?rpm?file.? DST="/var/www/html/yum/CentOS-6.3-x86_64" SUR="/tmp/$(date?+%N%s)" #The?repo?file?name. REPO="CentOS-6.3-x86_64.repo" #Iso?file?location. DVDPATH1="/home/share/CentOS-6.3-x86_64-bin-DVD1.iso" DVDPATH2="/home/share/CentOS-6.3-x86_64-bin-DVD2.iso"SIP=$(ifconfig?eth0|grep?"inet?addr"|awk?-F":"?'{print?$2}'|awk?'{print?$1}') { if?[?!?-d?$DST?];thenmkdir?$DST?-pchmod?+w?$DST?-R fi mkdir? if?[?!?-d?$SUR?];thenmkdir?$SUR?-p fi }?2>?/dev/nullmount?-o?loop?$DVDPATH1?$SUR #cp?-rf?$SUR/?$DST/ rsync?-a?$SUR/?$DST/ umount?$SURmount?-o?loop?$DVDPATH2?$SUR #cp?-rf?$SUR/?$DST/ rsync?-a?$SUR/?$DST umount?$SUR rm?-rf?$SUR#Make?yum?group. cd?$DST createrepo?-g?$(find?$DST?|grep?comps.xml$)?.?>/dev/nullecho?"[CentOS6.4]"?>?$DST/$REPO echo?"name=CentOS-\$releasever?-?Base"?>>?$DST/$REPO echo?"baseurl=http://"$SIP"/yum/CentOS-6.3-x86_64"?>>?$DST/$REPO echo?"gpgcheck=0"?>>?$DST/$REPO echo?"enabled=1"?>>?$DST/$REPO #Change?purview?only?read. chmod?-w?-R?$DST#HTTP?configuration. echo?'Alias?"/yum"?"/var/www/html/yum/"'?>>/etc/httpd/conf/httpd.conf echo?'<Directory?"/var/www/html/yum/">'?>>/etc/httpd/conf/httpd.conf echo?'?Order?allow,deny'??>>/etc/httpd/conf/httpd.conf echo?'?Allow?from?all'?>>/etc/httpd/conf/httpd.conf echo?'</Directory>'?>>/etc/httpd/conf/httpd.conf #Reload?apache?service. service?httpd?restart?1>/dev/null?2>/dev/null



客戶端使用的時候可以執行

#!/bin/sh #Client?repos?configure { if?[?!?-d?/etc/yum.repos.d/bak?];thenmkdir?/etc/yum.repos.d/bak fi for?i?in?$(ls?/etc/yum.repos.d/|grep?-v?bak);domv?$i?/etc/yum.repos.d/bak done }?>/dev/nullwget?http://192.168.x.x/yum/CentOS-6.3-x86_64/CentOS-6.3-x86_64.repo?-O?/etc/yum.repos.d yum?clean?all yun?list yun?grouplist yum?search?"xxx"


轉載于:https://blog.51cto.com/51cliang/1431639

總結

以上是生活随笔為你收集整理的制作基于http的yum源2的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。