Configuring a Proxy
To deploy SDKs online, 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 network 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.
- For Ubuntu:
- In the gunicorn_plugin.service file, add the following environment variables next to [Service]:
Environment="http_proxy=http://ip:port" Environment="https_proxy=http://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.
- Reload the configuration file.
1systemctl daemon-reload - Restart the service.
1systemctl restart gunicorn_plugin.service
- 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:
nameserver ip
ip indicates the DNS server IP address.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the resolv.conf file.
Parent topic: Common Operations