UNIX Consulting and Expertise
Golden Apple Enterprises Ltd. » Posts for tag 'ips'

Configuring Sun’s Extras repository in OpenSolaris Comments Off on Configuring Sun’s Extras repository in OpenSolaris

OpenSolaris by default comes configured to pull packages from at least one repository – the main one at OpenSolaris.org. You can configure other repositories fairly easily – both Blastwave and Sunfreeware some available with IPS versions of their existing Solaris packages.

However, Sun also offer two extra repositories – one for those with a support contract for OpenSolaris, and one containing extra software – a bit like the old Extras CD that came with the Solaris media pack.

The main site for accessing all of this is https://pkg.sun.com If you don’t already have a Sun ID and password, you’ll need to follow the links from that page to register for them (don’t worry, it’s free). Then login, and you can see you’re presented with links to generate Certificates for the two repositories. Let’s assume you’re not a corporate user and don’t have a support contract, and concentrate on the Extras repository.

Click the link to generate the key and certificate for pkg.sun.com/opensolaris/extra and save them somewhere safe – you’ll be needing them again. For example, I tend to stick them in /var/ssl/pkg as well as keeping copies in my home directory.

Now what we need to do is add the Extras repository as a publisher in the package management system, and then link the key and certificate to that publisher.

So in this example we can accomplish this in one command (note the backslash to fit it across two lines):

$ pfexec pkg set-publisher -O https://pkg.sun.com/opensolaris/extra \
-k /var/pkg/ssl/OpenSolaris_extras.key.pem -c /var/pkg/ssl/OpenSolaris_extras.certificate.pem extra

All this does is:

  • adds a new repository at https://pkg.sun.com/opensolaris/extra
  • links the key (-k) /var/pkg/ssl/OpenSolaris_extras.key.pem to it
  • links the certificate (-c) /var/pkg/ssl/OpenSolaris_extras.certificate.pem to it
  • gives it the name ‘extra’ in the package manager

That’s all there is to it. Now you can use the standard OpenSolaris package management commands:

  • pkg refresh will update the catalog with the packages from the new repository
  • pkg install can be used to install them

And of course, if you’re using the OpenSolaris package manager gui, you can select the new repository from the drop-down list of available repositories, and then browse through from there.

Top of page / Subscribe to new Entries (RSS)