How to Set https_proxy and http_proxy To Override Global Zone Proxies

The following steps show how to use the http_proxy and https_proxy environment variables and SMF service properties to allow the global zone and non-global zones to access the IPS repositories.

Note that these environment variables override any proxy configuration set on the origin, unless the user is running the pkg command from a non-global zone to connect to the Universal Resource Identifier (URI) for a system publisher. In that case, the command goes through the system-repository.

A host name that can be resolved can also be used.

  1. Set the proxy in the shell for the global zone.

    Setting the proxy enables pkg commands to reach the publisher through the proxy server. This affects pkg operations that use an https or http URL and do not go through the system-repository for the global zone. For more information about the pkg command, see the pkg(1) man page.

    $ export http_proxy=http://192.0.2.0
    $ export https_proxy=http://192.0.2.0
  2. Enable the solaris zones on the system to use the configured system publishers that are directly accessible from the global zone.
    $ svccfg -s system-repository:default setprop config/http_proxy = http://192.0.2.0
    $ svccfg -s system-repository:default setprop config/https_proxy = http://192.0.2.0
  3. Make the change take effect in the live SMF repository.
    $ svcadm refresh system-repository
  4. Confirm that the setting is in effect.
    $ svcprop -p config/http_proxy system-repository
    $ svcprop -p config/https_proxy system-repository

See Also

See Also

you can update zones in parallel instead of serially. A parallel update provides a significant improvement in the time required to update all the zones on a system. For details and a configuration example, see Updating Multiple Non-Global Zones Concurrently in Updating Systems and Adding Software in Oracle Solaris 11.4.