搭建CentOS在线yum源镜像服务器的步骤

说明:

操作系统:CentOS 6.x

IP地址:192.168.21.188

实现目的:同步CentOS镜像站点的内容到此服务器,并且通过配置http服务器,能够向外提供yum服务

准备篇:

一、安装http服务器

这里使用Nginx服务器提供http服务

 二、系统约定

Nginx站点根目录:/usr/local/nginx/html

服务器执行脚本文件存放目录:/home/crontab

三、开始Nginx目录浏览功能

vi /usr/local/nginx/conf/nginx.conf #编辑配置文件,在http {下面添加以下内容:

autoindex on; #开启nginx目录浏览功能

autoindex_exact_size off; #文件大小从KB开始显示

autoindex_localtime on; #显示文件修改时间为服务器本地时间

:wq! #保存,退出

service nginx reload #重新加载配置

参考:Nginx开启目录浏览功能

http://www.111cn.net /archives/5051.html

系统运维  www.111cn.net  温馨提醒:qihang01原创内容版权所有,转载请注明出处及原文链

安装篇:

一、创建镜像文件存放目录

mkdir -p /usr/local/nginx/html/centos #CentOS官方标准源

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

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

说明:这里创建三个文件夹,分别存放CentOS官方标准源、第三方的rpmforge源和epel源

二、确定以上三个yum源上游源的同步镜像地址

1、CentOS官方标准源:rsync://mirrors.ustc.edu.cn/centos/

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

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

备注:上游yum源必须要支持rsync协议,否则不能使用rsync进行同步。

参考:

CentOS官方标准源:

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

三、创建以上三个yum源同步脚本,并且设定脚本自动执行

mkdir -p /home/crontab #创建目录

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 #添加脚本执行权限

备注:运行此脚本前,先要创建好同步目录及不需要同步的目录列表文件

cd /usr/local/nginx/html/   #进入目录

touch exclude_centos.list   #创建文件

touch exclude_repoforge.list   #创建文件

touch exclude_epel.list   #创建文件

把不需要同步的目录写到上面对应的文件中,每行一个目录

例如:

vi exclude_epel.list

4/

4AS/

4ES/

4WS/

:wq! #保存退出

四、添加脚本定时执行任务

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

0 1 * * * root /home/crontab/yum_rsync.sh #设置每天凌晨1点整开始执行脚本

:wq! #保存退出

service crond restart #重启

测试篇:

一、安装rsync同步软件

yum install rsync xinetd #安装

vi /etc/xinetd.d/rsync #编辑配置文件,设置开机启动rsync

disable = no #修改为

/etc/init.d/xinetd start #启动(CentOS中是以xinetd 来管理Rsync服务的)

:wq! #保存退出

二、执行同步脚本

sh /home/crontab/yum_rsync.sh

注意:等待脚本执行完毕,首次同步,耗费的时间比较长!

三、根据不同版本创建三个yum源的repo配置文件

cd /etc/yum.repos.d/ #进入目录

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

1、CentOS官方标准源:

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! #保存退出

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

系统运维  www.111cn.net  温馨提醒:qihang01原创内容版权所有,转载请注明出处及原文链

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、当前系统版本为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! #保存退出

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

系统运维  www.111cn.net  温馨提醒:qihang01原创内容版权所有,转载请注明出处及原文链

yum clean all #清除当前yum缓存

yum makecache #缓存yum源中的软件包信息

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

2、使用yum命令安装软件

yum install php #测试CentOS官方标准源

yum install htop #测试rpmforge源

yum install nginx #测试epel源

至此,搭建CentOS在线yum源镜像服务器完成!

时间: 2025-01-21 11:36:18

搭建CentOS在线yum源镜像服务器的步骤的相关文章

Redhat 6.0如何使用CentOS的yum源在线安装软件

由于Redhat的yum在线更新是收费的,如果没有注册的话是不能使用的,即不能在线安装软件.在这种情况下,想使用Redhat系统,还想用yum源来在线安装软件,有没有办法?答案是有办法,请往下看! 1.删除redhat原有的yum &http://www.aliyun.com/zixun/aggregation/37954.html">nbsp;  rpm -aq|grep yum|xargs rpm -e --nodeps  #删除 2.下载新的yum安装包  #这里我们使用Ce

