vi /etc/apt/sources.list
deb wheezy main contrib non-freedeb-src wheezy main contrib non-free
deb wheezy-updates main contrib non-free
deb-src wheezy-updates main contrib non-free
deb -security wheezy/updates main contrib non-free
deb-src -security wheezy/updates main contrib non-free
apt-get update
centos
修改centos預設yum源為mirrors.aliyun.com
1、首先備份系統自帶yum源配置檔案/etc/yum.repos.d/centos-base.repo
1[root@localhost ~]
# mv /etc/yum.repos.d/centos-base.repo /etc/yum.repos.d/centos-base.repo.backup
1[root@localhost ~]
# wget -o /etc/yum.repos.d/centos-base.repo
centos6
1[root@localhost ~]
# wget -o /etc/yum.repos.d/centos-base.repo
centos5
1[root@localhost ~]
# wget -o /etc/yum.repos.d/centos-base.repo
3、執行yum makecache生成快取
1[root@localhost ~]
# yum makecache
4、這時候再更新系統就會看到以下mirrors.aliyun.com資訊12
3456
[root@localhost ~]
# yum -y update
已載入外掛程式:fastestmirror, refresh-packagekit, security
設定更新程序loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Linux下配置軟體安裝源 更新
首先備份原來的 mv etc yum.repos d centos base.repo etc yum.repos d centos base.repo backup centos 7 阿里雲的yum源 實際測試這個速度比163的快一點,大概十幾毫秒。com repo centos 7.repoce...
linux更新軟體源
錯誤 e encountered a section with no package header e problem with mergelist var lib apt lists it.archive.ubuntu.com ubuntu dists natty universe i18n tr...
Linux更新軟體源
我們需要對apt源的配置檔案進行修改 進入 etc apt目錄,我們可以看到sources.list檔案。為了保證安全,我們在修改前先把sources.list檔案進行備份 sudo cp sources.list sources.list.bak建議先安裝vim編輯工具,因為自帶的vi特別難用,v...