Configuring a Proxy
To perform certain tasks, you need to access the Internet to obtain resources. In an isolated network environment, you need to configure a proxy for accessing the Internet. If Internet access is available in the current environment, skip this section.
- Modify the gunicorn_plugin.service file.
- For Ubuntu:
1vi /lib/systemd/system/gunicorn_plugin.service - For other OSs:
1vi /usr/lib/systemd/system/gunicorn_plugin.service
gunicorn_plugin.service is the file of the Kunpeng DevKit subtool service. It is used to enable the Allow Access to Internet option for software package rebuild.
- For Ubuntu:
- In the gunicorn_plugin.service file, add the following environment variables next to [Service]:
1 2
Environment="http_proxy=ip:port" Environment="https_proxy=ip:port"
ip:port indicates the IP address and port number of the proxy server.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Restart the service.
- Run the following command to reload the configuration file:
1systemctl daemon-reload - Restart the service.
1systemctl restart gunicorn_plugin.service
- Run the following command to reload the configuration file:
- Configure the DNS. (Skip this step if the DNS has been configured.)
- Open the resolv.conf file.
1vi /etc/resolv.conf - Add the following content to the file:
1nameserver ip
ip indicates the IP address of the DNS server.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the resolv.conf file.
Parent topic: Configuration Before Using the Tool