We’ve been getting random questions about how to install (Oracle Solaris) packages onto their newly installed Oracle Solaris 11.4 Beta. And of course key is pointing to the appropriate IPS repository.

One of the options is to download the full repository and install it on it’s own locally or add this to an existing local repository and then just point the publisher to this local repository. This is mostly used by folks who have a test system/LDom/Kernel Zone where they will probably have one or more local repositories already.

However experience shows that a large percentage of folks testing a beta version like this do this in a VirtualBox instance on their laptop or workstation. And because of this they want to use the Gnome Desktop rather than remotely logging through ssh. So one of the things we do is supply an Oracle VM Template for VirtualBox which already has the solaris-desktop group package installed (officially the group/system/solaris-desktop) so it shows more than the console when started and give you the ability to run desktop like tasks like Firefox and a Terminal. (Btw as per the Release Notes on Runtime Issues there’s a glitch with gnome-terminal you might run into and you’d need to run a workaround to get it working.)

For this group of VirtualBox based testers the chances are high that they’re not going to have a local repository nearby, especially on a laptop that’s moving around. This is where using our central repository at pkg.oracle.com is very useful which is well described in the Oracle Solaris documentation.

However going through this there may be some minor obstacles to clear when using this method that aren’t directly part of the process but get in the way when using the VirtualBox installed OVM Template.

First, when using the Firefox browser to request certificates and download certificates and later point to the repository you’ll need to have DNS working and depending on the install the DNS client may not yet be enabled. Here’s how you check it:

demo@solaris-vbox:~$ svcs dns/client
STATE          STIME    FMRI
disabled        5:45:26 svc:/network/dns/client:default

This is fairly simple to solve. First check that the Oracle Solaris instance has correctly picked up the DNS information from VirtualBox in the DHCP process buy looking in /etc/resolv.conf. If that looks good simply enable the dns/client service:

demo@solaris-vbox:~$ sudo svcadm enable dns/client

You’ll be asked for your password and then it will be enabled. Note you can also use pfexec(1) instead of sudo(8). This will also check if your user has the appropriate privileges.

You can check if the service is running:

demo@solaris-vbox:~/Downloads$ svcs dns/client
STATE          STIME    FMRI
online         10:21:16 svc:/network/dns/client:default

Now DNS is running you should be able to ping pkg.oracle.com.

The second gotya is that on the pkg-register.oracle.com page the Oracle Solaris 11.4 Beta repository is at the very bottom of the list of available repositories and should not be confused with the Oracle Solaris 11 Support repository (to which you may already have requested access) listed at the top of the page.

The same certificate/key pair are used for any of the Oracle Solaris repositories, however in order permit the use of the any existing cert/key pair the license for the Oracle Solaris 11.4 Beta repository must be accepted. This means selecting the ‘Request Access’ button next to the Solaris 11.4 Beta repository entry.

Once you have the cert/key, or you have accepted the license, then you can configure the beta repository as:

pkg set-publisher -k <your-key>
  
    -c <your-cert>
   
     -g https://pkg.oracle.com/solaris/beta solaris

   
  

With the Virtual Box image the default repository setup includes the ‘release’ repository. It is best to remove that:

pkg set-publisher -G http://pkg.oracle.com/solaris/release solaris

This can be performed in one command:

pkg set-publisher -k <your-key>
  
    -c <your-cert> 
   
    -G http://pkg.oracle.com/solaris/release\
 -g https://pkg.oracle.com/solaris/beta solaris

   
  

Note that here too you’ll need to either use pfexec(1) or sudo(8) again. This should kickoff the pkg(1) command and once it’s done you can check it’s status with:

demo@solaris-vbox:~/Downloads$ pkg publisher solaris

            Publisher: solaris
                Alias: 
           Origin URI: https://pkg.oracle.com/solaris/beta/
           Origin Status: Online
              SSL Key: /var/pkg/ssl/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
             SSL Cert: /var/pkg/ssl/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 Cert. Effective Date: January 29, 2018 at 03:04:58 PM 
Cert. Expiration Date: February  6, 2020 at 03:04:58 PM 
          Client UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
      Catalog Updated: January 24, 2018 at 02:09:16 PM 
              Enabled: Yes

And now you’re up and running.

A final thought, if for example you’ve chosen to install the Text Install version of the Oracle Solaris 11.4 Beta because you want yo have a nice minimal install with no overhead of Gnome and things like that, you can also download the key and certificate to another system or the hosting OS (in the case you’re using VirtualBox) and then rsync or rcp them across and then follow all the same steps.