Redhat 移除yum 並重新安裝

2021-09-02 13:27:24 字數 1510 閱讀 7719

1.刪除rhel6.4自帶的yum,

命令如下: rpm -qa | grep yum | xargs rpm -e --nodeps

wget 

wget

wget

wget

4.安裝yum

rpm -ivh  python-iniparse-0.3.1-2.1.el6.noarch.rpm

rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

rpm -ivh yum-3.2.29-69.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm //這兩個有依賴性一起安裝

5.配置repo檔案(/etc/yum.repos.d目錄下)

新建centos-base.repo檔案,內容為:

[base]

name=centos-$releasever - base - 163.com

baseurl=

#mirrorlist=

gpgcheck=1

gpgkey=

#released updates

[updates]

name=centos-$releasever - updates - 163.com

baseurl=

#mirrorlist=

gpgcheck=1

gpgkey=

#additional packages that may be useful

[extras]

name=centos-$releasever - extras - 163.com

baseurl=

#mirrorlist=

gpgcheck=1

gpgkey=

#additional packages that extend functionality of existing packages

[centosplus]

name=centos-$releasever - plus - 163.com

baseurl=

#mirrorlist=

gpgcheck=1

enabled=0

gpgkey=

#contrib - packages by centos users

[contrib]

name=centos-$releasever - contrib - 163.com

baseurl=

#mirrorlist=

gpgcheck=1

enabled=0

gpgkey=

6. yum clean all 清除原有快取

7. yum makecache 獲取yum列表

完成全部操作

Ubuntu下徹底解除安裝mysql並重新安裝

1 刪除 mysql 1sudo apt get autoremove purge mysql server 5.0 2sudo apt get remove mysql server 3sudo apt get autoremove mysql server 4sudo apt get remov...

重新安裝yum源

檢視yum安裝 rpm qa grep yum 展示如下 yum plugin fastestmirror 1.1.31 52.el7.noarch yum metadata parser 1.1.4 10.el7.x86 64 yum 3.4.3 163.el7.centos.noarch yum...

CentOS重新安裝yum

1 問題描述 有時會出現yum不可用的錯誤,可以先解除安裝再重灌。2 操作步驟 7 修改centos base sohu.repo,將其中的 releasever 更改為centos的版本 說明 vi centos base sohu.repo 使用 vi 命令編輯檔案 s releasever 7...