How to sync yum repos via proxy


#1

Add your proxy’s address to the below files:

/etc/foreman/settings.yaml

:http_proxy: http://yourProxyIP:3128

/etc/foreman/plugins/katello.yaml

:cdn_proxy:
    host: http://yourProxyIP
    port: 3128
    user: "" # this is not optional
    password: ""

/etc/pulp/server/plugins.conf.d/yum_importer.json

 {
   "proxy_host": "http://yourProxyIP",
   "proxy_port: 3128,
   "proxy_username": null,
   "proxy_password": null,
   "max_speed": null,
   "gpg_sign_metadata": false
 }

Restart foreman

-HTH


#2

One thing I forgot to mention. Make copies of those files as if you run foreman-install again they will get overwritten…


#3

You can also use the installer options for it.

--katello-proxy-password Proxy password for authentication (default: nil)
--katello-proxy-port Port the proxy is running on (default: nil)
--katello-proxy-url URL of the proxy server (default: nil)
--katello-proxy-username Proxy username for authentication (default: nil)