CentOS中yum 源的配置与使用详解_Linux

一.yum 简介 yum,是Yellow dog Updater, Modified 的简称,是杜克大学为了提高RPM 软件包安装性而开发的一种软件包管理器.起初是由yellow dog 这一发行版的开发者Terra Soft 研发,用python 写成,那时还叫做yup(yellow dog updater),后经杜克大学的Linux@Duke 开发团队进行改进,遂有此名.yum 的宗旨是自动化地升级,安装/移除rpm 包,收集rpm 包的相关信息,检查依赖性并自动提示用户解决.yum 的关键

如何使红帽系统用centos的yum源?

开源centos的镜像文件地址有很多,但redhat只能使用原来的yum源或本地自己挂载生成的yum源,这样会出现yum源不全,一些需要的系统包无法安装.可以通过重新安装yum的方式让红帽系统也可以使用centos的yum源. 1.卸载原来有关yum的rpm包 rpm -aq|grep yum|xargs rpm -e --nodeps 2.在163镜像网站下载centos有关yum的rpm包 我的操作系统是红帽6.4,下载时注意系统版本 wget http://mirrors.163.com/

centos 网易yum源出错解决办法 mark

centos使用网易yum源提示404错误解决办法  原文地址:http://www.dedecms8.com/os/linux/49994.html 本地安装的centos5.5,使用网易163 yum更新源的时候,提示404错误:[Errno 14] HTTP Error 404: Not Found 直接相应的地址,发现网易镜像网站目录里已经不存在此页,真正存储这些文件的地址是http://mirrors.163.com/centos/5/ 于是根据情况修改CentOS5-Base-163

CentOS epel yum 源配置

EPEL,即Extra Packages for Enterprise Linux,这个软件仓库里有很多非常常用的软件,而且是专门针对RHEL设计的,对RHEL标准yum源是一个很好的补充,完全免费使用,由Fedora项目维护,所以如果你使用的是RHEL,或者CentOS,Scientific等RHEL系的linux,可以非常放心的使用EPEL的yum源. centos 6.5 wget http://mirrors.kernel.org/fedora-epel/6/x86_64/epel-re

将Centos的yum源更换为国内的阿里云源

阿里云是最近新出的一个镜像源.得益于阿里云的高速发展,这么大的需求,肯定会推出自己的镜像源. 阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/ CentOS系统更换软件安装源 第一步:备份你的原镜像文件,以免出错后可以恢复. mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 第二步:下载新的CentOS-Base.repo 到/etc/yum.repos.

CentOS 7 上安装 Percona 服务器详细步骤

本教程我们来学习一下Percona服务器在Centos 7 下的安装配置步骤,Percona 服务器是开源的MySQL,MariaDB的替代品,特别是InnoDB的数据库引擎性能的提升,让更多人选择了 Percona 服务. 在下文中将介绍在CentOS 7上 Percona 服务器的安装,以及备份当前数据,配置的步骤和如何恢复备份. 1.什么是Percona,为什么使用它 Percona是一个MySQL,MariaDB数据库的开源替代品,它是MySQL的一个分支,相当多的改进和独特的功能使得它

rhel 配置yum源

1.删除RHEL原有的yumrpm -aq|grep yum|xargs rpm -e --nodeps#删除2.下载新的yum安装包#这里我们使用CentOS的yum源(我的系统版本是rhel 6.5 as 64bit)wget http://vault.centos.org/6.0/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpmwget http://vault.centos.org/6.0/os/x86_64/Pack

redhat系统yum源的配置问题

安装过Linux软件的用户就知道,有时我们安装一个软件,需要依赖其他软件,所以必需找全所有的软件,这是一个极其麻烦的事情,有没什么方式可以让它自己去找依赖呢? 答案当然是肯定,这就需要我们配置一个神器--yum,通过它,我们可以直接安装软件的,我们只需知道软件的名称就可以的,让它把所有的依赖都直接关联起来安装.不过本人最近一段时间使用yum的时候,发现一个很恶心的事情,就是redhat自带的yum非常令人讨厌. 由于 redhat的yum在线更新是收费的,如果没有注册的话不能使用,如果要使用,需