Loading...

Add proxy for yum

:heavy_exclamation_mark: This post is older than a year. Consider some information might not be accurate anymore. :heavy_exclamation_mark:

If you are running a virtual machine for linux centos on your windows host and you have configured CNTLM, you can access in the virtual machine with yum the repository by adding this line in your /etc/yum.conf:

echo "proxy=http://10.0.2.2:3128" >> /etc/yum.conf

Add proxy_username and proxy_password if you need it.

To access with rpm the internet like

rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch

put in /etc/environment

http_proxy="http://10.0.2.2:3128"
https_proxy="https://10.0.2.2:3128"