How to make Yum work on virtual centos 6 on ESXi behind proxy?

Posted on

How to make Yum work on virtual centos 6 on ESXi behind proxy? – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, centos, proxy, vmware-esxi, virtual-machines.

I have ESXi in my LAN. All traffic from LAN is passed through a proxy. After installing Centos (network card in bridge)(VM on ESXi) I modified yum.conf for using proxy

proxy=http://myproxy:3128/

Executing yum update gives me error:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error >was
14: HTTP Error 403 : http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os
Error: Cannot find a valid baseurl for repo: base

Next set up proxy globaly by executing:

export http_proxy=http://myproxy:3128/

It also did not help :/

I’m wondering what is a problem ….any steal box behind proxy with set up proxy in yum.conf works perfectly. Could I missed some ESXi configuration for using it behind proxy (is there a way to set up proxy in ESXi ?? or i’m talking total nonsense)

I can log using ssh from my LAN to VM.

Solution :

Check your log files on your proxy server, and the local messages file on the system you are installing on. It is likely you are seeing some other networking error. Does a simple web request like curl work with the given proxy? Can you use curl to pull the mirror list? Also does your proxy require authentication? Also another thing to point out, sometimes the mirror list file points to ftp sites, thus you will need to have FTP allowed through your proxy. It could be your other hosts were never directed to an FTP server so it has not been an issue until now.

Also for the hosts which you say do work through the proxy, are you sure they are actually going through the proxy, and not just bypassing it due to a side effect in yum because there is a direct route to the Internet for them?

Leave a Reply

Your email address will not be published. Required fields are marked *