您的位置:首页 > 其它

制作公司内部私有源

2015-08-30 00:05 387 查看
经过反复折腾,甚至自己写了个功能不完善的小程序来做同步源,折腾了好久,终于找到了一种很方便快捷的方法。

windows 下,我选用的是goodsync,这个名字不错,软件界面还可以



如图,我使用的是ftp的协议,因为当时163作为我最喜欢的源,我发现他只有ftp,没有rsync协议

我就首先也选择了ftp协议的中科大的源,试了下,果然很好,而且ping值在11~15,很好的速度了,比官方的好了几百倍。同步下来就随便折腾了

然后是linux下,linux下有rsync的,直接执行就ok了,因为发现中科大财大气粗,我就试了下rsync,发现果然可以,既然开放的有rsync,那就不用ftp折腾了,直接一条命令搞定就行。

这里我就直接指定版本了,当然是经典的6了

rsync -avrt --delete --exclude=isos/ rsync://mirrors.ustc.edu.cn/centos/6/ /server/centos/6/


以后果断放弃163的源,用中科大,果然财大气粗,

我看了下首页竟然发现还有epel源和rpmfusion源,

Remi源和RPMForge没有,但这已经很不错了



哈哈,再一次感叹下中科大财大气粗啊

http://mirrors.ustc.edu.cn/

CentOS-Base.repo 可以改成这样,原来的记着备份

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-6 - Base - www.xuegod.cn
baseurl=http://192.168.1.63/centos/6/os/$basearch/
gpgcheck=1
gpgkey=http://192.168.1.63/centos/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-6 - Updates - www.xuegod.cn
baseurl=http://192.168.1.63/centos/6/updates/$basearch/
gpgcheck=1
gpgkey=http://192.168.1.63/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-6 - Extras - www.xuegod.cn
baseurl=http://192.168.1.63/centos/6/extras/$basearch/
gpgcheck=1
gpgkey=http://192.168.1.63/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 - Plus - www.xuegod.cn
baseurl=http://192.168.1.63/centos/6/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://192.168.1.63/centos/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-6 - Contrib - www.xuegod.cn
baseurl=http://192.168.1.63/centos/6/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://192.168.1.63/centos/RPM-GPG-KEY-CentOS-6
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: