Home > Article > Operation and Maintenance > How to use network proxy on Linux server
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 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: Click Account and set the following parameters Finally click Start and run. 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_pointYou can use the following statement to install :ImportError: No module named pkg_resources
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 proxy127.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!