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_framework.service or gunicorn_plugin.service file. The following commands use the gunicorn_framework.service file as an example.
- For Ubuntu:
1vi /lib/systemd/system/gunicorn_framework.service - For other OSs:
1vi /usr/lib/systemd/system/gunicorn_framework.service
- gunicorn_framework.service is the file of the Kunpeng DevKit framework service.
- gunicorn_plugin.service is the file of the Kunpeng DevKit subtool service.
- For Ubuntu:
- In the gunicorn_framework.service file, add the following environment variables to the end of the [Service] field:
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.
1 2
systemctl restart gunicorn_framework.service systemctl 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