日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

转载 搭建镜像站

發(fā)布時間:2025/6/15 编程问答 18 豆豆
生活随笔 收集整理的這篇文章主要介紹了 转载 搭建镜像站 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

搭建CentOS在線yum源鏡像服務(wù)器

說明:

操作系統(tǒng):CentOS 6.x

IP地址:192.168.21.188

實(shí)現(xiàn)目的:同步CentOS鏡像站點(diǎn)的內(nèi)容到此服務(wù)器,并且通過配置http服務(wù)器,能夠向外提供yum服務(wù)

準(zhǔn)備篇:

一、安裝http服務(wù)器

這里使用Nginx服務(wù)器提供http服務(wù)

關(guān)于Nginx服務(wù)器搭建,參考:CentOS安裝配置LNMP服務(wù)器(Nginx+PHP+MySQL)

http://www.osyunwei.com/archives/5910.html

二、系統(tǒng)約定

Nginx站點(diǎn)根目錄:/usr/local/nginx/html

服務(wù)器執(zhí)行腳本文件存放目錄:/home/crontab

三、開始Nginx目錄瀏覽功能

vi /usr/local/nginx/conf/nginx.conf #編輯配置文件,在http {下面添加以下內(nèi)容:

autoindex on; #開啟nginx目錄瀏覽功能

autoindex_exact_size off; #文件大小從KB開始顯示

autoindex_localtime on; #顯示文件修改時間為服務(wù)器本地時間

:wq! #保存,退出

service nginx reload #重新加載配置

參考:Nginx開啟目錄瀏覽功能

http://www.osyunwei.com/archives/5051.html

系統(tǒng)運(yùn)維 ?www.osyunwei.com ?溫馨提醒:qihang01原創(chuàng)內(nèi)容版權(quán)所有,轉(zhuǎn)載請注明出處及原文鏈

安裝篇:

一、創(chuàng)建鏡像文件存放目錄

mkdir -p /usr/local/nginx/html/centos #CentOS官方標(biāo)準(zhǔn)源

mkdir -p /usr/local/nginx/html/repoforge #第三方rpmforge源

mkdir -p /usr/local/nginx/html/epel #第三方epel源

說明:這里創(chuàng)建三個文件夾,分別存放CentOS官方標(biāo)準(zhǔn)源、第三方的rpmforge源和epel

二、確定以上三個yum源上游源的同步鏡像地址

1、CentOS官方標(biāo)準(zhǔn)源:rsync://mirrors.ustc.edu.cn/centos/

2、rpmforge源:rsync://mirrors.ispros.com.bd/repoforge/

3、epel源:rsync://mirrors.ustc.edu.cn/epel/

備注:上游yum源必須要支持rsync協(xié)議,否則不能使用rsync進(jìn)行同步。

參考:

CentOS官方標(biāo)準(zhǔn)源:

rsync://mirrors.kernel.org/centos

rpmforge源:

http://apt.sw.be/

rsync://ftp-stud.fht-esslingen.de/dag

epel源:

http://mirrors.fedoraproject.org/publiclist/EPEL/

rsync://mirrors.kernel.org/fedora-epel

三、創(chuàng)建以上三個yum源同步腳本,并且設(shè)定腳本自動執(zhí)行

mkdir -p /home/crontab #創(chuàng)建目錄

vi /home/crontab/yum_rsync.sh #添加以下代碼

#!/bin/sh

/usr/bin/rsync -avrt rsync://mirrors.ustc.edu.cn/centos/ --exclude-from=/usr/local/nginx/html/exclude_centos.list /usr/local/nginx/html/centos/

/usr/bin/rsync -avrt rsync://mirrors.ispros.com.bd/repoforge/ --exclude-from=/usr/local/nginx/html/exclude_repoforge.list /usr/local/nginx/html/repoforge/

/usr/bin/rsync -avrt rsync://mirrors.ustc.edu.cn/epel/ --exclude-from=/usr/local/nginx/html/exclude_epel.list /usr/local/nginx/html/epel/

:wq! #保存退出

chmod +x /home/crontab/yum_rsync.sh #添加腳本執(zhí)行權(quán)限

備注:運(yùn)行此腳本前,先要創(chuàng)建好同步目錄及不需要同步的目錄列表文件

cd /usr/local/nginx/html/ ? #進(jìn)入目錄

touch exclude_centos.list ? #創(chuàng)建文件

