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:
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:
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.
pkgutil -i wget
You need wget for most pkgutil functions.
pkgutil -i gcc4g++
This is the gcc compiler (release 4). The older versions no longer seem to be available.
pkgutil -i gdb
This is the debugger for gcc. If you are going to sling code, you probably will need it.
pkgutil -i ddd
This is a GUI interface to gdb. I personnally like it for debugging C code.
pkgutil -i lsof
Loads lsof which lists all the open files.
pkgutil -i rsync
rsync can copy tree structures from one machine to another. It only
copies what needs to be copied.
pkgutil -i ggrep
This is the GNU grep as found on Linux systems. In includes the -r option which the
Solaris grep does not have.
pkgutil -i gtar
This is the GNU tar (named gtar). In includes the -z and -j options which deal with deals with
compressing and decrompressing on the fly. Solaris tar does not support these options.
pkgutil -i wireshark
Wireshark (formerly known as ethereal) is useful for watching network traffic.
pkgutil -i firefox
firefox this is a good web browser
pkgutil -i openofficeenus
This gets the version of Open Office for the English (en) in United States (us) locale.
There are a bunch of other local's available
pkgutil -i vncviewer pkgutil -i vncserver
This gives you VNC access to and from your machine.
pkgutil -i nmap
This loads the nmap command. Note that this is useful on a corporate network machine.
You probably want to skip this on a home machine as this is a port scanner and if you
use it across the Internet your ISP will get on your case.
pkgutil -i openssh # Use on Solaris 8
This gives you ssh capabilites. The start stop scripts are installed.
While Solaris 10 uses /etc/ssh, the config files are in /opt/csw/etc/ssh.
pkgutil -a | grep whatever
The pkgutil -a command gets a list of available packages. You can grep for stuff you
might want.
You will want to edit /etc/profile and add the line:
PATH=$PATH:/opt/csw/bin