发布网友 发布时间:2022-04-24 18:26
共1个回答
热心网友 时间:2022-04-09 03:23
debian配置apt-get方法如下:
1、需要电脑联网状态,在没有接入网络的情况下,采用最小化方式安装debian,默认是没有配置apt-get源的,这个时候是无法使用apt-get install 在线安装软件的,也无法使用putty等远程管理客户端连接服务器;
2、配置apt-get源:
cp /etc/apt/sources.list /etc/apt/sources.listbak #备份原有配置文件
nano /etc/apt/sources.list #编辑
注释掉如图本地光盘源这一行:
deb cdrom:[Debian GNU/Linux 6.0.4 _Squeeze_ - Official i386 DVD Binary-1 20120128-12:53]/ squeeze contrib main取消下面两行官方源前面的注释,添加以下代码:
deb http://mirrors.163.com/debian/ squeeze main non-free contrib
deb http://mirrors.163.com/debian/ squeeze-proposed-updates main contrib non-free
deb http://mirrors.163.com/debian-security/ squeeze/updates main contrib non-free
deb-src http://mirrors.163.com/debian/ squeeze main non-free contrib
deb-src http://mirrors.163.com/debian/ squeeze-proposed-updates main contrib non-free
deb-src http://mirrors.163.com/debian-security/ squeeze/updates main contrib non-free
deb http://ftp.sjtu.e.cn/debian/ squeeze main non-free contrib
deb http://ftp.sjtu.e.cn/debian/ squeeze-proposed-updates main contrib non-free
deb http://ftp.sjtu.e.cn/debian-security/ squeeze/updates main contrib non-free
deb-src http://ftp.sjtu.e.cn/debian/ squeeze main non-free contrib
deb-src http://ftp.sjtu.e.cn/debian/ squeeze-proposed-updates main contrib non-free
deb-src http://ftp.sjtu.e.cn/debian-security/ squeeze/updates main contrib non-free
3、ctrl+o #保存配置,ctrl+x #退出;
4、apt-get update #更新源,apt-get upgrade #更新系统。