OpenIndiana uses the same package management system as Oracle Solaris 11, and Oracle is thus far continuing Sun's practice of providing well written manuals:
The command line package manager is 'pkg'
Set a remote repository:
sudo pfexec pkg set-publisher -O http://pkg.openindiana.org/dev openindiana.org
Search for a package:
pkg search -pr git
Install a package:
sudo pkg install git
The above is the "native" package management but some packages are missing or outdated.
All Illumos based systems like OmniOS, OpenIndiana and SmartOS can use the repository from Joyent/SmartOS .
Main advantage is that you find there a lot of very up to date packages.
A list of available software: http://pkgsrc.joyent.com/packages/SmartOS/ in folder
http://pkgsrc.joyent.com/packages/SmartOS/2013Q3/x86_64/ (or http://pkgsrc.smartos.org/packages/illumos/)
If you want to install software via pkgin (installs every package to /opt), you need to (console as root):
You need a compiler like gcc; download the sources, switch to the folder with your sources (make the content of your sourcefolder executable recursively) and compile via: