7

Many questions on this forum as well as other places really boils down to somebody coming from Linux environment and then not being able to use the equivalent command on Solaris. Often this is because of different options supported, etc.

This question intends to document (Q&A style) of what a reasonable Solaris install should always include. Never again should a user be frustrated because something isn't available.

We focus on the packages most often asked for by Solaris newbies/visitors in questions.

This is about standard userland tools such as find, grep and what have you. If you are looking for a similar posting about development tools (e.g. compiler, make, etc) then you should look here.

1

4 Answers 4

8

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
2
  • It seems like you should also discuss, /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.
    – user56041
    Commented Apr 1, 2017 at 4:17
  • @jww. As I read your comment it is mainly related to having a tool chain for development purpose. This is (indirectly) covered in the post: "If you are creating a host that will be used for building C/C++ binaries then have a look at this posting.". The linked post covers tools such a autoconf, automake, (g)make, libtool, etc. Is that what you mean?. The post here is deliberately only about the tools I believe should always exist on any Solaris host. Dev tools are not part of that.
    – peterh
    Commented Apr 4, 2017 at 14:47
0

I'm not familiar with current Solaris, but back when I used it, GCC (gcc and g++) were an absolute must. Ditto for GNU make. We also installed bash, the default shell was sorely lacking for interactive use (we used the system's shell for scripts, though).

Probably will want vim (all the offshots of the original vi I've seen are charming in some antiquarian way, but everybody in the Linux world has vim installed).

9
  • On Solaris 11, vim is the default vi now.
    – alanc
    Commented Feb 28, 2013 at 18:20
  • If it isn't in Solaris 10, it would be useful to note that.
    – vonbrand
    Commented Feb 28, 2013 at 18:24
  • Acknowledge that dev tools has been deliberately left out. I'm planning to make a separate posting on that and then linking. Personally I would only install dev tools on machines used for builds whereas the rest on the list I would install on all machines.
    – peterh
    Commented Feb 28, 2013 at 21:51
  • @vonbrand. It must have been decades ago that you fiddled with Solaris if you had to install bash. :-)
    – peterh
    Commented Feb 28, 2013 at 22:02
  • @nola6000, I left Solaris for good around 2000. Too many bugs, no more updates for our machines, Linux was just much faster.
    – vonbrand
    Commented Feb 28, 2013 at 23:05
0

The "what packages" question has been answered by others well.

I think the "from where" question deserves another answer.

OpenCSW is a great resource for installing open-source packages on Solaris. They are far more up to date and comprehensive than others.

In addition, the "pkgutil" tool gives you apt/yum/pkg like functionality on Solaris 10.

2
  • For the list of packages in question I must say I disagree in particular for Solaris 11. Why would you install from a source outside of Oracle when you can get those packages from the official Oracle IPS repository ? Yes, true, others may sometimes have a slighter newer version of a given product but for many sysadmins the 'officalness' of the source is important. And last time I checked OpenCSW didn't support IPS which makes them a bit old-school.
    – peterh
    Commented Mar 13, 2013 at 22:37
  • ... and for Solaris 10 I would say it is a matter of taste since there's no longer an official source since Sun handed over the responsibility of the Companion Disk to SunFreeware. Packages on SunFreeware are (afaik) all made by a single guy which means the quality very consistent at the expense of a smaller cataloque than OpenCSW who use contributors. If you want to make something part of your default install across potentially hundreds of hosts in your organization then consistency is of importance. But again, many good things to say about OpenCSW so it probably comes down to taste.
    – peterh
    Commented Mar 13, 2013 at 22:45
0

Also consider:

  • ncurses
  • screen
  • lsof
  • rsync

And not necessarily needed due to a Linux past but pretty much a must-have for me: The Dtrace toolkit: http://www.brendangregg.com/dtrace.html (Because you want to per-process IO stats :)

In Solaris 11, this is pkg:/system/dtrace/dtrace-toolkit.

1
  • Good points. I guess I've focused on tools that are (1) needed to make scripts work and (2) are available from official or semi-official places. As far as I understand lsof uses an undocumented hack to do its tricks on Solaris. Therefore it is considered 'unsafe' by some. I doubt it is possible to convince true sysadmins to make it part of the default install.
    – peterh
    Commented Feb 28, 2013 at 21:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .