Adding Software with pkgutil

The best way by far that I have found for adding free software to use pkgutil. The pkgutil program is a replacement for the pkg-get program which is a Solaris update program loosely based on apt-get. It loads software as .pkg files which means that the normal Solaris commands pkgadd, pkgrm, and pkginfo work with them the same as packages from Sun. All files are loaded into /opt/csw (bin for the binaries). The site http://www.opencsw.org/get-it/pkgutil/ has instructions for getting pkgutil set up.
 
Here is a critical excerpt from the page:

Solaris 10 and OpenSolaris

# pkgadd -d http://get.opencsw.org/now

Solaris 8 and 9

Similar to Solaris 10, except you need to download the pkgutil package by hand. Remember to use 'save as' or shift-click, if you need to. Use wget if you can.

# wget http://mirror.opencsw.org/opencsw/pkgutil.pkg
# pkgadd -d pkgutil.pkg

/opt/csw/bin/pkgutil -U  # Download latest package list
/opt/csw/bin/pkgutil -i wget  # get the standard copy of wget

I have used it with Solaris versions 8, 9, and 10 and Solaris 10 x86. It works with some older versions of Solaris too.

To get started with Solaris 10 you can use the pkgadd command shown above. However you need a copy of wget to get started with Solaris 8 and 9. There are various places to get stand alone versions of wget on the web. To keep things simple, here is wget.sparc and wget.i386. Save the appropriate one to your machine and make them executable. After pkgutil is set up, you can use pkgutil -i wget to get a maintained copy of wget.

I was using pkg-get and now it won't work!

The pkg-get program has been replaced by pkgutil. That's all well and good, but what do I do now?

I found that running the following two commands to get rid of the old stuff and then installing pkgutil as shown above worked for me.
 
pkgrm CSWpkgutil
pkgrm CSWpkgget

After reinstalling pkgutil, running
pkgutil -U
pkgutil -u
gets things up to snuff.

Proxy Servers

If you are in a corporate environment, you may have a proxy server between you and the Internet. pkg-util works with proxys and picks up the proxy information from your proxy environment variables:

  1. System Environment
    http_proxy="http://my.proxy.com:8000"
    ftp_proxy="http://my.proxy.com:8000"
    no_proxy="127.0.0.1,localhost
    export http_proxy ftp_proxy no_proxy
    Put these lines in your $HOME/.profile or /etc/profile replacing my.proxy.com:8000 with the name and port of your proxy server.
     

If you are not behind a proxy, say you are setting this up at home, you can ignore the proxy server setup.

Refresh Catalog and Update

It is always a good idea to refresh the catalog before you do adds or updates.
 
pkgutil -U
The above command refreshes the catalog.
 
pkgutil -u
The above command brings all the CSW packages you have loaded up to date.

What to Load?

What you load is of course up to you and depends upon what you might want to do with the machine. Here are a few things I like to load.

For Solaris 8, you probably want to install the next three packages first. At this time (10/2016) there is only one repository left with Solaris 8 packages. It is at: http://mirror.opencsw.org/opencsw/dublin/sparc/5.8 To change to this repository, edit /opt/csw/etc/pkgutil.conf and change the line:
mirror=http://mirror.opencsw.org/opencsw/testing
to
mirror=http://mirror.opencsw.org/opencsw/dublin
Since I did not know how long it will be there, I created my own local mirror from this mirror.

You will want to edit /etc/profile and add the line:
PATH=$PATH:/opt/csw/bin



Back to Sun At Home Home Page
Last Maintained: Tuesday, 14-Mar-2017 18:49:33 EDT