Home  >  Article  >  Operation and Maintenance  >  How to set up proxy in linux

How to set up proxy in linux

WBOY
WBOYOriginal
2022-01-27 12:00:2625711browse

Method: 1. Use the "vi /etc/yum.conf" command to add a proxy under "yum.conf"; 2. Use the "vi /etc/wgetrc" command to add "http_proxy=IP:PORT ftp_proxy =IP:PORT" to set the proxy.

How to set up proxy in linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

How to set up a proxy in Linux

1. yum proxy setting

You can add a proxy under yum.conf through the command vi /etc/yum.conf.
How to set up proxy in linux
After setting up, you can successfully execute the command: yum install package name

2, wget proxy setting

Same as above, add it through the command vi /etc/wgetrc acting.
Add the following two lines of code:
http_proxy=IP:PORT
ftp_proxy=IP:PORT
How to set up proxy in linux

3. System environment proxy settings

Passed vi ~/.bashrc Add the following three lines
export http_proxy="http://IP:PORT"
export https_proxy="http:// IP:PORT"
export ftp_proxy=$http_proxy
How to set up proxy in linux
Execute source ~/.bashrc after saving and exiting.

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of How to set up proxy in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]