Monday 13 August 2007

A usable Solaris server without X or other cruft

The last post was left in a somewhat unfinished state – a description of which software to select at install time to get a usable server installed without X was left out. The following works for me – some things could be left out, and some things could certainly be added, but my strategy is to put as little as possible in the global zone of a server, then do all the heavy lifting in the confines of a zone or container.

The version of OpenSolaris used was Solaris Express Community Edition build 66, however it has been used successfully with several builds from 54 to 66.

Once you get to the “Select Software” page in the installer, select “Core System Support”, then press F4 to customise the selection. Then go like this:
  • deselect Audio drivers and applications
  • add the BIND DNS name server, tools and manifest. This gives you handy tools like host, dig, and nslookup if that’s your thing
  • add Documentation Tools
  • remove FTP server, usr and root
  • add the Fair Share Scheduler. I have yet to use this but it looks good for servers with multiple workloads (read: zones)
  • add Infozip from the freeware compression utilities
  • add patch and less from freeware other utilites. Reading man pages with more is something you get tired of very quickly
  • add bash from freeware shells
  • add GNU and open source documentation and man pages
  • from GNU binutils, C compiler add GCC runtime libraries
  • add GNU wget
  • add Lint libraries (usr)
  • add Live Upgrade software
  • remove Network File System server support
  • remove Network Information System/(root) – leave (usr)
  • add Online manual pages
  • add all of OpenSSL
  • add the Perl 5.8.4 reference manual pages. These actually contain files that CPAN uses for “make test” for some modules; took me a while to track that one down
  • add Programming tools and everything in Programming tools and libraries
  • remove everything in Remote network services and commands except the telnet client. As a brief aside, it is remarkable that Sun would leave this bunch of legacy crap in as default, but leave out SSH
  • add Secure Shell
  • remove Solaris desktop /usr/dt filesystem anchor. I have no idea what this does; omitting it doesn’t seem to hurt
  • add Solaris resource capping daemon. This is to limit the amount of memory a zone can allocate for itself
  • add everything from Solaris Zones
  • add SunOS header files
  • add everything from System Accounting
  • add everything from System and Network admin. In order to do this, expand the list and add each subitem individually. If you don’t do this, they get deselected silently at the end; I have no idea why, and it looks like a bug
  • add TCL
  • add Terminal information
  • remove Wireless drivers and config tools
  • remove X window system runtime environment
  • add core software for resource pools. This may be of use when binding processor cores to zones
  • add gcmn, ggrep, gtar and rsync

If you press F2 now you will probably get some dependency warnings – anything about X, audio drivers and Java can generally be ignored.

It seems a lot of effort to go to, but at the end you have a usable, cruft-free starting point on which to build zones, software etc. Quite a few of the above packages are there purely to support a compiler toolchain – if this isn’t needed some pruning could be done.

Quick update - the programming tools and Lint libraries packages seem to be silently dropped as well - I needed to add them in from the disk image afterwards:

mkdir /mnt/66
mount -F hsfs -o ro `lofiadm -a \
/root/sol-nv-b66-x86-dvd.iso` /mnt/66

pkgadd -d /mnt/66/Solaris_11/Product/ SUNWbtool SUNWsprot SUNWlibmr SUNWlibm

No comments: