Rate This Document
Findability
Accuracy
Completeness
Readability

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.

  1. Modify the gunicorn_plugin.service file.
    • For Ubuntu:
      1
      vi /lib/systemd/system/gunicorn_plugin.service
      
    • For other OSs:
      1
      vi /usr/lib/systemd/system/gunicorn_plugin.service
      

    gunicorn_plugin.service is the file of the Kunpeng DevKit subtool service.

  2. In the gunicorn_plugin.service file, add the following environment variables next to [Service]:
    Environment="http_proxy=ip:port"
    Environment="https_proxy=ip:port"

    ip:port indicates the IP address and port number of the proxy server.

  3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Restart the service.
    1. Reload the configuration file.
      1
      systemctl daemon-reload
      
    2. Restart the service.
      1
      systemctl restart gunicorn_plugin.service
      
  5. Configure the DNS. (Skip this step if the DNS has been configured.)
    1. Open the resolv.conf file.
      1
      vi /etc/resolv.conf
      
    2. Add the following content to the file:
      nameserver ip

      ip indicates the DNS server IP address.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.