In this example, the solarisstudio repository exists in addition to the solaris repository. The solaris repository is accessible from http://localhost/ using port 81, as specified in the solaris instance of the pkg/server service. See Enabling Users to Retrieve Packages Using an HTTP Interface.
Use the add subcommand of the svccfg command to add a new instance of the pkg/server service.
$ svccfg -s pkg/server add studio
Set the path where this instance of the service can find the repository data.
$ svccfg -s pkg/server:studio setprop pkg/inst_root=/var/share/pkgrepos/solarisstudio
$ svccfg -s pkg/server:studio setprop pkg/port=82
See Configuring a Simple Prefixed Proxy for an example of setting the pkg/proxy_base.
Make sure the repository name and description are set as shown in Modifying Repository Property Values.
Restart the package depot server service.
$ svcadm refresh pkg/server:studio $ svcadm enable pkg/server:studio
$ svcs pkg/server STATE STIME FMRI online 14:54:16 svc:/application/pkg/server:default online 14:54:20 svc:/application/pkg/server:studio
If the pkg/server:studio instance is not online, use the svcs -xvL pkg/server:studio command to get more information to diagnose and fix the problem.
Open a browser window on the http://localhost:82/ location.
If you did not set the port number, the default is 80. View your repository at http://localhost:80/ or http://localhost/.
If the port number is also being used by another pkg/server instance, append the publisher name to the location to see the new packages. For example, view your repository at http://localhost:81/solarisstudio/.
Set the publisher origin to one of the following values:
The pkg/inst_root location.
$ pkg set-publisher -g /var/share/pkgrepos/solarisstudio/ solarisstudio
The pkg/port location.
$ pkg set-publisher -g http://localhost:82/ solarisstudio
See Also
See Multiple Repositories Under One Domain for information about running multiple repositories under one domain name with different prefixes such as http://pkg.example.com/solaris and http://pkg.example.com/studio.