1. 程式人生 > >Ubuntu 將apt-get修改為163的源

Ubuntu 將apt-get修改為163的源

1:編輯檔案

gedit /etc/apt/sources.list

2:將檔案的資訊修改為如下

deb http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse 
deb-src http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse 
deb http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted 
deb-src
http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted deb http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted deb http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted deb-src http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted deb-src http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted deb-src http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted

3:apt清除原先的配置並更新

apt-get clean
apt-get
update apt-get upgrade

4:測試安裝

apt-get install mysql

5:這種這麼普遍的需求,當然有圖形介面可以操作啦

想要換成163的源的話,可以使用圖形介面的方式去:

----->  Ubuntu Software Center   
----->  Ubuntu Software  
----->  Download from  
-----> choose ‘Other…’ 
-----> choose ‘China   
-----> mirrors.163.com   
-----> Choose server’
-----> Close

其實它的原理就是修改/etc/apt/sources.list檔案為163對應的url