Solaris Review: Solaris Welcome Home!
Wednesday, January 25th, 2006Some time ago I ran across one of your blogs in which you made some comparison between Solaris and Linux. I was very impressed and bookmarked it. I may have made a mistake but it seems that the article is no longer there… If it is possible, could you please direct me to where I can find it? Better yet, would you mind sharing the article (again) with the world? Thanks, Hering
Dear Hering,
With pleasure. It was on The Post Modern website and published August 4th, 2005. Here it is.
Back in 1999 when I was an 18 year old in corporate America doing my thing, you always knew who the really important people were because they had Sparc Ultra 5s on their desk in addition to their clunky Windows PCs. The rest of us were forced to use Hummingbird to emulate X and screen-pop our control-M to monitor jobs. I’m proud to say at the end of my run of working at this place, I had my own Sparc Ultra 5 with 21 inch monitor running Solaris 7 in the CDE environment doing C++ coding and building applications for servers. There was just something powerful about Sun OS that came through; it felt solid under your fingers, like a fine instrument. This was Unix Proper. But alas, it was expensive as hell, locked on expensive hardware, and seriously useful only for workstation tasks (it had a clunky Real Player and Flash, but that was it). Linux came on strong, with it’s free price and it’s compatibility as the primary target of all open source technology builds. Solaris binaries were well down the webpage, and getting lower.
This week, after years of GNU Linux, I’ve come home. I must admit when I saw CDE load on my screen again (I shun Java Desktop for server tasks) I was a little nostalgic.
The Hacker Learning Curve
Much has been made of the latest free Solaris 10 release for x86 and Sparc, and although the OpenSolaris project is gaining steam (but not up to Solaris 10 in functionality yet because of third-party issues) many hard nosed open source zealots are shunning Solaris for Linus’ and GNU’s old stand-by. This is where ideology can hurt you. Although I do understand people who grew up with Linux in their homes or small offices would never have exposure to a real Unix operating system, I think the vast majority of Linux users are staying away because the learning curve is steep, even for a seasoned Linux pro. Like I discovered when I installed Solaris 10 over the weekend, Linux has made us lazy.
Huh?
Linux comes from the same environment that scripting languages like PHP and databases like MySQL come from; they are littered with hacks and shortcuts from developers who just want to get it to work, and don’t sit down long enough to think about what a particular strategy means over the long term, or about others who may come along later. This has resulted in Linux being fast to administer and fast to get to do what you want, but as stability and universal configurations come in to play when a system grows, the need for serious structure in process execution and user management becomes clear. Solaris requires different thinking, and you graduate in the course of learning Solaris (or re-learning for me) from thinking only in the moment to really understanding the power and resources a Unix operating system provides when well configured. Many Linux users, sadly, will simply give up in frustration over this simple issue.
Here are some examples:
I pain to think of how many Linux admins are frustrated at why they can’t just log in to Solaris and do a /etc/init.d/tomcat start and then logout without Tomcat closing on them. nohup has no meaning to them. The idea that an OS garbage collects all the terminal processes a person starts after they log-off, even if they become root, is foreign to those brought up in the Linux environment. In Linux you can linger long after you’re gone. The same holds true for directory structure and security, which Solaris has not forgotten in it’s attempts to be more accessible.
Another thing that will make Linux users cry is the fact that, even as almighty root, you can’t create a directory in /home for users. Solaris smartly assumes roaming profiles where different uses will want to bring their /home directory with them to whatever box they go to, and the automount service watches over /home like a hawk. You have to create home directories in /export/home if you want to do it manually.
Init.d is so 90s
Another issue that can face a Linux switcher is Sun’s answer to the mess that is now init.d. The SMF (Service Management Framework) is a spectacular replacement for the old init.d and runlevel based process management, and provides milestones in place of run-levels and easy XML files that provide for restarting crashed services and maintenance mode of processes, something a Linux user has to deal with just by using /etc/init.d/service restart command and praying it doesn’t crash again. It also stores these files in a hierarchical fashion that works on both the intuitive and management level.
As an example, start-up XML files for DNS applications are stored in the directories:
/network/dns/server
/network/dns/client
If you wish to start these services, you can call the following:
svcadm enable /network/dns/client
svcadm enable /network/dns/server
The System Administrator themselves can write their own XML files and plug them in to the architecture, and several blogs exist that provide step by step guides for setting up MySQL, Tomcat, JBoss, and many other common services you may want to move over to the SMF to gain the benefits.
Even boot-time process starting is handled with greater elegance, since enable and disable carry over to all other boots of the OS. Want to only start a service now and have it not start at next boot? Don’t cd in to those rc3.d/ files, Just use:
enable -t /network/dns/server (for temporary)
With Solaris, you’ll get to drink a lot more coffee and have a lot less carpal tunnel.
Solaris 10: Linux Inside
Not that Solaris hasn’t tried to bridge the gap with the open source world. In fact, init.d/ does indeed work (mostly to start Linux and OSS programs like MySQL and samba) and the operating system comes loaded with all the Linux goodies such as Apache, Tomcat, MySQL, Samba, and the rest as well as a Gnome environment that actually completely works out of the box, the excellent Java Desktop System. It also comes with StarOffice pre-installed for workstation use. It keeps these, for the most part, locked away in /opt/sfw/ which is like having a complete Linux distribution mounted inside your Solaris OS. This helps ease the transition for Linux users, since ifconfig, top and the rest are there for your use.
All of Solaris’ applications are installed when you install your operating system, but none of them are turned on by default for security reasons. They are locked away by way of config files. Apache, Tomcat, Sun Studio Server 8, Samba and the rest are set up to start at boot time, but all the scripts in init.d look for a .conf file typical with the application (i.e. server.conf or httpd.conf). It provides these files after install with example implementations under the suffix of example in the various directories (For example: httpd.conf.example), but if there isn’t a .conf file for the process, it won’t start. To enable the Apache server, for instance, you would simply do the following:
cd /opt/sfw/apache/conf/
mv httpd.conf.example httpd.conf
/etc/init.d/apache start - now the server will start.
This is a much easier way of providing all the services a user might want to start without forcing them to hack the init scripts immediately, and gives them the ability to install the latest and greatest versions themselves without clashing with distro installed defaults, which often happen when you already have Apache installed on Fedora or Mandrake but want to compile your own.
Solaris 10: Documentation without the O’Reilly Tax.
What really separates Solaris 10 from the pack is the documentation. If you don’t think you’ll take advantage of documentation, it’s only because you grew up without it on Linux, and Google has been your only recourse. Solaris did not grow up in the world of HTML HOW-TOs and Wikis. Far from it, there is enough documentation online to kill a rainforest if printed. And it’s really good documentation too; documents that walk you through everything you’d ever want to do from setting up Sendmail to using NIS+ to configuring network services. It has high-level overviews with detailed walk-throughs and advances at the level of the reader by providing quick methods to get started and then drilling down in to the details as people get more comfortable with the services they are deploying.
To put it bluntly, Sun provides O’Reilly quality documentation for free, where open source technologies require you to run out and give O’Reilly your $40.00 to get the exact same thing. Although open source technologies (companies?) like MySQL, Tomcat and the rest are going the “professional open source” route and trying to offer the same level of documentation and support, the open source world will always be plagued by the fact that writing documentation, not even good documentation, is a horrible job and no programmer who just wrote a Really Awesome Thing is going to want to take the time to write a detailed technical book about it.
Beyond this, un-like the Linux admin community, the Solaris admin community is together and solid, with one place to go. It’s Sun’s BigAdmin site, and it’s loaded with everything you’d ever want to know or search for. Also, Solaris has incredible management applications that make managing users, groups, and projects a breeze (and gets rid of that pesky /home issue for you automatically). It now includes a webconsole interface as well for managing not just users and installed applications but containers (Solaris zones) as well.
There is so much more to talk about, such as the great package management, the Solaris zones which is virtualization and software partitioning that enables you to create many private execution environments within a single instance of the Solaris Operating System ( I have three set up on my home server), the DTrace debugging system and predictive self-healing. However, these technologies are so beyond the current Linux feature set that I doubt a “switcher” would even be motivated to use them immediately.
It’s Only My Opinion
My reasons for advocating a technology are plain and not tied to ideology. Apple has the best client operating system, with expose window management, innovative unix technology and GUI, while still being able to run Microsoft Office and Adobe apps that are in the customer marketplace. Therefore, I advocate them. Java is one of the most flexible and powerful programming language in the world, and in a world where international governments are passing laws requiring open source to be used exclusively for computers and servers, C# just isn’t going be portable beyond the United States in the near future (unless you want to hang your fortunes on the fever-inducing named Mono). Therefore, I advocate Java.
My reasons for advocating Solaris are the same: Now free, it is simply the most advanced and powerful server operating system available to you, with plenty of face-time with highly paid doctorates of computer science over the years to make it’s advantage lasting while also playing well and complementing the open source technologies that most people use. It runs fast from the PIII 256 MB RAM machine I have tested it on to the run of the mill Intel Pentium 4s I use as servers at home to the fastest 64-bit AMDs we have in the dev environment at my start-up.
Even if you are a Linux lover, you owe it to yourself and your intellectual curiousity (that thing that makes you format your box every 9 months with some new OS) to try out Solaris 10.
