New to Solaris? A quick tour

04 Feb '05 - 02:27 by benr

With all the people now downloading and checking out Solaris10, I thought that maybe alittle quick primer might be in order. Here are some of my personal favorite features in Solaris10 (some exist in earlier releases as well), specifically if your coming from Linux or having played with Solaris in a long time this might be of help.

Filesystem Layout: How to find stuff: When I think of the way SystemV should look Solaris just seems to be the model. Some basic overview is:

  • /etc, /proc, /devices, /dev: Samo samo, you know what these are
  • /export: More common on Solaris than Linux, typically this is where "everything else" goes. Some people even put local (non-automounted) home directories here.
  • /opt: Applications, just like Linux this is where you'd typically find 3rd Party installed applications
  • /usr/bin, /usr/sbin: Samo samo, user and admin apps
  • /usr/sfw: You wanna look here! This is where the Sun FreeWare applications (GCC, GNU Tar, etc) tools are, including libs, headers, etc.
  • /usr/ucb: UCB standing for University of California Berkeley, these are the BSD version of tools, mostly for compatablity. If you prefer the BSD version of ps (ie: ps aux) you can find it here.
  • /kernel: This is where the modules and their associated configuration files are.
  • /platform: This is where platform specific code is held, namely your kernel (the kernel is named "unix", similar to the Linux "vmunix")
  • /cdrom: Automount point used by the volume management daemon (vold)
  • /home: By default /home is an automount point! If you want to use it locally first comment out /home in /etc/auto_master and then restart the automounter ("svcadm restart autofs")

Finding out what you got!: You can determine info about your system using "prtconf" (outputs the device tree, driver attachment information, etc) and "prtdiag" (found in /usr/platform/(platform)/sbin). Wanna check how much memory you have, or CPU, use these.

System Statistics: Most Solaris sysadmins are content with vmstat and iostat for information, we then extend that with truss, lockstat, etc. In Solaris10 we can now go further with DTrace! (Previous to DTrace alot of used the SE Toolkit) You might be wondering where "top" is though, the Linux favorite... we don't have it! Instead, Solaris has it's own version: "prstat". We have lots of other ptools that can give us information based on the /proc filesystem (you'll notice that /proc on Solaris doesn't have all the general data provided by Solaris, we get it in diffrent places like "prtconf"). We've got pgrep, pmap, pkill, pargs, and more. For info on the ptools check the "proc" manpage.

SMF: Ding dong the witch is dead!! The Service Management Facility is the first real replacement of the aging RC Init system used by everyone else. No more doppy scripts! SMF allows services to have dependancies to other service, so for instance if you stop your ethernet device it can also stop all the networking services dependant on it too, and stuff like that. "svcs" can report Service Status, "svcadm" can control services (enable (think start), disable (think stop), restart, put in maintance, etc), "svcprop" can manage service properties, and "svccfg" can configure services. Start out by just running "svcs" and looking at the list. Then try using "svcadm" to restart acouple things or enable and disable services.

Apache2: Solaris ships with alot of goodies, including Apache2! Just edit the configuration (rename from sample) in /etc/apache2/, use svcadm to enable the service, and then drop your pages in the /var/apache2/htdocs directory! Apache2 provides a great test for Zones.

Dev Goodies: You can find the bulk of the standard dev tools (as, ld, ld, lex, make, etc) in /usr/ccs/bin. You can interface with the runtime linker by using the "crle" command (Configure Runtime Linking Environment), rather than edit a file like on Linux.

This is just the begining! I won't bother posting more right now, but you can find a ton of information in the docs found at docs.sun.com. Find information about Kernal Tunables, Security Services (IPfiler and IPsec goodies inside!), Solaris's included Volume Manger, Zones and Resource Management, a complete set of development docs, and of course the DTrace users guide. Solaris is chop full of goodies, you just need to know how to use them. More goodies another time.


- - C O M M E N T S - -

It can be a very different experience coming from Linux…btw as far as I know prtdiag is Sparc only. These tools are great and offer a level of consistancy across the system.

