如何获得网络访问AWS VPC?

我有一个建立在Centos 7镜像上的非私有AWS VPC,然而我无法进行yum更新。你能帮我排忧解难,如何才能连接到外部网络进行更新和下载?

这里是我目前所看到的。

command:  echo $https_proxy
http://172.2x.xx.xx:8080


command: $ sudo yum -y update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not get metalink https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=x86_64 error was
14: curl#7 - "Failed to connect to 2620:52:3:1:dead:beef:cafe:fed6: Network is unreachable"
 * base: centos.host-engine.com
 * epel: fedora.mirrors.pair.com
 * extras: linux.cc.lehigh.edu
 * updates: centos.mirrors.tds.net
http://centos.s.uw.edu/centos/7.7.1908/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:4000:200:4a::38: Network is unreachable"
Trying other mirror.
http://centos.host-engine.com/7.7.1908/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2001:49f0:d064:5::2: Network is unreachable"
Trying other mirror.
http://mirror.centos.iad1.serverforge.org/7.7.1908/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.centos.iad1.serverforge.org/7.7.1908/os/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
http://mirror.mobap.edu/centos/7.7.1908/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to mirror.mobap.edu:80; Operation now in progress"
Trying other mirror.

解决方案:

私有VPC无法上网。

要启用互联网访问需要设置 网关 并将其中一个子网公开。该子网中的实例将能够访问互联网,并且可以从互联网上访问。

如果你的实例在一个私有子网中,你希望你的实例可以访问互联网,但不能从互联网上访问,那么必须在你的子网中设置 NAT网关或NAT实例.

给TA打赏
共{{data.count}}人
人已打赏
未分类

放松C++中的void *铸造

2022-9-8 13:12:38

未分类

部分设置LiveData的多个并发调用没有被观察到。

2022-9-8 13:12:40

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索