標籤:搭建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 建立自己的本地原始伺服器