I must say Sol10 is such an amazing release, it has kicked FreeBSD of my desktop here at home as well. It has been many years since I have used Sol extensively so I have alot of catching up to do.

Just a little pointer for people coming across to Solaris from other platforms. If you are using it on an X86 platform when you find that you have unsupported hardware (you will) don’t just b*tch & moan. Go to the manufacturers website find an email address and express to them how disappointed you are that they do not support Solaris. Usually I get a response saying there is not enough demand. However certain arrogant companies, namely Gigabyte do not as far as I can tell even acknowledge their customers existence with a simple sorry but no email. The thing is the squeeky wheel get’s the oil, take for example the BeOS (RIP) community, given the tiny size of the community it is truly amazing how much third party support they garnered

Ché Kristo (Email) (URL) - 04 February '05 - 06:49

Some questions:

home: By default /home is an automount point! If you want to use it locally first comment out /home in /etc/auto_master and then restart the automounter (“svcadm restart autofs”)

What do you mean by if I want to use it locally?

For example, I plan on using my Solaris box for nothing but personal things, so I’m the only user.

I don’t quite yet understand what the difference between /export/home and /home is and why if it’s automount makes a difference.

Sorry to be so clueless, but after reading the docs and this I’m not yet sure about this.

Also, something that was rather jarring to me coming from FreeBSD / Linux systems is that root usually has it’s own home directory ”/root” on the filesystem.

Why does the root user not have it’s own home directory? I really don’t like the idea of programs that I run as root, that like to store things in ”.whatever” directories littering themselves all over ”/”.

Sorry for the newbiesh questions, but your blog has been very helpful so far.

Shawn (Email) - 04 February '05 - 16:22

Shawn! This isn’t a newbish question, don’t worry. I put up some of this info because it’s really lame to have used Linux or FreeBSD for years and years only to feel like an idiot when you try a new platform. It’s not your fault, it’s just diffrent, so no worries! :)

Okey, the automounter (autofs) on Solaris is configured by default to manage 2 directories: /home and /net. In a “proper” Solaris enviroment this works out well because NIS will tell the automounter were to find the home directories (NFS mount) and you can connect to network shares via more NIS supplied automount maps. However, if your just a normal schmoo at home (ie: us) without all these network resources set up this automounter crap just gets in the way. When the automounter is controlling a mount point you can not use it, and you’ll get odd errors that don’t make sense at first, just like if you entered a directory and then NFS mounted to that directory, you’d get a “Mount point Busy” or “Permission Denied” or something. Thus, if you use “useradd” to create an account by default it will try to point to /export/home/(user). Again, in a “proper” network your shared network home directory would be on an NFS server and automounted to /home, and any local (non-NFS mounted) home directories would go into /export. This also explains why when you partition a disk by default the installer wants to put 4G in / (root) and the rest of the disk in /export. You can do one of the following to use /home like you expect to:

1) Simply stop the automounter! You can tell SMF to disable the automounter completely using “svcadm disable autofs”. And, thankfully, unlike the old ”/etc/init.d/autofs stop”, when a service is disabled with SMF it will NOT restart when rebooted! Nice indeed.

2) The proper way is to edit the master automounter map file (/etc/auto_master) and comment out the entry for /home. Once that line is commented out (using a #) you can just restart the automounter (svcadm restart autofs) and your good to go. Test it by touching a file in /home.

Almost every new Solaris user has been bitten by this one, and its really confusing if your not familiar with the automounter itself. While almost everyone has heard of automounters, its more and more rare to see them actually used.

As for the root user home directory, ya, it’s kinda lame, but the root user shouldn’t be running things that plop hidden directories into their home directories. Some admins even object to /.profile for the root user. You naturally could create /home/root or even /root yourself and then update the /etc/passwd entry, but I’ve never seen someone do it. On most non-open source UNIX’ it’s uncommon to create a home directory for root.

If you can think of other stuff that seems wierd, or strange, or diffrent, or some how confusing, please let me know so I can blog more stuff like this! :)

