PVE安裝centOS6 yum問題

無法使用yum的處理

 

https://handle.idv.tw/centos6%E4%B8%AD%E7%84%A1%E6%B3%95%E4%BD%BF%E7%94%A8yum%E7%9A%84%E8%99%95%E7%90%86/


# vi /etc/yum.repos.d/CentOS-Base.repo


# CentOS-Base.repo [base] name=CentOS-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra baseurl=https://vault.centos.org/6.10/os/$basearch/ http://mirrors.aliyun.com/centos-vault/6.10/os/$basearch/ gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-$releasever - Updates #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra baseurl=https://vault.centos.org/6.10/updates/$basearch/ http://mirrors.aliyun.com/centos-vault/6.10/updates/$basearch/ gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra baseurl=https://vault.centos.org/6.10/extras/$basearch/ http://mirrors.aliyun.com/centos-vault/6.10/extras/$basearch/ gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra baseurl=https://vault.centos.org/6.10/centosplus/$basearch/ http://mirrors.aliyun.com/centos-vault/6.10/centosplus/$basearch/ gpgcheck=0 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib&infra=$infra baseurl=https://vault.centos.org/6.10/contrib/$basearch/ http://mirrors.aliyun.com/centos-vault/6.10/contrib/$basearch/ gpgcheck=0 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

 

 建立  epel.repo

# vi /etc/yum.repos.d/epel.repo

 

[epel] name=Extra Packages for Enterprise Linux 6 - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch failovermethod=priority enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 [epel-debuginfo] name=Extra Packages for Enterprise Linux 6 - $basearch - Debug #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 gpgcheck=1 [epel-source] name=Extra Packages for Enterprise Linux 6 - $basearch - Source #baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 gpgcheck=1

 

執行

yum makecache




------
手動配置有效倉庫安裝 Nginx

vi /etc/yum.repos.d/nginx.repo

添加以下內容:

[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/6/$basearch/ 

gpgcheck=0 

enabled=1

-----清理緩衝並安裝nginx
yum clean all 

yum install nginx -y

留言

這個網誌中的熱門文章

LDAP log紀錄

LDAP 存取控制 slapd.conf(伺服器設定檔)

透過python爬蟲, LINE Notify 通知 (股票) win10排程