CentOS / RHEL / Fedora Linux: Use Yum Command With A Proxy Server

www.laut‮c.irut‬om
CentOS / RHEL / Fedora Linux: Use Yum Command With A Proxy Server

To use the yum package manager with a proxy server on CentOS, RHEL, or Fedora Linux, you can follow these steps:

  1. Edit the /etc/yum.conf file and add the following lines to specify the proxy server and port number:
proxy=http://PROXY_SERVER:PORT
proxy_username=USERNAME
proxy_password=PASSWORD

Replace PROXY_SERVER, PORT, USERNAME, and PASSWORD with the appropriate values for your proxy server.

  1. Save and close the /etc/yum.conf file.

  2. If you are using a username and password to authenticate with the proxy server, you will also need to configure the ~/.bashrc file to export the http_proxy and https_proxy environment variables. To do this, add the following lines to the ~/.bashrc file:

export http_proxy=http://USERNAME:PASSWORD@PROXY_SERVER:PORT/
export https_proxy=http://USERNAME:PASSWORD@PROXY_SERVER:PORT/

Replace PROXY_SERVER, PORT, USERNAME, and PASSWORD with the appropriate values for your proxy server.

  1. To apply the changes, run the following command:
source ~/.bashrc
  1. You should now be able to use the yum command with the proxy server. For example, to update the package list:
yum update

This will update the package list using the proxy server.

Note: The steps and syntax for configuring yum to use a proxy server may vary depending on your specific system and proxy server. Consult the documentation for your system and proxy

Created Time:2017-10-16 14:38:40  Author:lautturi