建立自己的yum服務源
為了節省流量,提高效率,我們在機房内部署了自己的yum server。
直接上腳本了
#!/bin/bash
rsync="rsync -avrt --bwlimit=10240 --delete"
mirror="rsync://ftp.jaist.ac.jp/pub/Linux/CentOS/"
local="/data/repo"
verlist="6 7"
archlist="x86_64"
baselist="os updates extras centosplus contrib"
for ver in $verlist
do
for arch in $archlist
do
┆ for base in $baselist
┆ do
┆ ┆ remote=$mirror/$ver/$base/$arch/
┆ ┆ mkdir -p $local/centos/$ver/$base/$arch/
┆ ┆ $rsync $remote $local/centos/$ver/$base/$arch/
┆ done
done
done
[root@vm2 yum.repos.d]# yum repolistLoaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfilerepo id repo name statusbaseCentOS--Base6,346epel ExtraPackagesforEnterpriseLinux6- x86_64 7,660extras CentOS--Extras4updates CentOS--Updates268repolist:14,278[root@vm2 yum.repos.d]# yum info zabbixLoaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfileAvailablePackagesName: zabbixArch: x86_64Version:1.8.14Release:1.el6Size:95 kRepo: epelSummary:Open-source monitoring solution for your IT infrastructureURL : http://www.zabbix.com/License:GPLv2+Description: ZABBIX is software that monitors numerous parameters of a network and: the health and integrity of servers. ZABBIX uses a flexible : notification mechanism that allows users to configure e-mail based : alerts for virtually any event.This allows a fast reaction to server : problems. ZABBIX offers excellent reporting and data visualisation : features based on the stored data.This makes ZABBIX ideal for: capacity planning.:: ZABBIX supports both polling and trapping.All ZABBIX reports and: statistics,as well as configuration parameters are accessed through a : web-based front end. A web-based front end ensures that the status of : your network and the health of your servers can be assessed from any : location.Properly configured, ZABBIX can play an important role in: monitoring IT infrastructure.Thisis equally truefor small : organisations with a few servers andfor large companies with a : multitude of servers.