What should be there ?
Here is a list of tools that in my opinion should be available on all Solaris hosts:
- top. Yes,
prstat
is superior but people coming from Linux world are
used to top
. End of story.
- GNU tar. This is simply a must. Most
packages are made with GNU tar and there's a small (but important)
incompatibility between Sun's tar and GNU tar. Make it a habbit
always to untar packages you've downloaded using GNU tar rather than
Sun tar.
- GNU binutils. Some open source packages will need them
during their build phase.
- GNU coreutils. Solely because of
date
..and because GNU tail can follow rotated log files.
- GNU findutils. GNU's
find
support more options than Sun's ditto.
- GNU awk. Subtle differences to Sun's awk/nawk.
- GNU diffutils. Different from their Sun counterparts. In particular
patch
.
- GNU grep. More advanced than Sun's grep.
- GNU sed. Subtle differences to Sun's sed.
- Vim editor. Because people coming from Linux expect to find it.
These packages should be part of your default install whether you use JumpStart (Solaris 10), IPS (Solaris 11) or something else.
The above tools will take up a few hundred K of disk space. There's really no reason not to install them by default.
The list focuses on the tools that users will need especially if they pick shell scripts off the Internet and expect them to work. If you are a sysadmin then you'll probably say the list is even longer but that is another story. In other words pure sysadmin tools have not been considered (yes, I know the distinction is not easy to make)
If you are creating a host that will be used for building C/C++ binaries then have a look at this posting.
Solaris 11
You're in luck. Almost everything is there already and everything is from official Oracle Solaris repository but take note that even if a package is available in global zone it will not automatically be installed in local zones.
Each of the packages can be installed with this command (as root):
pkg install <pkgname>
for example:
pkg install //solaris/text/gawk
Packages:
Item Package name Path after install G L
-------------- ----------------------------------- ------------------- - -
top pkg://solaris/diagnostic/top /usr/bin Y N
GNU tar pkg://solaris/archiver/gnu-tar /usr/bin Y N
GNU binutils pkg://solaris/developer/gnu-binutils /usr/bin N N
GNU coreutils pkg://solaris/file/gnu-coreutils /usr/bin Y N
GNU findutils pkg://solaris/file/gnu-findutils /usr/bin Y N
GNU awk pkg://solaris/text/gawk /usr/bin Y N
GNU diffutils pkg://solaris/text/gnu-diffutils /usr/bin Y N
GNU grep pkg://solaris/text/gnu-grep /usr/bin Y N
GNU sed pkg://solaris/text/gnu-sed /usr/bin Y N
Vim editor pkg://solaris/editor/vim /usr/bin N N
Notes:
Path: Name of binary is prefixed with g
if an equivalent Sun tool exist.
G : Is installed by default in global zone ? (i.e. server install)
N : Is installed by default in local zone ?
Solaris 10
You should really upgrade to Solaris 11. Much better.
However if you are still stuck on Solaris 10 then you can obtain the packages
from the Solaris Companion Disk. This was previously distributed by Sun itself
but is nowadays distributed by SunFreeware. This is a site you can trust. Don't think about downloading the sources and building yourself because it is not required.
Download the individual packages from the table below.
Each of the packages can be installed with this command (as root):
pkgadd -d <pkgname>
for example:
pkgadd -d SFWtop
Packages:
Item Package name Path after install
-------------- ------------------- ---------------------------
top SFWtop /opt/sfw
GNU tar (already installed) /usr/sfw
GNU binutils (already installed) /usr/sfw
GNU coreutils SFWcoreu /opt/sfw
GNU findutils SFWgfind /opt/sfw
GNU awk SFWgawk /opt/sfw
GNU diffutils SFWdiffu /opt/sfw
GNU grep (already installed) /usr/sfw
GNU sed SFWsed /opt/sfw
Vim editor SFWvim /opt/sfw
/usr/gnu
,/usr/ucb
, and/usr/sfw
. Folks coming from Unix and Linux (and Autotools users) often need to find the GNU equivalent command because the Posix command provided by Solaris is so anemic. Also see Preparing for the Upcoming Removal of UCB Utilities from the Next Version of Solaris.