更換centos源

來源:互聯網
上載者:User

標籤:ack   全自動   為我   log   阿里   back   選擇   repos   upd   

我的虛擬機器中在安裝GoAccess的時候,說找不到GeoIP...尷尬。

這裡暫時不說GeoIP的事情,我想更新一下我的yum源,因為我系統(Centos 6.5)使用的是預設的源。速度比較慢,這裡先換一下源,我採用的是阿里的源。

 

第一步:備份你的原鏡像檔案,以免出錯後可以恢複。

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

 

第二步:下載新的CentOS-Base.repo 到/etc/yum.repos.d/

CentOS 5    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repoCentOS 6    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repoCentos 7  wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

 

第三步:運行yum makecache產生緩衝

yum clean all    #清除緩衝目錄下的軟體包及舊的headersyum makecache    #將伺服器上的軟體包資訊在本機快取,以提高搜尋安裝軟體的速度
yum -y update #全部更新(可選)( -y 自動選擇y,全自動)

 

更換centos源

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.