美文网首页
Rethat 6.8配置样本源

Rethat 6.8配置样本源

作者: 田旭1 | 来源:发表于2017-05-06 10:22 被阅读0次

一般安装好redhat后,不能注册的话,不能使用系统自带的yum源。但是我们可以自己配置yum源来解决这一问题。下面介绍下redhat配置163yum源。

1. 检查是否安装yum包

rpm -qa |grep yum

2. 删除自带的yum包

rpm -qa|grep yum|xargs rpm -e --nodeps

因为一些包之间可能会有依赖关系,所以我们需要加上参数 --nodeps 无视依赖关系。

3. 下载yum包

Yum包下载地址http://mirrors.163.com/centos/

在这个网站里,你可以自己选择需要下载的文件,进入形如5/或者6/的文件下载,其他的无法下载。

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-73.el6.centos.noarch.rpm

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm


如果wget时候,报http...504等错误,则进入linux,修改etc/hosts文件,添加一行:

www.abc.com      192.168.xx.xx

4. 解压yum包

rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-3.2.29-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm --force --nodeps

5. 替换yum源

cd  /etc/yum.repos.d/

wget  http://mirrors.163.com/.help/CentOS6-Base-163.repo

vi CentOS6-Base-163.repo

注意原来的yum源配置文件是rhel-source.repo。这里把CentOS6-Base-163.repo替换掉rhel-source.repo。

mv rhel-source.repo rhel-source.repo.bak

mv CentOS6-Base-163.repo rhel-source.repo

6. 编辑替换后的rhel-source.repo。

#rhel-source.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-6 - Base - 163.com

baseurl=http://mirrors.163.com/centos/6/os/$basearch/

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

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#released updates

[updates]

name=CentOS-6 - Updates - 163.com

baseurl=http://mirrors.163.com/centos/6/updates/$basearch/

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

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful

[extras]

name=CentOS-6 - Extras - 163.com

baseurl=http://mirrors.163.com/centos/6/extras/$basearch/

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

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

7. 清理并重建缓存

yum clean all

yum makecache

8. 更新yum

yum update

至此,redhat配置163yum源完成

相关文章

  • Rethat 6.8配置样本源

    一般安装好redhat后,不能注册的话,不能使用系统自带的yum源。但是我们可以自己配置yum源来解决这一问题。下...

  • Rethat 6.8安装pip工具

    Rethat 6.8安装pip工具,pip类似于yum包管理工具 1、pip下载安装 1.1 pip下载 代码如下...

  • Centos 6.8下虚拟机网络配置教程

    Centos 6.8下虚拟机网络配置教程 标签:centos 6.8 网络配置实例 主题:centos 6.8 下...

  • Mail安装

    环境 系统:CentOS 6.8 mail安装配置 安装 配置 测试

  • Ansible安装

    环境 系统:CentOS 6.8 Ansible安装 Ansible配置 配置主文件# vim /etc/ansi...

  • Ansible安装配置

    环境 系统:CentOS 6.8 Ansible安装 Ansible配置 配置主文件 创建文件夹 配置invent...

  • zabbix安装及jmx监控tomcat参数设置

    系统环境:centos6.8zabbix5.0mysql5.6安装网上很多不再赘述 jmx监控项配置及相关图形配置...

  • 小白建网站系列之---配置apache

    说在前头,我选择的系统是Centos 6.8,以下操作及命令均以6.8版本为准,其他版本不保证。 今天我们配置ap...

  • 2018-03-09

    centos6.8redis集群配置(一台linux上配置集群) 1.下载redis redis4.0.8下载地址...

  • Linux文集目录

    持续更新中。。。。 安装系统及基本配置 一 Vmware12上安装Centos6.8二 配置网络,连接外网三 升级...

网友评论

      本文标题:Rethat 6.8配置样本源

      本文链接:https://www.haomeiwen.com/subject/rnyetxtx.html