- 论坛徽章:
- 0
|
在ubuntu server 8.04.1虚拟机中添加源的方法
第一个问题
最近做项目用到了ubuntu server,遇到一个问题,可以上网,
1.运行apt-get install unzi命令时
0% ....[192.168.43.149]....
一直是0%
2.运行apt-get update
也是同样的反映
奇怪,192.168.43.149是个什么地址,为什么不直接连接us.ubuntu.com
最后在/etc/apt/apt.conf中发现这个地址,原来是在里面设置了代理.删除就好了.
第二个问题
发现用us.ubuntu.com源还是觉得太慢了,想使用国内lupaworld的源.
1.先到http://mirror.lupaworld.com/source.html下载相应版本的源
这里是
deb http://mirror.lupaworld.com/ubuntu hardy main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/ubuntu-cn hardy main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-updates main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-backports main restricted universe multivers
把这个内容保存到addsource.txt(名字自定),上传到虚拟机里面.比如说~/addsource.txt
2. 在虚拟机里面,备份source.list
# cd /etc/apt
# cp source.list source.list.bak
# cat ~/addsource.txt >> source.list
# apt-get update
就可以了
第三问题: 添加cdrom 源
1. 把ubuntu-server版本添加到虚拟机的光驱,
2. #apt-cdrom add
3. #apt-get update
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/13637/showart_1684281.html |
|