benr - 04 February '05 - 17:26

Awesome, thanks for the response.

I had already decided I wanted a home directory for root, and went ahead and did what you suggested for the automounter and home.

Yes, I know, it’s traditionally “evil and wrong™” to run anything as root. But, to be honest I’ve been spoiled by the plethora of Graphical Administration tools that RHEL came with that were meant for root to use. Although I can see already that Solaris is short on text-dialog like or graphical admin tools especially for common tasks like user management.

I removed the /home directory, and recreated it as a symlink to /export/home just in case some software cares.

So far, my other pet peeve initially was getting DHCP setup for my network card. Where’s my text-based no-effort-required configuration program? :)

After the early years of Linux and having to manually use ifconfig things to setup, I was pleased when sometime around late 1999-2000, most distributions had text-based or graphical programs that made it dead easy to setup a particular interface for networking.

However, I perservered and found out about creating /etc/dhcp.driverX and I’m now posting this from my Solaris 10 install.

I of course constantly run into the differences between the syntax of common utilities because of GNU / BSD versions. But I’ve used FreeBSD quite a bit so I’m used to that.

The last two problems I’ve run into are:


  • I can’t seem to use my pageup and pagedown keys in Gnome Terminals with programs like less, etc….I’m rather mystified since the $TERM variable has xterm, and I’ve set my Desktop Preferences -> Keyboard -> Layouts to MS Internet Keyboard and my XkbModel is set to “microsoftinet”


  • The only audio drivers available for my sound card are 32-bit, and of course since I’m running on an Athlon64, it’s currently using a 64-bit kernel, so I’ve been looking for a way to have it use the 32-bit kernel instead so I can have sound

Shawn (Email) (URL) - 04 February '05 - 18:29

Oh, I should also note, I think that a quick explanation of how to mount FAT32 partitions would be helpful for dual-booters.

I figured out how to do it finally from various comments, plus the Sun documentation (which is pretty good from what I see so far).

I was rather shocked to discover Solaris can’t mount ext2 or NTFS partitions. Especially Since the ext2 filesystem format hasn’t changed in years.

So perhaps a sidenote on that :)

Shawn (Email) (URL) - 04 February '05 - 18:41

Okay, I found the nifty Sun Management Console for User Management and more.

Very nice.

Although I found it disturbingly odd that it wanted to create an Solaris fdisk partition on my Solaris hard drive and destroy all the data :)

Considering I let the installer set all that up and used the default partitions setup, etc. I’m a bit mystified by why the installer wouldn’t have done so to begin with.

Sorry for posting so many comments here, just thought this would be helpful….

Thanks as always for your responses.

Shawn (Email) (URL) - 04 February '05 - 19:44

Thank you both for asking/answering questions here. Coming from BSD and Slackware, the automounter was a bit confusing to me, although I did figure it out eventually.

A small question though and strangely not a technical one. I have to write a review of Solaris 10, so have been learning as much as I can about it and its features. The blogs of the engineers and people like Mr. Rockwood helped quite a bit and left me wondering if Sun engineers ever wrote articles to “showcase” features they liked or even created themselves. IBM does this with Linux, but the closest thing I can find with Sun is bigadmin. While the articles at bigadmin are very useful, I don’t think they are exactly what I meant. Am I missing something? I have talked to various solaris people and they all seem very excited about all the things solaris can do and yet I cannot find anything besides the blogs that expresses a “look what this can do!” focus.

Narayan (Email) (URL) - 04 February '05 - 23:26

Found what I was looking for with the Kernel thing finally:

