2 weeks ago, our main festival started for which we had 5 days off! Now that is a considerable amount of free time to any system administrator. Free time to system administrators gives us the ability to think freely from the daily workload and unnecessary pressure.
Before the holidays started, I had decided to learn something new to further enhance my experience and understanding about the open source operating systems world. I am not really an expert on Linux or BSD based operating systems. However, I do have some years of experience with Redhat and Debian based Linux operating systems. Since 2 years back, I have been running some server stuffs mostly on FreeBSD operating systems.
Trying out Gentoo has always been on my mind but I thought it’s Linux after all and suddenly Solaris came to my mind. I have to admit that I had always been biased to Solaris. I thought that it was not really an open source operating system and it ran only on those weird looking SPARC boxes manufactured by Sun Microsystems.
But I was wrong! Solaris seems to be full of promises and definitely seems to be the operating system of the future. In fact, it is probably the only Unix operating system which still contains the original Unix code when Unix was first developed in the 1970s. That may explain why it’s stability is so rock solid.
And I learned that it’s almost as free and open source like the GPL or BSD license! A majority of the codebase has been open-sourced by Sun Microsystems.
Solaris’ source code (with a few exceptions) has been released under the Common Development and Distribution License (CDDL) via the OpenSolaris project. The CDDL is an OSI-approved license. It is considered by the Free Software Foundation to be free but incompatible with the GPL.
As I searched and read more articles and reviews about the Solaris 10 operating systems, 3 strong points stood out in almost all of the articles and reviews. They are ZFS, DTrace and Containers.
- (A.) ZFS
The first is ZFS (Zettabyte File System) which is a 128-bit file system, so it can store 18 billion billion (18 x billion x billion) times more data than current 64-bit systems! Quoting from the OpenSolaris project, ZFS is a new kind of file system that provides simple administration, transactional semantics, end-to-end data integrity, and immerse scalability.
ZFS has an inbuilt Volume Manager and ZFS file systems are built on top of virtual storage pools called zpools. Zpools may be configured in different ways such as RAID-0, RAID-1, RAID-Z or RAID-Z2 using cheap disks. Because cheap disks can fail, so ZFS provides disk scrubbing which is to read all data to detect latent errors while they are still correctable.
In a sentence, ZFS is a totally different rewrite of existing file systems and is actually supposed to be very simple and fun to use.
I believe that ZFS will be the predominate file system to be deployed in data centers all over the world in the not to distance future!
To sum it up, check out the cool and amusing video below:
- (B.) DTrace
The second convincing point of Solaris 10 is it’s DTrace utility. It is a comprehensive dynamic tracing framework for Solaris. It is built into Solaris so that it can be used by admins and developers to examine the behavior of user programs and operating system itself. Quoting from the dtrace blog at blogs.sun.com/dtrace/entry/what_is_dtrace…
DTrace dynamically modifies the Operating System kernel itself and user processes. It records the data at locations of interest called probes. DTrace uses the D scripting language (a subset of the C language), designed specifically for dynamic tracing. Users write scripts in D which tell DTrace, what functions are to be traced, what is to be done and what information is required. So if there is an mis-configured application out there in your system to which you are finding hard to debug and trace, then DTrace should do it for you.
Since it is dynamic, when Dtrace is in use or in action, only those modules that are needed by a particular command are loaded and used. This will greatly improve performance since lesser resources are required or accessed.
And according to it’s documentation, DTrace is completely safe to use. It will never you to damage the system through it’s use. But I have to admit that I have never used DTrace extensively and only time and experience will tell us if DTrace is indeed suppose to be a sysadmin’s best friend!
However, although DTrace is supposed to be the most powerful tracing and debugging utility in the world, using it can prove to be very challenging.
Since it both a tool and a scripting language, learning to use it effectively can be quite tough. But there are some graphical based programs utilizing DTrace appearing in the market which should make DTrace more easier to use. One of them is “Chime”, which can be downloaded from:
- (C.) Containers
The third notable point of Solaris 10 is Zones or Containers. If you have used FreeBSD jails, then Solaris Containers are going to be familiar. They are based on the same basic concept. Each Container is like a virtual OS, complete with IP address, separate configuration and even a separate package manager.
This may seem similar to VMware or Xen but it isn’t. The difference is that all the Zones/Containers/Jails share the same kernel. Using Zones, we can use just one server allocating different applications to different groups. Administrators can configure CPU, memory, network bandwidth as they wish to each secured container. The end result is better utilization of expensive hardware and fewer physical systems to house and power.
Moving forward, the first step of installation software is to check if it meets the hardware requirements. You can visit the URL below to check to make sure if your hardware is supported:
From my experience with Linux and FreeBSD based operating systems, even, if your hardware is not yet supported on OS platforms, there is always a way or a hack to make your hardware devices work. So you don’t really have to worry if your hardware is not yet supported. Since I will probably be using Solaris on a server platform, I did not have to worry about devices such as sound cards or graphical cards being not supported yet!
The next big step is the actual installation of Solaris 10 itself. Just follow either of the 2 excellent guides below and your Solaris box will be up and running within 2 hours!
The following are the basic questions you will be asked in order to setup a fully functional Solaris networked box:
(1.) Your IP address, subnet mask and default gateway
(2.) Your hostname for this Solaris box
(3.) Your time zone
(4.) The Root password of this box (keep it simple for the 1st time. You can later change it later!). There is nothing worse than forgetting the root user’s password after the complete installation!!!
(5.) Selecting and enabling the network services.
(6.) The rest of the installation are just a matter of selections with either a “Yes” or “No”!
(7.) Selecting the primary boot disk and allocate the partitions for Solaris. You may just want to accept the defaults here if you are confused.
(8.) The last step of the installation will ask you to “reboot”. Remember to remove your Solaris CD from your cd-rom before rebooting!
Note: The images below are the actual snapshots from http://www.blastwave.org
One image has also been used from wikepedia.
In fact, I have never seen or read an OS installation guide as detailed and informative like the one created by the folks at http://www.blastwave.org! Thanks a lot blastwave.org and great work folks.
They should also be given an applause for creating a “Debian like apt-get” package management tool with “pkg-get” for Solaris.
After the installation is complete, your will see a very nice and beautiful screen like the one below:
Solaris Login Screen (image from blastwave.org)
Wow that’s cool! Who would have thought that Solaris installation is this easy! I am quite surprised. So Ubuntu should watch out!
The next step is to create a normal user/group account. In the Linux/Unix world, it’s often considered a bad thing to login as root either remotely or locally! It will also compromise the security of your system!
Select “Command Line Login” from the “Options” menu of your Login Screen.
We will create a User called “admin” and a group called “wheel”. Then we will add user “admin” to the “wheel” group.
Run the following command on the root’s console:
# groupadd wheel
# useradd -c “admin” -d /export/home/admin -g wheel -m -s /bin/bash admin
# passwd admin
Exit from the command line shell and use your newly created Username and Password to login.
You will then be prompted to select a default Desktop Window Manager. Just select Select “Java Desktop System Release 3″ because it’s much more flexible and is in fact Solaris’s version of the Gnome Desktop!
Solaris Desktop (image from blastwave.org)
That’s great graphics which I did not expected from Solaris! Below are 2 more snapshots of the Sun Java Desktop running Gnome.
Screenshot 1 of Sun Java Desktop running Gnome (blastwave.org)
Screenshot 2 of Sun Java Desktop running Gnome (wikipedia.org)
Next we will setup our DNS servers for our Solaris box and connect our new Solaris box to the rest of our network and to the internet.
(1.) Edit the file /etc/inet/resolv.conf
(2.) Type in your name servers to make /etc/inet/resolv.conf look something like the following:
Of course, you need to change the above to reflect to your own name server!
(3.) Create a symbolic link of /etc/inet/resolv.conf to /etc/resolv.conf
ln -s /etc/inet/resolv.conf /etc/resolv.conf
(4.) Edit /etc/nsswitch.conf to use your DNS settings for name resolving.
Add the following “dns” entry to /etc/nsswitch.conf to look something like:
hosts files dns
(5.) Verify your default router in /etc/defaultrouter and make sure that your gateway is listed in that file!
(6.) Verify the hostname and IP address for your new Solaris machine.
Next time, if you have to change your machine’s hostname or IP address, then these are the files where you have to look into.
(6.) Open a shell prompt and verify that you can ping other hosts on the Internet such as yahoo.com or google.com. Or just fire your web browser and make sure that you can access websites!
# ping http://www.yahoo.com
http://www.yahoo.com is alive
# ping -s http://www.yahoo.com
PING http://www.yahoo.com: 56 data bytes
64 bytes from f1.www.vip.sp1.yahoo.com (184.108.40.206): icmp_seq=0. time=604. ms
64 bytes from f1.www.vip.sp1.yahoo.com (220.127.116.11): icmp_seq=1. time=1.05e+03 ms
64 bytes from f1.www.vip.sp1.yahoo.com (18.104.22.168): icmp_seq=2. time=602. ms
64 bytes from f1.www.vip.sp1.yahoo.com (22.214.171.124): icmp_seq=3. time=684. ms
64 bytes from f1.www.vip.sp1.yahoo.com (126.96.36.199): icmp_seq=4. time=605. ms
The high latency of the above ping results is due to my satellite based link!!
Well that’s it! You have your Solaris box up and connected to the internet. Because I am new to Solaris myself, I still have a lot of reading, experimenting, hacking to do!!
Below are the summary of some of the commands which you might find useful:
(1.) uname -aX
This command will display the current name of your system, architecture, Solaris version and various other information.
(2.) prtconf -v
This command will provide all the PCI hardware details residing on your Solaris box.
This is similar to Linux or FreeBSD “top” utility and provides current live processes running on your Solaris box.
(5.) psrinfo -v
This command will display the CPU information of your Solaris box
(5.) prtconf | grep Memory
This command will provide the current physical memory (RAM) on your Solaris box.
(6.) ifconfig -a
Displays your current IP address, netmask, broadcast, name and status of your network card.
Please note that I am just covering a small fish in an ocean full of Solaris!
We will dive into more complex topics like the IPFilter firewall, the next generation ZFS file system and the most powerful debugging tool called DTrace in the future.
Till then, enjoy your new Sun Java Desktop and visit the following sites for much more information on Solaris:
These sites are all you need to stay up to date with the latest news and technology related to the Solaris operating system. Take out some of your free time and make a point in reading the materials found on these sites. They will make you very familiar and conversant to the Solaris operating system.
The last blog is from SUN’s CEO (Jonathan Schwartz) himself!
My first days with Solaris has really been enriching and an enchanting experience. It gave me the “Deva Vu” feeling, reminding me of the good old times when I first started using Linux way back in the year 2000! I hope that your Encounter with Solaris 10 will also be the same as mine!