Home > System Tutorial > LINUX > body text

How to set up proxy using CentOS command line

WBOY
Release: 2024-01-06 18:45:50
forward
930 people have browsed it

Set the global proxy as follows:

1. Set relevant environment variables in the profile file

# vi /etc/profile

http_proxy=http://192.168.20.20:3128 #Specify the proxy server addresses used by http, https and ftp protocols respectively

export http_proxy

2. Source /etc/profile takes effect.

After the modification is completed, log out and log in again.

For the yum proxy, you must also set up the /etc/yum.conf file and add the following code:

proxy=http://username:password@yourproxy:8080/

#If there is no password restriction, the following method is used

#proxy=http://yourproxy:8080/

In this way, yum operations go through the proxy

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

Related labels:
source:jb51.net
Statement of this Website
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 admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!