首页 > 其他 > 详细

centos 建立自己的本地源服务器

时间:2014-07-19 02:23:45      阅读:462      评论:0      收藏:0      [点我收藏+]

首先建立站点,httpd或nginx都可,我的站点根目录指向“/var/www/centos/”


然后下载源,并同步源

rsync -avrt rsync://mirrors.ustc.edu.cn/centos/6.5/updates/x86_64/ /opt/centos/other/updates/

rsync -avrt rsync://mirrors.ustc.edu.cn/centos/6.5/extras/x86_64/ /opt/centos/other/extras/

rsync -avrt rsync://mirrors.ustc.edu.cn/centos/6.5/centosplus/x86_64/ /opt/centos/other/centosplus/

rsync -avrt rsync://mirrors.ustc.edu.cn/centos/6.5/contrib/x86_64/ /opt/centos/other/contrib/

我这有一份最新的源(2014-7-18号更新)适用于centos 6 64位

下载地址


替换客户端的CentOS-Base.repo

[base]

name=CentOS-6 - Base - hnkj

baseurl=http://站点IP/

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os

gpgcheck=1

gpgkey=http://站点IP/RPM-GPG-KEY-CentOS-6


#released updates 

[updates]

name=CentOS-6 - Updates - hnkj

baseurl=http://站点IP/other/updates/

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates

gpgcheck=1

gpgkey=http://站点IP/RPM-GPG-KEY-CentOS-6


#additional packages that may be useful

[extras]

name=CentOS-6 - Extras - hnkj

baseurl=http://站点IP/other/extras/

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras

gpgcheck=1

gpgkey=http://站点IP/RPM-GPG-KEY-CentOS-6


#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-6 - Plus - hnkj

baseurl=http://站点IP/other/centosplus/

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus

gpgcheck=1

enabled=0

gpgkey=http://站点IP/RPM-GPG-KEY-CentOS-6


#contrib - packages by Centos Users

[contrib]

name=CentOS-6 - Contrib - hnkj

baseurl=http://站点IP/other/contrib/

#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib

gpgcheck=1

enabled=0

gpgkey=http://站点IP/RPM-GPG-KEY-CentOS-6


centos 建立自己的本地源服务器

原文:http://wvvvw.blog.51cto.com/458616/1439916

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!