Configuring Proxies to the Package Repository for Non-Global Zones
You have two options when connecting to the package repository from a zone. You can create persistent proxies, or specify the proxies during package install.
-
You set persistent proxies in an image by using the ‐-proxy option as described in Chapter 5, Configuring Installed Images in Updating Systems and Adding Software in Oracle Solaris 11.4.
-
To specify proxies during install, you modify the
system-repository
service properties to use the same proxies as thehttp_proxy
andhttps_proxy
environment variables. See thepkg
(1) man page.
Access to repositories configured in the global zone is provided to non-global zones using the system-repository
service. Any updates to proxies for origins in the global zone are automatically made to the system-repository
configuration. Using this method, no modifications are required to the system-repository
SMF service, as the following example illustrates.
Example 6-1 Configuring the Proxy in the Global Zone
$ pfexec pkg set-publisher --proxy http://www-proxy -g http://pkg-server pub
No port specification is required unless the proxy accepts connections on a port other than 80
. If zones are on the system, the system-repository service is restarted, and the proxy is used to provide access to pkg-server.