Red Hat 6.5-32構成CentOS 6.5-32 Yumソースを使用

5336 ワード

redhat 6が新しくインストールされました.5.インストール後、システムにログインし、yum updateを使用してシステムを更新します.ヒント:
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
更新できません.
redhatのデフォルトで持参したyumソースは、更新するために登録する必要があります.私たちはお金を使わなくても更新できると思います.redhatのyumソースを置き換える必要があります.
1.yumパッケージがインストールされているかどうかを確認する
RHELにyumがインストールされているか、インストールされている場合、どのyumパッケージがあるかを確認します.
[root@localhost ~]# rpm -qa |grep yum
yum-metadata-parser-1.0-8.fc6
yum-3.0.1-5.el5
yum-rhn-plugin-0.4.3-1.el5
yum-updatesd-3.0.1-5.el5
2 redhatが持参したyumパッケージを削除する
上に表示されているyumパッケージをすべてアンインストールします.
[root@localhost~]#rpm-qa|grep yum|xargs rpm-e--nodeps(依存をチェックせず、rpmパケットを直接削除)
再利用
[root@localhost ~]# rpm -qa |grep yum
[root@localhost ~]# 
アンインストールが完了したことを示す情報は表示されません.
3.新しいyumパッケージをダウンロードします.Centos 6を使用する.5のyumバッグ# wget http://mirrors.163.com/centos/6.5/os/i386/Packages/yum-metadata-parser-1.1.2-16.el6.i686.rpm # wget http://mirrors.163.com/centos/6.5/os/i386/Packages/yum-3.2.29-40.el6.centos.noarch.rpm # wget http://mirrors.163.com/centos/6.5/os/i386/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
yumパッケージのインストール
注意:単一のインストールパッケージは、yumとyum-fastestmirrorが互いに依存するなど、他のパッケージに依存する可能性があります.そのため、これらのパッケージをすべて一緒に置いて、1行のコマンドで同時にインストールすることができます.
<code class="hljs avrasm has-numbering">rpm -ivh *<span class="hljs-preprocessor">.rpm</span></code>

4.yumソースを交換してください.163のソースを使用# cd /etc/yum.repos.d/ # wget  http://mirrors.163.com/.help/CentOS6-Base-163.repo # vi CentOS6-Base-163.repo
ファイルを編集して、ファイルの中の$releaseverをすべてバージョン番号に置き換えます.つまり6.5が最後に保存されます.あるいは下のメモリをCentOS 6-Base-163に直接コピーする.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-6.5 - Base - 163.com baseurl=http: //mirrors .163.com /centos/6 .5 /os/ $basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=os gpgcheck=1 gpgkey=http: //mirror .centos.org /centos/RPM-GPG-KEY-CentOS-6
  #released updates  [updates] name=CentOS-6.5 - Updates - 163.com baseurl=http: //mirrors .163.com /centos/6 .5 /updates/ $basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.5&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.5 - Extras - 163.com baseurl=http: //mirrors .163.com /centos/6 .5 /extras/ $basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=extras gpgcheck=1 gpgkey=http: //mirror .centos.org /centos/RPM-GPG-KEY-CentOS-6
  #additional packages that extend functionality of existing packages [centosplus] name=CentOS-6.5 - Plus - 163.com baseurl=http: //mirrors .163.com /centos/6 .5 /centosplus/ $basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=centosplus gpgcheck=1 enabled=0 gpgkey=http: //mirror .centos.org /centos/RPM-GPG-KEY-CentOS-6
  #contrib - packages by Centos Users [contrib] name=CentOS-6.5 - Contrib - 163.com baseurl=http: //mirrors .163.com /centos/6 .5 /contrib/ $basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=contrib gpgcheck=1 enabled=0 gpgkey=http: //mirror .centos.org /centos/RPM-GPG-KEY-CentOS-6
5.既存キャッシュのクリア
1 # yum clean all
キャッシュを再構築し、インストールソフトウェアの検索速度を向上
1 # yum makecache
6.システムの更新
1 # yum update