Joyent

Introduction to Solaris

Solaris is a UNIX Operating System much like any other flavor of UNIX. There are differences compared to Linux and the BSDs (FreeBSD, NetBSD and Darwin) but they don’t take long to get used to.

We just want to touch on a few common ones:

  • Solaris’ tar is a bit different, but the gnu tar is also installed. It’s the binary gtar. In particular you’ll notice that “tar xvzf” will fail with the “z” flag being unknown. The flag “z” is what gunzips the file. So you either first gunzip and than tar xvf or you use gtar xzvf.
  • Solaris’ “ps” is very similar to Linux but different than the BSD ps. If you want to use a BSD style ps you can run /usr/ucb/ps. The “native” Solaris ps invocation that is equivalent to /usr/ucb/ps -axu is ps -aef.
  • Startup scripts can live in /etc/init.d/ and in “SMF”. You can also use standard startup scripts in /etc/init.d/ or you can use SMF. Some key things are already SMF’ed. You can see which ones have SMF manifests in the system by typing “svcs -v”. For example, notice that SSH is there, this means that if you change the configuration file in /etc/ssh/sshd_config, then you “refresh” it with “svcadm refresh ssh”.
  • We’re currently using the blastwave build process for packages. That means that binaries like mysql and apache live in /opt/csw rather than the typical /usr/local.
  • There isn’t a “cc” that ships with Solaris (it’s a separate compiler download), but all the gcc’s are there in /opt/csw. This is most notable when you are say trying to compile a gem that goes out and looks for “cc” and doesn’t find it. The solution for this particular case is to have the rbconfig.rb point to gcc. If you are running Ruby 1.8.4 then you can replace it with:
svn export http://svn.joyent.com/public/accelerators/rbconfig.rb.184 /opt/csw/lib/ruby/1.8/i386-solaris2.8/rbconfig.rb

If you are running Ruby 1.8.5 then you can replace it with:

svn export http://svn.joyent.com/public/accelerators/rbconfig.rb.185 /opt/csw/lib/ruby/1.8/i386-solaris2.8/rbconfig.rb
  • In /home/admin there is a .bash_profile that pulls in .bashrc. You’ll want to use those for the bash shell files when creating other shell users.
  • You can ssh in as the “admin” user, then you “sudo su -” and use that password.
  • If you want to install something that’s in blastwave (like I’m going to use “nano” in these), then install it like the following:
pkg-get -i nano

Honestly there’s not much more than that. But if you’ve got a question that hasn’t been covered here, trying adding it to our FrequentlyAskedQuestions page.

 
solaris/kb/introduction.txt · Last modified: 2008/02/04 12:16 by alexbcoles
 
Recent changes RSS feed Creative Commons License Driven by DokuWiki