Loading...

Add proxy for yum

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"