Configuring a Network Proxy
If you cannot directly access the Internet, configure a network proxy.
- Modify the profile file.
- Open /etc/profile.
1vim /etc/profile - Press i to enter the insert mode and add the following content to the /etc/profile file. Enter the user name, password, proxy IP address, and proxy port based on the actual requirements.
1 2 3
export http_proxy="http://Username:Password@Proxy IP address:proxy port" export https_proxy=$http_proxy export no_proxy=127.0.0.1,.huawei.com,localhost,local,.local
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Make the proxy take effect.
1source /etc/profile
- Open /etc/profile.
- Run the curl command to access any website. If the website information is displayed, the proxy is successfully configured and the Internet is connected.
Parent topic: Configuring the Compilation Environment