2007-11-28 22:10:58
修改源并更新你的(k/x/ed)ubuntu
不同的网络状况连接以下源的速度不同。建议在添加前手动验证以下源的连接速度(ping下就行)。比如说北京网通用户连接cn99就非常慢,而ftp.sjtu.edu.cn是相对较快的源。选择最快的源可大大节省下载时间,请根据自己网络环境设置更新服务器,以达到最快的速度。
注意,你可以同时加入几个源。尽量选择一组官方的源(也就是下面的Archive.ubuntu.com的条目)直接加在文件的最後,以避免非官方源软件包不全时出现 404 Not Found 文件未发现的错误。建议电信用户使用cn99和台湾大学的源,网通用户使用台湾大学的源,教育网用户使用教育网的源。
打开终端方法:
按下ALT+F2 -> gnome-terminal -> 运行 #(ed)ubuntu
按下ALT+F2 -> konsole -> 运行 #Kubuntu
按下ALT+F2 -> xfce4-terminal -> 运行 #xubuntu
在终端执行命令:
备份当前的源列表,以便日後需要时恢复:
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
编辑源列表
gksu gedit /etc/apt/sources.list #(ed)ubuntu
kdesu kate /etc/apt/sources.list #kubuntu
gksu mousepad /etc/apt/sources.list #xubuntu
sudo vim /etc/apt/sources.list #通用
从以下各服务器列表内容中选择一段替换文件中的所有内容,为防止非官方源中软件包不全的问题,请在sources.list文件中尾部添加一组官方源。
Archive.ubuntu.com更新服务器(欧洲,此为官方源,电信网通用户使用):
deb http://archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
Ubuntu.cn99.com更新服务器(江苏省常州市电信,推荐电信用户使用):
deb http://ubuntu.cn99.com/ubuntu/ gutsy main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ gutsy-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ gutsy-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ gutsy main restricted universe multiverse
Mirrors.shlug.org更新服务器(电信服务器,Ubuntu China Official Mirror, maintained by Shanghai Linux User Group):
deb http://cn.archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse
Mirror.lupaworld.com更新服务器(浙江省杭州市双线服务器):
deb http://mirror.lupaworld.com/ubuntu gutsy main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu gutsy-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu gutsy-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu gutsy-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu gutsy-proposed main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu gutsy main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu gutsy-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu gutsy-updates main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu gutsy-backports main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu gutsy-proposed main restricted universe multiverse
厦门大学更新服务器(教育网服务器):
deb ftp://ubuntu.realss.cn/ubuntu/ gutsy main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ gutsy-backports restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ gutsy-proposed main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ gutsy-security main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ gutsy main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ gutsy-proposed main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ gutsy-security main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ gutsy-updates main restricted universe multiverse
成都市电子科技大学更新服务器(教育网,推荐校园网和网通用户使用):
deb http://ubuntu.uestc.edu.cn/ubuntu/ gutsy main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-backports main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-proposed main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-security main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-updates main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ gutsy main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-backports main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-security main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-updates main multiverse restricted universe
== 如果无法解析uestc.edu.cn域名,请使用以下地址 ==
deb http://ubuntu.dormforce.net/ubuntu/ gutsy main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ gutsy-backports main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ gutsy-proposed main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ gutsy-security main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ gutsy-updates main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ gutsy main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ gutsy-backports main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ gutsy-security main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ gutsy-updates main multiverse restricted universe
上海市上海交通大学更新服务器(教育网,推荐校园网和网通用户使用):
deb http://ftp.sjtu.edu.cn/ubuntu/ gutsy main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ gutsy-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ gutsy-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ gutsy-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ gutsy-updates main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ gutsy main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ gutsy-backports main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ gutsy-security main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ gutsy-updates main multiverse restricted universe
中国科学技术大学更新服务器(教育网,推荐校园网和网通用户使用):
deb http://debian.ustc.edu.cn/ubuntu/ gutsy main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ gutsy-backports main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ gutsy-proposed main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ gutsy-security main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ gutsy-updates main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-backports main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-security main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-updates main multiverse restricted universe
北京市清华大学更新服务器(教育网,推荐校园网和网通用户使用):
deb http://mirror9.net9.org/ubuntu/ gutsy main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ gutsy-backports main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ gutsy-proposed main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ gutsy-security main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ gutsy-updates main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ gutsy main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ gutsy-backports main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ gutsy-security main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ gutsy-updates main multiverse restricted universe
沈阳市东北大学更新服务器(教育网,推荐校园网和网通用户使用):
deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy main multiverse restricted universe
deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-backports main multiverse restricted universe
deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-proposed main multiverse restricted universe
deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-security main multiverse restricted universe
deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-updates main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-backports main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-security main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-updates main multiverse restricted universe
中国台湾台湾大学更新服务器(推荐网通用户使用,电信PING平均响应速度41MS。强烈推荐此源,比较完整,较少出现同步问题):
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-backports main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-security main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-proposed main restricted universe multiverse
Mirror.vmmatrix.net更新服务器(上海市电信,推荐电信网通用户使用):
deb http://mirror.vmmatrix.net/ubuntu/ gutsy main restricted universe multiverse
deb-src http://mirror.vmmatrix.net/ubuntu/ gutsy main restricted universe multiverse
deb http://mirror.vmmatrix.net/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://mirror.vmmatrix.net/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://mirror.vmmatrix.net/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://mirror.vmmatrix.net/ubuntu/ gutsy-backports main restricted universe multiverse
deb http://mirror.vmmatrix.net/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://mirror.vmmatrix.net/ubuntu/ gutsy-security main restricted universe multiverse
deb http://mirror.vmmatrix.net/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://mirror.vmmatrix.net/ubuntu/ gutsy-proposed main restricted universe multiverse
ubuntu.cnsite.org更新服务器(福建省福州市电信):
deb http://ubuntu.cnsite.org/ubuntu/ gutsy main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ gutsy main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ gutsy-backports main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ gutsy-security main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://ubuntu.cnsite.org/ubuntu/ gutsy-proposed main restricted universe multiverse
mirror.rootguide.org更新服务器(上海市电信):
deb http://mirror.rootguide.org/ubuntu/ gutsy main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ gutsy main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ gutsy-backports main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ gutsy-security main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://mirror.rootguide.org/ubuntu/ gutsy-proposed main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu-cn/ gutsy main restricted universe multiverse
台湾的官方源速度也相当不错,有时甚至快于内地的:
deb http://tw.archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverseUbuntu-cn
推荐各位中文用户添加:
deb http://archive.ubuntu.org.cn/ubuntu-cn/ gutsy main restricted universe multiverse
也可以到以下网址自定义产生若干源:
http://www.ubuntulinux.nl/source-o-matic
以下网址有极其全面的源,以供补充:
http://italy.copybase.ch/blog/lista-repository-sourceslist-ottimizzata-per-ubuntu-kubuntu-linux/
官方采集的源列表:
https://launchpad.net/ubuntu/+archivemirrors
保存编辑好的文件,执行以下命令更新
sudo apt-get update #这一步是更新你的源列表,换源後必须执行
sudo apt-get dist-upgrade #这一步是更新软件,如果你对新版本软件的需求不是那么迫切,可以不执行
设置系统中文环境支持
安装语言包
Kubuntu:
主菜单 -> 系统设置 -> 区域与语言 -> 安装新语言 -> Chinese -> 安装
主菜单 -> 系统设置 -> 区域与语言 -> 选择系统语言 -> 简体中文 -> 确定
相对的命令是:
sudo apt-get install language-pack-kde-zh-base language-pack-kde-zh
Ubuntu:
系统 -> 系统管理 -> 语言支持,在列表中的Chinese条目打勾。
同时将默认语言修改为Chinese(中国)并确定。
配置字体,使中文看起来更漂亮(如果是中文系统并且已照上面做过,那么可以跳过)
sudo fontconfig-voodoo -f -s zh_CN
scim输入法安装及设置
如果您要在非CJK(中日韩)的locales下使用scim,只需在System->Administration->Language Support 选中 Chinese 的 checkbox,点击 Apply 即可(可能被提示需要重新启动计算机)。不需再如从前需要在Terminal进行各种设置,安装相关软件包亦由系统自动执行。
以上适用Gnome环境。
如果在KDE下面使用scim,建议使用如下设置:
sudo apt-get install im-switch libapt-pkg-perl
sudo im-switch -s scim-xim -z default
安装JAVA环境支持
打开终端,执行以下命令,或使用Adept/新立得软件管理器,在其中分别搜索"sun-java6-jre"和"sun-java6-jdk"并标记安装。
sudo apt-get install sun-java6-jre
如果空间富裕,建议安装一个JDK。
sudo apt-get install sun-java6-jdk
提示:安装过程中需要你回答是否同意使用协议(终端中红蓝色的提示界面),此时按tab键至OK,再按回车即可正常安装。
设置当前默认的java解释器:
sudo update-alternatives --config java
执行后会出现类似如下的画面:
There are 2 alternatives which provide `java'.
Selection Alternative
-----------------------------------------------
1 /usr/bin/gij-wrapper-4.1
*+ 2 /usr/lib/jvm/java-6-sun/jre/bin/java
Press enter to keep the default[*], or type selection number:
输入有包含 "sun" 的行的前面的数字。如上面显示,则输入2,然後回车确定。
配置JAVA环境变量:
sudo gedit /etc/environment
在其中添加如下两行:
CLASSPATH=/usr/lib/jvm/java-6-sun/lib
JAVA_HOME=/usr/lib/jvm/java-6-sun
sudo gedit /etc/jvm
将文件中的
/usr/lib/jvm/java-6-sun
这一行填入到配置块的顶部
安装浏览器的JAVA Plugin(可选):
sudo apt-get install sun-java6-plugin