touch exclude_repoforge.list ??#創(chuàng)建文件

touch exclude_epel.list ??#創(chuàng)建文件

把不需要同步的目錄寫到上面對應(yīng)的文件中,每行一個目錄

例如:

vi exclude_epel.list

4/

4AS/

4ES/

4WS/

:wq! #保存退出

四、添加腳本定時執(zhí)行任務(wù)

vi /etc/crontab ?#在最后一行添加以下代碼

0 1 * * * root /home/crontab/yum_rsync.sh #設(shè)置每天凌晨1點(diǎn)整開始執(zhí)行腳本

:wq! #保存退出

service crond restart #重啟

測試篇:

一、安裝rsync同步軟件

yum install rsync xinetd #安裝

vi /etc/xinetd.d/rsync #編輯配置文件,設(shè)置開機(jī)啟動rsync

disable = no #修改為

/etc/init.d/xinetd start #啟動(CentOS中是以xinetd 來管理Rsync服務(wù)的)

:wq! #保存退出

二、執(zhí)行同步腳本

sh /home/crontab/yum_rsync.sh

注意:等待腳本執(zhí)行完畢,首次同步,耗費(fèi)的時間比較長!

三、根據(jù)不同版本創(chuàng)建三個yum源的repo配置文件

cd /etc/yum.repos.d/ #進(jìn)入目錄

mv /etc/yum.repos.d/CentOS-Base.repo CentOS-Base.repo-bak

1、CentOS官方標(biāo)準(zhǔn)源:

CentOS 5.x系列:

vi /etc/yum.repos.d/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-$releasever - Base - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/os/$basearch/

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

gpgcheck=1

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-5

#released updates

[updates]

name=CentOS-$releasever - Updates - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/updates/$basearch/

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

gpgcheck=1

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released

[addons]

name=CentOS-$releasever - Addons - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/addons/$basearch/

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

gpgcheck=1

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful

[extras]

name=CentOS-$releasever - Extras - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/extras/$basearch/

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

gpgcheck=1

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-$releasever - Plus - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/centosplus/$basearch/

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

gpgcheck=1

enabled=0

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users

[contrib]

name=CentOS-$releasever - Contrib - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/contrib/$basearch/

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

gpgcheck=1

enabled=0

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-5

:wq! #保存退出

#########################

CentOS 6.x系列:

vi /etc/yum.repos.d/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-$releasever - Base - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/os/$basearch/

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

gpgcheck=1

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-6

#released updates

[updates]

name=CentOS-$releasever - Updates - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/updates/$basearch/

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

gpgcheck=1

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful

[extras]

name=CentOS-$releasever - Extras - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/extras/$basearch/

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

gpgcheck=1

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-$releasever - Plus - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/centosplus/$basearch/

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

gpgcheck=1

enabled=0

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users

[contrib]

name=CentOS-$releasever - Contrib - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/contrib/$basearch/

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

gpgcheck=1

enabled=0

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-6

:wq! #保存退出

#########################

CentOS 7.x系列:

vi /etc/yum.repos.d/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-$releasever - Base

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

baseurl=http://192.168.21.188/centos/$releasever/os/$basearch/

gpgcheck=1

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-7

#released updates

[updates]

name=CentOS-$releasever - Updates

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

baseurl=http://192.168.21.188/centos/$releasever/updates/$basearch/

gpgcheck=1

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful

[extras]

name=CentOS-$releasever - Extras

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

baseurl=http://192.168.21.188/centos/$releasever/extras/$basearch/

gpgcheck=1

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-$releasever - Plus

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

baseurl=http://192.168.21.188/centos/$releasever/centosplus/$basearch/

gpgcheck=1

enabled=0

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-7

:wq! #保存退出

#########################

或者參考:https://lug.ustc.edu.cn/wiki/mirrors/help/centos

把里面的http://mirrors.ustc.edu.cn/替換為http://192.168.21.188/

2、rpmforge源:

CentOS 5.x系列:

vi /etc/yum.repos.d/rpmforge.repo #添加以下代碼

[rpmforge]

name = RHEL $releasever - RPMforge.net - dag

baseurl = http://192.168.21.188/repoforge/redhat/el5/en/$basearch/rpmforge

enabled = 1

protect = 0

gpgkey=http://192.168.21.188/repoforge/RPM-GPG-KEY-rpmforge

gpgcheck = 1

[rpmforge-extras]

name = RHEL $releasever - RPMforge.net - extras

