怎样通过代理使用apt(我用虚拟机安装的Linux)?
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 43
- 注册时间: 2005-11-24 1:26
怎样通过代理使用apt(我用虚拟机安装的Linux)?
我公司上网需要通过一台服务器代理上网,并且需要用户名和密码。
我在网上搜索了很多方法,都不行。
请大家帮忙!
(版本6.06,我使用vmware安装的ubuntu)
我在网上搜索了很多方法,都不行。
请大家帮忙!
(版本6.06,我使用vmware安装的ubuntu)
-
- 帖子: 43
- 注册时间: 2005-11-24 1:26
不行啊,我找了好久的解决办法都没有找到。。。
各位再帮着想象办法
-
- 帖子: 94
- 注册时间: 2006-10-15 18:53
-
- 帖子: 43
- 注册时间: 2005-11-24 1:26
-
- 帖子: 8
- 注册时间: 2006-11-18 23:51
只要你的主机(你的应该是XP吧? )可以上网...那么按照下面的步骤
连接原理: 虚拟机网络<--->主机中的vmware虚拟网卡(共两个)<--->主机的本地网络共享<--->路由器代理<--->互联网
1...首先确认你的XP是否按装了vmware的虚拟网卡了没有?共两个,一个是VMware Network Adapter VMnet1,和VMware Network Adapter VMnet8.如果没有,重装vmware。
2...在vmware设置 网卡为 host-only(对应VMware Network Adapter VMnet1)
3...在XP的网络连接中设置 internet连接共享,选择VMware Network Adapter VMnet1。
4....检查主机的虚拟网卡【VMware Network Adapter VMnet1】的IP地址,我的是192.168.0.1。
5...在虚拟机中,也就是ubuntu中,在【系统】--->【系统管理】--->【联网】,设置网卡属性,IP地址必须与VMware Network Adapter VMnet1的IP地址段相对应,我的配置是:192.168.0.6,255.255.255.0,192.168.0.1(这个网关地址就是主机VMware Network Adapter VMnet1的IP地址)
6...在虚拟机中,也就是ubuntu中,在【系统】--->【系统管理】--->【联网】,设置DNS属性,我的是192.168.0.1.
经过这样设置可以在vmware的虚拟机上网了。速度相对主机会有点慢,毕竟经过了这么多层的中继。
连接原理: 虚拟机网络<--->主机中的vmware虚拟网卡(共两个)<--->主机的本地网络共享<--->路由器代理<--->互联网
1...首先确认你的XP是否按装了vmware的虚拟网卡了没有?共两个,一个是VMware Network Adapter VMnet1,和VMware Network Adapter VMnet8.如果没有,重装vmware。
2...在vmware设置 网卡为 host-only(对应VMware Network Adapter VMnet1)
3...在XP的网络连接中设置 internet连接共享,选择VMware Network Adapter VMnet1。
4....检查主机的虚拟网卡【VMware Network Adapter VMnet1】的IP地址,我的是192.168.0.1。
5...在虚拟机中,也就是ubuntu中,在【系统】--->【系统管理】--->【联网】,设置网卡属性,IP地址必须与VMware Network Adapter VMnet1的IP地址段相对应,我的配置是:192.168.0.6,255.255.255.0,192.168.0.1(这个网关地址就是主机VMware Network Adapter VMnet1的IP地址)
6...在虚拟机中,也就是ubuntu中,在【系统】--->【系统管理】--->【联网】,设置DNS属性,我的是192.168.0.1.
经过这样设置可以在vmware的虚拟机上网了。速度相对主机会有点慢,毕竟经过了这么多层的中继。
-
- 帖子: 43
- 注册时间: 2005-11-24 1:26
谢谢,我明天上班试试看。
:)
- sinoyster
- 帖子: 958
- 注册时间: 2005-10-16 13:24
- 来自: 四川成都
- 联系:
-
- 帖子: 43
- 注册时间: 2005-11-24 1:26
SOSOS
I can't insert chinese......
When I followed upsteys, and do "sudo apt-get update ", appre below.
忽略 http://ubuntu.cn99.com dapper Release.gpg
忽略 http://ubuntu.cn99.com dapper-updates Release.gpg
忽略 http://ubuntu.cn99.com dapper-security Release.gpg
忽略 http://ubuntu.cn99.com dapper-backports Release.gpg
忽略 http://ubuntu.cn99.com dapper Release.gpg
忽略 http://ubuntu.cn99.com dapper Release
忽略 http://ubuntu.cn99.com dapper-updates Release
忽略 http://ubuntu.cn99.com dapper-security Release
忽略 http://ubuntu.cn99.com dapper-backports Release
忽略 http://ubuntu.cn99.com dapper Release
忽略 http://ubuntu.cn99.com dapper/main Packages
忽略 http://ubuntu.cn99.com dapper/restricted Packages
忽略 http://ubuntu.cn99.com dapper/universe Packages
忽略 http://ubuntu.cn99.com dapper/multiverse Packages
忽略 http://ubuntu.cn99.com dapper-updates/main Packages
忽略 http://ubuntu.cn99.com dapper-updates/restricted Packages
忽略 http://ubuntu.cn99.com dapper-updates/universe Packages
忽略 http://ubuntu.cn99.com dapper-updates/multiverse Packages
忽略 http://ubuntu.cn99.com dapper-security/main Packages
忽略 http://ubuntu.cn99.com dapper-security/restricted Packages
忽略 http://ubuntu.cn99.com dapper-security/universe Packages
忽略 http://ubuntu.cn99.com dapper-security/multiverse Packages
忽略 http://ubuntu.cn99.com dapper-backports/main Packages
忽略 http://ubuntu.cn99.com dapper-backports/restricted Packages
忽略 http://ubuntu.cn99.com dapper-backports/universe Packages
忽略 http://ubuntu.cn99.com dapper-backports/multiverse Packages
忽略 http://ubuntu.cn99.com dapper/main Packages
忽略 http://ubuntu.cn99.com dapper/restricted Packages
忽略 http://ubuntu.cn99.com dapper/universe Packages
忽略 http://ubuntu.cn99.com dapper/multiverse Packages
错误 http://ubuntu.cn99.com dapper/main Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper/restricted Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper/universe Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper/multiverse Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-updates/main Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-updates/restricted Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-updates/universe Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-updates/multiverse Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-security/main Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-security/restricted Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-security/universe Packages
从服务器读取数据出错 - read (104 Connection reset by peer)
错误 http://ubuntu.cn99.com dapper-security/multiverse Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-backports/main Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-backports/restricted Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-backports/universe Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-backports/multiverse Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper/main Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper/restricted Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper/universe Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper/multiverse Packages
407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... ackages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... i386/Packa ges.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... 86/Package s.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... i386/Packa ges.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... y-i386/Pac kages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... /binary-i3 86/Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... inary-i386 /Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... /binary-i3 86/Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... ry-i386/Pa ckages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... d/binary-i 386/Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... binary-i38 6/Packages.gz 从服务器读取数据出错 - read (104 Connection reset by peer)
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... e/binary-i 386/Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... ary-i386/P ackages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... ed/binary- i386/Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... /binary-i3 86/Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... se/binary- i386/Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu-cn/dists/ ... 6/Packages .gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu-cn/dists/ ... ry-i386/Pa ckages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu-cn/dists/ ... -i386/Pack ages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu-cn/dists/ ... ry-i386/Pa ckages.gz 407 Proxy authorization required
正在读取软件包列表... 完成
E: 有一些索引文件不能下载,它们可能被忽略了,也可能转而使用了旧的索引文件。
Why??? Pls help me.
When I followed upsteys, and do "sudo apt-get update ", appre below.
忽略 http://ubuntu.cn99.com dapper Release.gpg
忽略 http://ubuntu.cn99.com dapper-updates Release.gpg
忽略 http://ubuntu.cn99.com dapper-security Release.gpg
忽略 http://ubuntu.cn99.com dapper-backports Release.gpg
忽略 http://ubuntu.cn99.com dapper Release.gpg
忽略 http://ubuntu.cn99.com dapper Release
忽略 http://ubuntu.cn99.com dapper-updates Release
忽略 http://ubuntu.cn99.com dapper-security Release
忽略 http://ubuntu.cn99.com dapper-backports Release
忽略 http://ubuntu.cn99.com dapper Release
忽略 http://ubuntu.cn99.com dapper/main Packages
忽略 http://ubuntu.cn99.com dapper/restricted Packages
忽略 http://ubuntu.cn99.com dapper/universe Packages
忽略 http://ubuntu.cn99.com dapper/multiverse Packages
忽略 http://ubuntu.cn99.com dapper-updates/main Packages
忽略 http://ubuntu.cn99.com dapper-updates/restricted Packages
忽略 http://ubuntu.cn99.com dapper-updates/universe Packages
忽略 http://ubuntu.cn99.com dapper-updates/multiverse Packages
忽略 http://ubuntu.cn99.com dapper-security/main Packages
忽略 http://ubuntu.cn99.com dapper-security/restricted Packages
忽略 http://ubuntu.cn99.com dapper-security/universe Packages
忽略 http://ubuntu.cn99.com dapper-security/multiverse Packages
忽略 http://ubuntu.cn99.com dapper-backports/main Packages
忽略 http://ubuntu.cn99.com dapper-backports/restricted Packages
忽略 http://ubuntu.cn99.com dapper-backports/universe Packages
忽略 http://ubuntu.cn99.com dapper-backports/multiverse Packages
忽略 http://ubuntu.cn99.com dapper/main Packages
忽略 http://ubuntu.cn99.com dapper/restricted Packages
忽略 http://ubuntu.cn99.com dapper/universe Packages
忽略 http://ubuntu.cn99.com dapper/multiverse Packages
错误 http://ubuntu.cn99.com dapper/main Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper/restricted Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper/universe Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper/multiverse Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-updates/main Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-updates/restricted Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-updates/universe Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-updates/multiverse Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-security/main Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-security/restricted Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-security/universe Packages
从服务器读取数据出错 - read (104 Connection reset by peer)
错误 http://ubuntu.cn99.com dapper-security/multiverse Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-backports/main Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-backports/restricted Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-backports/universe Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper-backports/multiverse Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper/main Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper/restricted Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper/universe Packages
407 Proxy authorization required
错误 http://ubuntu.cn99.com dapper/multiverse Packages
407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... ackages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... i386/Packa ges.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... 86/Package s.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... i386/Packa ges.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... y-i386/Pac kages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... /binary-i3 86/Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... inary-i386 /Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... /binary-i3 86/Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... ry-i386/Pa ckages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... d/binary-i 386/Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... binary-i38 6/Packages.gz 从服务器读取数据出错 - read (104 Connection reset by peer)
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... e/binary-i 386/Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... ary-i386/P ackages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... ed/binary- i386/Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... /binary-i3 86/Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu/dists/dap ... se/binary- i386/Packages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu-cn/dists/ ... 6/Packages .gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu-cn/dists/ ... ry-i386/Pa ckages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu-cn/dists/ ... -i386/Pack ages.gz 407 Proxy authorization required
无法下载 http://ubuntu.cn99.com/ubuntu-cn/dists/ ... ry-i386/Pa ckages.gz 407 Proxy authorization required
正在读取软件包列表... 完成
E: 有一些索引文件不能下载,它们可能被忽略了,也可能转而使用了旧的索引文件。
Why??? Pls help me.
-
- 帖子: 43
- 注册时间: 2005-11-24 1:26
-
- 帖子: 43
- 注册时间: 2005-11-24 1:26
哈哈,解决了~~~~~~~~~~~
感谢sinoyster(8楼)
我给他的回复注释一下:
“console 下设置http_proxy和ftp_proxy
如果用synapgic的话要编辑/etc/apt/apt.conf,添加
Acquire::http::Proxy "http://user:password@proxy:port";
Acquire::ftp::Proxy "http://user:password@proxy:port";”
user:代理用的用户名
password:代理用的密码
proxy:代理的网址
port:代理的端口
谢谢!!!
我给他的回复注释一下:
“console 下设置http_proxy和ftp_proxy
如果用synapgic的话要编辑/etc/apt/apt.conf,添加
Acquire::http::Proxy "http://user:password@proxy:port";
Acquire::ftp::Proxy "http://user:password@proxy:port";”
user:代理用的用户名
password:代理用的密码
proxy:代理的网址
port:代理的端口
谢谢!!!