Last updated: 28th May 2009
Introduction
As more and more customers are adopting OpenSolaris on their servers it is expected that those customers will have paid for access to the additional support repositories (e.g. OpenSolaris 2008.11 standard support). However, the rest of this blog entry applies equally to accessing the free OpenSolaris extras repository (which includes packages for Flash & Virtualbox).
This blog entry will cover the basic steps of logging in and downloading the necessary SSL keys and certificates to access the repositories.
Downloading SSL key & certificate
- Visit http://pkg.sun.com/, you will be redirected to a login/registration site. Use your existing Sun Online Account details or register if you are a new user
- Once logged in you will be redirected to the Certificate Requests page. Select the appropriate repository under Request new certificate (e.g. OpenSolaris extras or OpenSolaris 2008.11 standard support)
- Read and accept the license agreement
- A new key & certificate has been generated. Click the links to download both
Installing the key & certificate
- pfexec mkdir -m 0755 -p /var/pkg/ssl
- pfexec cp -i XXXX.key.pem /var/pkg/ssl
- pfexec cp -i XXXX.certificate.pem /var/pkg/ssl
Adding the new repository
Now that the key & certificate have been installed into /var/pkg/ssl either the pkg commandline utility or the Package Manager GUI can be used to add a new repository. The end result is the same, it's just a matter of preference.
with pkg(1M)
- pfexec pkg set-authority -k /var/pkg/ssl/XXX.key.pem -c /var/pkg/ssl/XXX.certificate.pem -O https://pkg.sun.com/opensolaris/YYY/ pkg.sun.com/YYY
- Replace YYY with the name of the repository you are adding, e.g. support or extras
- You can list packages from this repository with: pkg list -a 'pkg.sun.com/YYY'
with Package Manager GUI
- Use the desktop Package Manager icon to start the application
- Click File -> Manage Repositories...
- Enter a friendly name for the new repository (e.g. OpenSolaris extras or OpenSolaris support)
- Enter the repository URL: https://pkg.sun.com/opensolaris/YYY/ (YYY is the repository name, e.g. support or extras)
- Click the Add button to display the SSL dialog
- Enter the full path to the SSL key & SSL certificate or use Browse. e.g. /var/pkg/ssl/XXX.key.pem & /var/pkg/ssl/XXX.certificate.pem
- Click OK and then Close to return to the Package Manager
- You can browse and install packages from the newly added repository by selecting the friendly name from the Repository drop-down below the Search box
