Launching YUM and WGET through a proxy

Run WGET through a proxy: Open the file / etc / wgetrc as root Remove the comment from the http_proxy parameter. We register the address with the port for example: http://192.168.0.1:3128 Next, set the use_proxy parameter to on And if the proxy is authorized, add proxy-user and proxy-password

http_proxy = http://192.168.0.1:3128# ftp_proxy = http://192.168.0.1:3128use_proxy = onproxy-user = userproxy-password = password

If you have different accounts for the proxy, create a file in the user’s home directory .wgetrc And write down the settings for the user there (login and password for the proxy, for example)

Launch YUM through a proxy: Open the /etc/yum.conf file as root Add proxy = http: // login: pass @ proxy: port / to the end.

[[email protected] ~]# echo proxy = http: // user: password @ proxy: port / >> /etc/yum.conf[[email protected] ~]# yum update

For RPM Package Manager, set environment variables in / etc / profile or ~ / .bash_profile

[[email protected] ~]# export http_proxy = http: // user: password @ proxy: port /[[email protected] ~]# export ftp_proxy = http: // user: password @ proxy: port /

Sidebar