baseurl = http://192.168.21.188/repoforge/redhat/el5/en/$basearch/extras

enabled = 0

protect = 0

gpgkey=http://192.168.21.188/repoforge/RPM-GPG-KEY-rpmforge

gpgcheck = 1

[rpmforge-testing]

name = RHEL $releasever - RPMforge.net - testing

baseurl = http://192.168.21.188/repoforge/redhat/el5/en/$basearch/testing

enabled = 0

protect = 0

gpgkey=http://192.168.21.188/repoforge/RPM-GPG-KEY-rpmforge

gpgcheck = 1

:wq! #保存退出

#########################

系統(tǒng)運(yùn)維 ?www.osyunwei.com ?溫馨提醒:qihang01原創(chuàng)內(nèi)容版權(quán)所有,轉(zhuǎn)載請注明出處及原文鏈

CentOS 6.x系列:

vi /etc/yum.repos.d/rpmforge.repo #添加以下代碼

[rpmforge]

name = RHEL $releasever - RPMforge.net - dag

baseurl = http://192.168.21.188/repoforge/redhat/el6/en/$basearch/rpmforge

enabled = 1

protect = 0

gpgkey=http://192.168.21.188/repoforge/RPM-GPG-KEY-rpmforge

gpgcheck = 1

[rpmforge-extras]

name = RHEL $releasever - RPMforge.net - extras

baseurl = http://192.168.21.188/repoforge/redhat/el6/en/$basearch/extras

enabled = 0

protect = 0

gpgkey=http://192.168.21.188/repoforge/RPM-GPG-KEY-rpmforge

gpgcheck = 1

[rpmforge-testing]

name = RHEL $releasever - RPMforge.net - testing

baseurl = http://192.168.21.188/repoforge/redhat/el6/en/$basearch/testing

enabled = 0

protect = 0

gpgkey=http://192.168.21.188/repoforge/RPM-GPG-KEY-rpmforge

gpgcheck = 1

:wq! #保存退出

#########################

CentOS 7.x系列:

vi /etc/yum.repos.d/rpmforge.repo #添加以下代碼

[rpmforge]

name = RHEL $releasever - RPMforge.net - dag

baseurl = http://192.168.21.188/repoforge/redhat/el7/en/$basearch/rpmforge

enabled = 1

protect = 0

gpgkey=http://192.168.21.188/repoforge/RPM-GPG-KEY-rpmforge

gpgcheck = 1

[rpmforge-extras]

name = RHEL $releasever - RPMforge.net - extras

baseurl = http://192.168.21.188/repoforge/redhat/el7/en/$basearch/extras

enabled = 0

protect = 0

gpgkey=http://192.168.21.188/repoforge/RPM-GPG-KEY-rpmforge

gpgcheck = 1

[rpmforge-testing]

name = RHEL $releasever - RPMforge.net - testing

baseurl = http://192.168.21.188/repoforge/redhat/el7/en/$basearch/testing

enabled = 0

protect = 0

gpgkey=http://192.168.21.188/repoforge/RPM-GPG-KEY-rpmforge

gpgcheck = 1

:wq! #保存退出

#########################

3、epel源:

CentOS 5.x系列:

vi /etc/yum.repos.d/epel.repo #添加以下代碼

[epel]

name=Extra Packages for Enterprise Linux 5 - $basearch

baseurl=http://192.168.21.188/epel/5/$basearch

failovermethod=priority

enabled=1

gpgcheck=1

gpgkey =http://192.168.21.188/epel/RPM-GPG-KEY-EPEL-5

[epel-debuginfo]

name=Extra Packages for Enterprise Linux 5 - $basearch - Debug

baseurl=http://192.168.21.188/epel/5/$basearch/debug

failovermethod=priority

enabled=0

gpgkey =http://192.168.21.188/epel/RPM-GPG-KEY-EPEL-5

gpgcheck=1

[epel-source]

name=Extra Packages for Enterprise Linux 5 - $basearch - Source

baseurl=http://192.168.21.188/epel/5/SRPMS

failovermethod=priority

enabled=0

gpgkey =http://192.168.21.188/epel/RPM-GPG-KEY-EPEL-5

gpgcheck=1

:wq! #保存退出

#########################

CentOS 6.x系列:

vi /etc/yum.repos.d/epel.repo #添加以下代碼

[epel]

name=Extra Packages for Enterprise Linux 6 - $basearch

