You always need to configure a svc:/application/pkg/server SMF service instance. A pkg/server instance is required to provide the file system location of the repository to either a pkg/depot instance or a manual Apache configuration.
You could configure the default instance of the pkg/server service. This procedure shows how to create and configure a new instance.
Use the add subcommand to add a new instance of the pkg/server service named solaris.
$ svccfg -s pkg/server add solaris
Set the path where this instance of the service can find the repository data.
$ svccfg -s pkg/server:solaris setprop pkg/inst_root=/var/share/pkgrepos/solaris
For a complete list of pkg/server properties, see the pkg.depotd(8) man page.
To set multiple service properties, use the following command to edit all of the properties at once. Remember to remove the comment marker (#) from the beginning of any lines that you change.
$ svccfg -s pkg/server:solaris editprop
The following are examples of other properties that you could set:
Set the port number on which the depot server instance should listen for incoming package requests. By default, pkg.depotd listens for connections on port 80. To change the port, reset the pkg/port property.
To increase concurrent client access for a repository served by the pkg.depotd depot server, increase the value of the pkg/threads property.
The default value of the pkg/threads property is 60. The pkg/threads value is limited by available memory. Allow for 20 threads used per concurrent client. Scaling efficiency peaks at about 20 clients.
$ svccfg -s pkg/server:solaris setprop pkg/threads=400
Refresh and enable the pkg/server instance.
$ svcadm refresh pkg/server:solaris $ svcadm enable pkg/server:solaris
If the pkg/server:solaris instance is not online, use the svcs -xvL pkg/server:solaris command to get more information to diagnose and fix the problem.
To determine whether the repository server is working, open a browser window on the localhost location. By default, pkg.depotd listens for connections on port 80. If you have changed the port, open a browser window on the localhost:port_number location.
Set the publisher origin to the pkg/port location:
$ pkg set-publisher -g http://localhost:81/ solaris
See Configuring Publishers in Updating Systems and Adding Software in Oracle Solaris 11.4 for more information about configuring publishers.
Next Steps