The best way to configure proxy for YUM in RHEL, CentOS ?

A fast tutorial to configure proxy for YUM in RHEL, CentOS or Fedora Linux.

Proxy configuration in YUM in RHEL, CentOS, FedoraProxy configuration in YUM in RHEL, CentOS, Fedora


1. Allow proxy for yum in configuration file. (international)

In case your server is linked to web through proxy server then you’ll be able to outline it in configuration file situated at /and so forth/yum.conf. For definition it’s best to have under particulars prepared with you  –

Proxy server IP or hostnamePort for use for proxy connectivityUser ID and password for authenticating you at proxy if enabled on proxy

Now, edit /and so forth/yum.conf utilizing any textual content editor like vi and edit under parameters :







the place – : Proxy server title
3487 : Port
Username for proxy authentication : shrikant
Password for proxy authentiction : funWif#92cE

Save and exit. Record repo to confirm web connectivity utilizing yum repolist.

Utilizing this methodology you might be configuring proxy inside YUM configuration which will probably be used or obtainable for all customers on system at any time when they use yum instructions.

2. Utilizing profile proxy (Person particular)

Should you dont need international proxy setup by /and so forth/yum.conf file then you’ll be able to choose to outline proxy at consumer degree by defining it in consumer’s particular person profile recordsdata. Add under config in .profile ( .profile file has completely different names will depend on which login shell you might be utilizing) of the consumer in order that it will likely be loaded each time consumer logged in to system.

http_proxy=”http://shrikant:funWif#[email protected]:3487″
export http_proxy


http_proxy=“http://shrikant:funWif#[email protected]:3487”

export http_proxy


If proxy dont want authentication then you’ll be able to take away username, password portion and configure remainder of the half –

export http_proxy



export http_proxy


So, this proxy setting will probably be obtainable for all purposes who makes use of system proxy (like curl, yum) below that consumer’s login. Ask consumer to login and confirm proxy by refreshing yum repo.


Source link


Please enter your comment!
Please enter your name here