码迷,mamicode.com
首页 > 其他好文 > 详细

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

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

标签:搭建centos源

首先建立站点,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 建立自己的本地源服务器

标签:搭建centos源

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!