baseurl=http://192.168.21.188/epel/6/$basearch

failovermethod=priority

enabled=1

gpgcheck=1

gpgkey =http://192.168.21.188/epel/RPM-GPG-KEY-EPEL-6

[epel-debuginfo]

name=Extra Packages for Enterprise Linux 6 - $basearch - Debug

baseurl=http://192.168.21.188/epel/6/$basearch/debug

failovermethod=priority

enabled=0

gpgkey =http://192.168.21.188/epel/RPM-GPG-KEY-EPEL-6

gpgcheck=1

[epel-source]

name=Extra Packages for Enterprise Linux 6 - $basearch - Source

baseurl=http://192.168.21.188/epel/6/SRPMS

failovermethod=priority

enabled=0

gpgkey =http://192.168.21.188/epel/RPM-GPG-KEY-EPEL-6

gpgcheck=1

:wq! #保存退出

#########################

CentOS 7.x系列:

vi /etc/yum.repos.d/epel.repo #添加以下代碼

[epel]

name=Extra Packages for Enterprise Linux 7 - $basearch

baseurl=http://192.168.21.188/epel/beta/7/$basearch

failovermethod=priority

enabled=1

gpgcheck=1

gpgkey =http://192.168.21.188/epel/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]

name=Extra Packages for Enterprise Linux 7 - $basearch - Debug

baseurl=http://192.168.21.188/epel/beta/7/$basearch/debug

failovermethod=priority

enabled=0

gpgkey =http://192.168.21.188/epel/RPM-GPG-KEY-EPEL-7

gpgcheck=1

[epel-source]

name=Extra Packages for Enterprise Linux 7 - $basearch - Source

baseurl=http://192.168.21.188/epel/beta/7/SRPMS

failovermethod=priority

enabled=0

gpgkey =http://192.168.21.188/epel/RPM-GPG-KEY-EPEL-7

gpgcheck=1

:wq! #保存退出

#########################

四、測試yum源是否配置正確

1、當(dāng)前系統(tǒng)版本為CentOS 6.x,以此為例

cd /etc/yum.repos.d/

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

vi 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-$releasever - Base - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/os/$basearch/

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

gpgcheck=1

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-6

#released updates

[updates]

name=CentOS-$releasever - Updates - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/updates/$basearch/

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

gpgcheck=1

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful

[extras]

name=CentOS-$releasever - Extras - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/extras/$basearch/

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

gpgcheck=1

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-$releasever - Plus - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/centosplus/$basearch/

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

gpgcheck=1

enabled=0

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users

[contrib]

name=CentOS-$releasever - Contrib - huanqiu.com

baseurl=http://192.168.21.188/centos/$releasever/contrib/$basearch/

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

gpgcheck=1

enabled=0

gpgkey=http://192.168.21.188/centos/RPM-GPG-KEY-CentOS-6

:wq! #保存退出

#########################

vi rpmforge.repo #添加以下代碼

[rpmforge]

name = RHEL $releasever - RPMforge.net - dag

baseurl = http://192.168.21.188/repoforge/redhat/el6/en/$basearch/rpmforge

enabled = 1

protect = 0

gpgkey=http://192.168.21.188/repoforge/RPM-GPG-KEY-rpmforge

gpgcheck = 1

[rpmforge-extras]

name = RHEL $releasever - RPMforge.net - extras

baseurl = http://192.168.21.188/repoforge/redhat/el6/en/$basearch/extras

enabled = 0

protect = 0

gpgkey=http://192.168.21.188/repoforge/RPM-GPG-KEY-rpmforge

gpgcheck = 1

[rpmforge-testing]

name = RHEL $releasever - RPMforge.net - testing

baseurl = http://192.168.21.188/repoforge/redhat/el6/en/$basearch/testing

enabled = 0

protect = 0

gpgkey=http://192.168.21.188/repoforge/RPM-GPG-KEY-rpmforge

gpgcheck = 1

:wq! #保存退出

#########################

vi epel.repo #添加以下代碼

[epel]

name=Extra Packages for Enterprise Linux 6 - $basearch

baseurl=http://192.168.21.188/epel/6/$basearch

failovermethod=priority

enabled=1

gpgcheck=1

gpgkey =http://192.168.21.188/epel/RPM-GPG-KEY-EPEL-6

[epel-debuginfo]

name=Extra Packages for Enterprise Linux 6 - $basearch - Debug

