Home  >  Article  >  Operation and Maintenance  >  How to use network proxy on Linux server

How to use network proxy on Linux server

王林
王林forward
2023-05-11 22:10:041770browse

Linux server uses network proxy

Since the campus server (Ubuntu) cannot be connected to the Internet, the Windows environment network proxy is used to connect to the Internet to download the required tool package

The steps are as follows

The prerequisite for using a network proxy must be that the Windows environment and the Linux environment must be able to ping each other (try to turn off the firewall).

Download the software CCProxy in the Windows environment to configure the CCProxy environment, click the (gear) button Option, configure the parameters as shown in the first picture, and then click Advanced to configure the parameters as shown in the second picture:

How to use network proxy on Linux server

How to use network proxy on Linux server

Click Account and set the following parameters

How to use network proxy on Linux server

Finally click Start and run.

How to use network proxy on Linux server

Open the Ubuntu terminal and use the following command to install the software:

1. Use pip3 to install the required packages: pip3 --proxy= 127.0.0.1:808 install package name

proxy=127.0.0.1:808 is to set the network proxy.

Change 127.0.0.1 to the IP address of your own proxy network, 808 is the port, and the setting is consistent with the port of CCProxy.

If you use the above statement, the error is as follows:

from pkg_resources import load_entry_point

ImportError: No module named pkg_resources

You can use the following statement to install :

python -m pip --proxy=127.0.0.1:808 install

2. Use apt-get to install the required packages: sudo apt- get -o Acquire::http::proxy="http://127.0.0.1:808/" install package name

Acquire::http::proxy="http: //127.0.0.1:808/” To set up the network proxy

127.0.0.1, change it to the IP address of your own proxy network, 808 is the port, set the port with CCProxy consistent.

The above is the detailed content of How to use network proxy on Linux server. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete