Copying and Creating Package Repositories in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

How to Serve Multiple Repositories From Separate Locations

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.

  1. Create a new depot server instance.

    Use the add subcommand of the svccfg command to add a new instance of the pkg/server service.

    $ svccfg -s pkg/server add studio
  2. Check that you have added the new instance.
    $ svcs pkg/server
    STATE  STIME    FMRI
    online 14:54:16 svc:/application/pkg/server:default
    online 14:54:20 svc:/application/pkg/server:studio
    online 14:54:20 svc:/application/pkg/server:solaris
  3. Set the path to the repository.

    Set the path where this instance of the service can find the repository data.

    $ svccfg -s pkg/server:studio setprop pkg/inst_root=/export/IPSpkgrepos/SolarisStudio
  4. (Optional) Set the port number for the new instance.
    $ svccfg -s pkg/server:studio setprop pkg/port=82
  5. (Optional) Set the Apache proxy base.

    See Configuring a Simple Prefixed Proxy for an example of setting the pkg/proxy_base.

  6. Set the repository name and description.

    Make sure the repository name and description are set as shown in Modifying Repository Property Values.

  7. Start the repository service.

    Restart the package depot server service.

    $ svcadm refresh pkg/server:studio
    $ svcadm enable pkg/server:studio
  8. Test that the repository server is working.

    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/.

  9. Set the publisher origin.

    Set the publisher origin to one of the following values:

    • The pkg/inst_root location.

      $ pkg set-publisher -G '*' -M '*' -g /export/IPSpkgrepos/SolarisStudio/ \
      solarisstudio
    • The pkg/port location.

      $ pkg set-publisher -G '*' -M '*' -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.