baseurl=http://192.168.21.188/epel/6/$basearch/debug

failovermethod=priority

enabled=0

gpgkey =http://192.168.21.188/epel/RPM-GPG-KEY-EPEL-6

gpgcheck=1

[epel-source]

name=Extra Packages for Enterprise Linux 6 - $basearch - Source

baseurl=http://192.168.21.188/epel/6/SRPMS

failovermethod=priority

enabled=0

gpgkey =http://192.168.21.188/epel/RPM-GPG-KEY-EPEL-6

gpgcheck=1

:wq! #保存退出

#########################

系統(tǒng)運(yùn)維 ?www.osyunwei.com ?溫馨提醒:qihang01原創(chuàng)內(nèi)容版權(quán)所有,轉(zhuǎn)載請注明出處及原文鏈

yum clean all?#清除當(dāng)前yum緩存

yum makecache?#緩存yum源中的軟件包信息

yum repolist #列出yum源中可用的軟件包

2、使用yum命令安裝軟件

yum install php?#測試CentOS官方標(biāo)準(zhǔn)源

yum install htop?#測試rpmforge源

yum install nginx #測試epel源

至此,搭建CentOS在線yum源鏡像服務(wù)器完成!


原文地址:?http://www.osyunwei.com/archives/7918.html

轉(zhuǎn)載于:https://blog.51cto.com/anonxiaozi/1697560

總結(jié)

以上是生活随笔為你收集整理的转载 搭建镜像站的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 理论片一级 | 毛片自拍| 欧美肉大捧一进一出免费视频 | 欧美三级欧美成人高清 | 天天狠狠 | 亚洲人免费 | 亚洲av无码一区二区乱子伦 | 91看大片| 草久免费视频 | 精品国产三级片在线观看 | 色欲人妻综合网 | 波多野结衣在线观看一区二区 | 久久综合久色欧美综合狠狠 | missav|免费高清av在线看 | 精品人妻无码一区二区三区蜜桃一 | 亚洲高清久久 | 亚洲第一av在线 | 日韩簧片在线观看 | 求欧美精品网址 | 欧美xxxx视频 | 黄色一级片免费看 | 精品人妻二区中文字幕 | 狠狠操伊人 | jizz中国女人高潮 | 国产精品久久久久久av | 91成人小视频 | 日韩av一区在线播放 | 亚洲网在线观看 | 91精品国产综合久久久久久 | av片一区二区三区 | 国产成人无码一区二区三区在线 | 国产视频资源 | 色婷婷久久综合 | 性感av在线| 国产亚洲欧美在线 | 日韩欧美亚洲视频 | 亚洲熟妇av一区二区三区漫画 | 九色精品| 91黄色在线视频 | 亚洲一区二区精品 | 69福利视频 | 成人午夜剧场视频网站 | 爆乳熟妇一区二区三区霸乳 | 国产成人精品一区 | 免费看欧美黄色片 | 久久夜靖品2区 | 超碰www | 美女日批网站 | 免费看的av网站 | av嫩草 | 美女mm131爽爽爽免费动视频 | 国产最新精品 | 69超碰| 奇米色婷婷 | 欧美精品一级在线观看 | 麻豆射区| 依人成人网 | av免费看网址 | 成人免费视频a | 中文字幕第88页 | 偷拍第一页 | 日韩精品在线观看中文字幕 | 一区二区三区久久 | 最新色站 | 亚洲一区二区自拍 | 国产精品久久久久影院 | 欧美va在线观看 | 成年人看片网站 | 欧美日韩一级大片 | 国产免费福利 | 久久久久亚洲AV | 欧美激情视频在线播放 | 69堂视频 | 日本中文字幕免费 | 国产亚洲精品久久777777 | 少妇毛片一区二区三区粉嫩av | 亚洲一区二区三区在线播放 | 国产精品高潮呻吟av | 黄色特级视频 | 欧美日韩成人网 | 国产欧美久久久久久 | 成人av一区二区三区 | 精品人妻一区二区三区香蕉 | 蜜臀久久99精品久久久久久宅男 | 欧美二区在线观看 | 日韩视频网 | 久久网av | 日本美女一区二区三区 | 9cao| 色戒未删节版 | 婷婷亚洲五月色综合 | www.国产视频.com | 色漫 | 国产一区视频免费观看 | 欧美一性一交 | 黑丝啪啪| www.色99| 亚洲无卡视频 | 老色批永久免费网站www |