OpenSolaris 2009.06 Image Packaging System Guide
Previous Next

Creating Repositories

The IPS software in the 2009.06 release of OpenSolaris enables developers to perform a variety of tasks related to creating and publishing packages. The following tasks are supported for the 2009.06 release.

How to Create Your Own OpenSolaris Repository Using pkg.depotd Command

  1. Type the following command to create your repository:

    $ /usr/lib/pkg.depotd -d repository_directory -p port_value


    Note - If the repository_directory you have specified does not exist, it will be created for you.


  2. To confirm that the repository has been created, open your browser and type the following URL in the URL field: http://localhost:port_v.

    If the depot server is running correctly, a message is displayed in the browser.

  3. Check the contents of the repository.

    $ ls repository_directory

Example 6-1 Creating Your Own Repository Using pkg.depotd

This example creates an OpenSolaris repository repository1 with a port value of 11000 and shows the contents of the repository.

$ /usr/lib/pkg.depotd -d /tmp/testrepo -p 11000 
[06/Nov/2008:13:43:26] INDEX Search Available
[06/Nov/2008:13:43:26] ENGINE Listening for SIGHUP.
[06/Nov/2008:13:43:26] ENGINE Listening for SIGTERM.
[06/Nov/2008:13:43:26] ENGINE Listening for SIGUSR1.
[06/Nov/2008:13:43:26] ENGINE Bus STARTING
[06/Nov/2008:13:43:26] ENGINE Started monitor thread '_TimeoutMonitor'.
[06/Nov/2008:13:43:26] ENGINE Serving on 0.0.0.0:11000
[06/Nov/2008:13:43:26] ENGINE Bus STARTED
$ ls /export/home/user1/repository1
catalog file pkg search.dir search.pag trans updatelog

How to Create Your Own OpenSolaris Repository Using SMF Commands

  1. Become superuser.
  2. Enable the SMF service. You need to do this only the first time you start the service.

    # svcadm enable application/pkg/server

  3. Set the value of the port.

    # svccfg -s application/pkg/server setprop pkg/port=port_value

  4. Set the value of the repository.

    # svccfg -s application/pkg/server setprop pkg/inst_root=repository_directory

  5. Refresh the repository.

    # svcadm refresh application/pkg/server

  6. Restart the repository.

    # svcadm restart application/pkg/server

  7. Open your browser and type http://localhost:port_value in the URL field to confirm that the repository has been created.
  8. Check the contents of the repository.

    # ls repository_directory

Example 6-2 Creating Your OpenSolaris Repository Using SMF Commands

This example creates an OpenSolaris repository, repository2 with a port value of 8000 and shows the contents of the repository.

# svccfg -s application/pkg/server setprop pkg/port=8000
# svccfg -s application/pkg/server setprop pkg/inst_root=/export/home/user1/repository2
# svcadm refresh application/pkg/server
# svcadm restart application/pkg/server
# ls /export/home/user1/repository2
catalog file pkg search.dir search.pag trans updatelog
Previous Next