[[http://docs.sun.com/app/docs/doc/817-1..]]

Article on troubleshooting 64-bit boots for x86-64, but applies equally to what I wanted.

Shawn (Email) (URL) - 05 February '05 - 02:10

I actually started using Solaris 9 a year ago, after getting sick of the same old stuff with Linux and I must say, I was floored by how rock solid and consistent it was. It was actually surprisingly easy to use from a desktop point of view. Blastwave.org rocks I’ll never go back to Linux.

Chris Turkel - 25 March '05 - 21:13

I woild like to add two more things – First, packages system and patching in Solaris is Enterprise Solid, no doubt. And for all the newbies, after the installation of Solaris 10 go and check out [[http://www.blastwave.org]] for most of the opensource packages prebuilt and easily installable via “pkg-add -i packagename”. Over the Internet. Still blows my mind after a year of using it. Blastwave guys are AMAZING!!!! [1000 Software Packages on Wed Mar 30 09:12 EST 2005 !!!]

Slava Bouttchenko (Email) - 31 March '05 - 13:41

Forever Redwood Outdoor Furniture. The Cedar Store: Patio Furniture. Luxury Outdoor Furniture. Forever Redwood Outdoor Furniture. Patio Furniture Products – Lowest Prices at DealTime! Top 10 web sites for “patio furniture”. Luxury Outdoor Furniture.[[http://furniture-patio.journeyclub.inf..]]

James (Email) (URL) - 15 July '05 - 03:28

How much is your Car worth at Trade-In? Let US Pay Your Gas For A Year. New Car Price Quotes – FREE. Let US Pay Your Gas For A Year. EvoCube.com – Discount Electronics Store. Used Cars Up To 90% Off. Dirt Cheap Cars and Trucks![[http://auto-trader.journeyclub.info]]

James (Email) (URL) - 17 July '05 - 16:28

good words the true is here

Exema (Email) (URL) - 19 July '05 - 15:10

Really nice place. See you again sometime.

Steriod (Email) (URL) - 19 July '05 - 15:59

[[http://furniture-modern.fishingpro.inf..]]

Top 10 web sites for “modern furniture” Modern Furniture Products – Lowest Prices at DealTime! New Leaf Gallery, A – Sculpture Site.com {E}. Unique Bedroom Furniture {E}. Modern Furniture Products – Lowest Prices at DealTime! {E}.

James (Email) (URL) - 21 July '05 - 14:02

[[http://online-auto-loan.bidtop.com]]

Fast, Online Auto Loans. {ky}. 100% Online Debt Consolidation -No Phone Calls Req. Fast, Online Auto Loans. Need a Loan? Bad Credit OK – Auto Loans. {ky}. 100% Online Debt Consolidation -No Phone Calls Req. American Car Loan – online auto loan.

James (Email) (URL) - 23 July '05 - 00:00

Good dry place to talk about it. What an interesting site! I have also a little site about lenses and eyes. So, what a nice contact resource you made! i am glad to be here. I even don’t use my contacts, very nice design 8), it is pleasure for my eyes!

Dry Eyes (Email) (URL) - 24 July '05 - 17:51

[[http://auto-towing.journeyclub.info]]

EvoCube.com – Discount Electronics Store. RV parts at low discount prices. RV parts at low discount prices. {E}. Windshields From $99 Nationwide. Switchboard: National and Local Listings. auto towing. auto towing.

Lana (Email) (URL) - 01 August '05 - 04:52

[[http://auto-trader1.hunterclub.info]]

How much is your Car worth at Trade-In? Let US Pay Your Gas For A Year. New Car Price Quotes – FREE. Let US Pay Your Gas For A Year. EvoCube.com – Discount Electronics Store. Used Cars Up To 90% Off. Dirt Cheap Cars and Trucks!

Lana (Email) (URL) - 01 August '05 - 05:55

[[http://furniture-kid.hunterclub.info]]

Furniture Kid: Compare Prices. Kids Bedroom Furniture – Bedroom Sets and more. Furniture Kid: Compare Prices {E}. Kids Bedroom Furniture – Bedroom Sets and more. {E}. Kids Furniture at Pottery Barn Kids {E}.

Skot (Email) (URL) - 02 August '05 - 05:43

[[http://health-insurance-plan.top-find...]]

AARP Information and Resources. AARP Information and Resources {E}. Searching for top “health insurance plan” Companies? FREE Insurance Quotes – Compare and Save! Health Insurance. Searching for top “health insurance plan” Companies?

Skot (Email) (URL) - 02 August '05 - 06:45

[[http://garden-design.geltop.com]]

Top 10 web sites for “garden design ” Top 10 web sites for “garden design ”. Garden Design Products – Lowest Prices at DealTime! Garden Design at Shopping.com! Garden tools. garden design. garden design: Find more information here.

Yoki (Email) (URL) - 03 August '05 - 01:44

[[http://bad-credit-car-loan.bidtop.com]]

Bad Credit Auto Loans. 3 Bureau Credit Report and PLUS Score. Bad Credit Auto Loans. Payment Calculator. 100% Online Debt Consolidation -No Phone Calls Req. {ky} – Free! Need a Loan? Bad Credit OK – Auto Loans.

Yoki (Email) (URL) - 04 August '05 - 01:22

[[http://cheap-car-rental.hunterclub.inf..]]

Top 10 Web Sites Offering “cheap car rental”. Top 10 Web Sites Offering “cheap car rental”. Car Rental Deals from Europcar UK. Car Rental Deals from Europcar UK. ** Repossessed Cars Auction: New @ Used. cheap car rental: Lowest Prices.

Yoki (Email) (URL) - 04 August '05 - 01:22

[[http://vertical-blinds.geltop.com]]

Top 10 web sites for “vertical blind” Top 10 web sites for “vertical blinds”. Vertical Blinds: Compare Prices. Vertical Blinds Products – Lowest Prices at DealTime! Find results for vertical blind. Best vertical blind websites.

Yoki (Email) (URL) - 05 August '05 - 01:41

[[http://online-poker-gambling.journeycl..]]

Online Poker – Win REAL Money – FREE $200 Bonus! Casino-on-Net: Play Poker Online – Get $200 Bonus! Online Poker – Free Play. Winning Gambling Systems. Texas Hold”em Poker Strategy. Online Poker – Free Play. Winning Gambling Systems.

Yoki (Email) (URL) - 05 August '05 - 01:41

[[http://online-strip-poker-game.geltop...]]

TheTopOnlineCasinos.com. Online Poker – Free Play. Online Poker. Free Fun Online RPG Game AdventureQuest. Get 1000”s of Free Email Emoticons! Play Live, Multi-Player Poker. Poker Chips @ Poker Table. Pocker at Shopping.com!

Yoki (Email) (URL) - 06 August '05 - 02:24

[[http://playing-poker-online.danksearch..]]

Online Poker – Free Play. Online Poker – Free Play. Partypoker – Top Sites !! Online Poker – Top Sites !! Party Poker – Play Poker Online. Casino Online Search Engine Extreme. No Deposit Casino and Bingo. Party Poker – Play Poker Online.

Yoki (Email) (URL) - 06 August '05 - 03:08

[[http://online-poker-strategy.toptrusts..]]

Texas Hold”em Poker Strategy. Online Poker – Free Play. Online Poker – Free Play. Texas Hold”em Poker Strategy. No Deposit Casino and Bingo. Empire Poker Bonus. FIND INFO FOR online poker strategy ON INFO.COM. TheTopOnlineCasinos.com.

Yoki (Email) (URL) - 07 August '05 - 02:04

[[http://free-online-video-poker-guide.h..]]

Free Sony Vaio Laptop! Choose Your FREE LAPTOP Now – US Only. Free Stuff and Bargains at MyFreeStuffPlus.com. @#9835;FREE Ringtones And Wallpapers For Your Cell. Get a Free Plasma TV. Unlimited Music Downloads Only $1 a Mo.

Yoki (Email) (URL) - 07 August '05 - 02:37

Thank you for stopping by my site

calvin (Email) (URL) - 12 June '06 - 16:02

Very interesting & professional site. You done great work.

gino (Email) (URL) - 13 June '06 - 01:19

“”:

Folder (Email) (URL) - 13 June '06 - 05:21

Personal information





Remember your information?
Comment

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.


^M