"How many of you would take Solaris for a spin if doing so was as easy as, say, downloading the latest version of Ubuntu and installing it?"
Well guess what? The time has come. This past weekend I downloaded the live cd release of OpenSolaris 2008.05. Stuck the cd in my Dell XPS M1530, rebooted, and I was feeling a whole lot of OpenSolaris love. The experience was wonderful! It was the same, 'wow, even a newbie like me can do this" feeling that I had the first time I gave an Ubuntu live cd a spin a few years back. That little Ubuntu spin a few years ago was so wonderful, that before I new it, I went from a Linux newbie, to a Linux only user. This latest spin of OpenSolaris has been every bit as rewardingand I have this feeling I'll be spinning OpenSolaris a bit more on my harddrive as time goes on.
Yesterday, I decided to format some space on my development laptop harddrive for an OpenSolaris partition. This machine is being used almost around the clock these days for development using Ruby, Ruby on Rails, and MySql, with a Rails pimped up version of gvim. I use Opera (9.5 beta to be exact) for most personal web browsing and mail, and Firefox for development plugins. So, my first question was "how long will it take me to get there". I don't have time to waste right now, but I really want to give this a spin. So, I backed up my Ubuntu Linux partition the night before and I was ready to go.
What follows are my notes that I made along the way while going through my first afternoon on OpenSolaris.
Install was flawless. During the live cd run I was prompted with the available wifi connections, I picked mine entered my key, and then network automagic finished its magic. All flawlessly. Somehow these settings were pushed from my LiveCD experience into my install, because right after booting up for the first time after the install, I was told that I successfully acquired my ip address, and saw that my wifi connection was indeed up and running. Didn't touch a thing...sweet! Almost too sweet, though. I'll need to dig into this nwam thing a little and understand where its keeping my wep keys, and order preference etc. But hey, I'd rather be researching why its working instead of why its not working :-)
Also, right out of the box I had great looking fonts and NVIDA graphics support...hey this is looking pretty promising. I mean at this point we are just talking about the housekeeping tasks of getting up and running, we aren't even talking about any of the hardcore things that make OpenSolaris so attractive (real SysV based Unix, zones, zfs, dtrace, etc.) But even so, just talking out of the box housekeeping this is already looking pretty sweet and very promising.
Open nautilus, go to Network...bam the other windows computers in my house are all already sitting there via samba shares - absolutely nothing for me to do - sweet! I mentioned that I backed up everything that I wanted protected from my Ubuntu install over on a shared network drive in the house. Well that was on my FreeAgent Pro that I have attached to a Windows PC in the house. And now, right out of the box I can see my backup stuff over my wifi accessing a windows shared drive to my FreeAgnet Pro. Ah, did I mention that all I've done so far is boot up. Very cool.
Next, download Opera 9.5 beta (I've been running this under my Ubuntu install since the first beta came out months ago), then I "pkgadd" my downloaded opera package, copy over my .opera directory from the network drive into my new home directory, open Opera... and bam, all my mail and mail settings, bookmarks and Opera configurations. Very nice! Continue to poke around a little more in Opera and everything seems to be good. I'll need to take care of my plugins and probably symlink my opera plugin directory to my Firefox directory to share some plugins, but I'll let the plugin thing wait for later. More meat and potatoes stuff to tackle first.
Type ruby -v, got no ruby love. Ok, "pkg search -r ruby", find the "SUNWruby1.86" package name. Ok, "pkg install SUNruby1.86"... Ah, my ruby love is there. Lets add ruby to my path...open a new .bashrc (i don't see on here yet), add PATH=$PATH:/usr/ruby/1.8/bin: ; export PATH. Ok..Quick IRB session to poke around a little. Then off to take care of getting some Ruby Gems going.
OK, "gem environment" to see what we are working with. Looks like the Sun ruby package is using "/var/ruby/1.8/gem_home". OK, quickly peak just to see if there is any out of the box gem stuff there that might be part of the special Sun ruby package. I don't think so. gem_home looks empty and I think I'm starting fromscatch. Start going to town on a few of the more common gems that i need.
Oops. Small problem installing any gems that require c compile. Looks like path related stuff. Seems like it shouldn't be too bad to address, but you never know. Quick Google search...ah, its just an issue with the c compiler path location as explained here: http://blogs.sun.com/prashant/entry/dtrace_support1. Once I updated my rbconfig.rb file as suggested in this blog post all my gem installs went fine from there on out.
Next, lets check and see if we have any MySql support out of the box...nope. ... okd, lets see what is out there: "pkg search -r mysql". Ok, looks like some mysql 5 and mysql 4 packages and support packages. Lets take anything that might be needed to get mysql5 up and running. (remember, this is about getting going fast, not worrying at this point that maybe I'm loading an extra library or two that I don't need" pkg install SUNWmysql5 SUNWmysql-base SUNWsfwhea.
OK, packages are done. Lets try just executing mysql and see if anyone is home. Oops...error can't connect to local MySql...Ok, so we have mysql installed, but obviously its not running. Ok, lets see what we have: "svcs mysql" gives me "disabled svc:/application/database/mysql:version_50". Ok, looks like it just needs to be started: "svcadm enable svc:/application/database/mysql:version_50"
==> print out current wifi data link info
dladm scan-wifi
==> show all available wifi links
svcadm restart nwam
==> restart network auto magic
I'm not sure what my wifi issues are yet, but they haven't been show stoppers. Generally, a svcadm restart nwam did trick. Once, I even went as far as disabling nwam, and configuring things manually through network-adm, but I went back to the nwam auto magic after the next reboot, and its been fine since.
The new OpenSolaris Image Package System (pkg install, etc.) is the way to go, but its young and growing and not everything you might need is in there yet. So, falling back to the blastwave seems like the way to go when necessary:
cd /tmp
wget http://www.blastwave.org/pkg_get.pkg
pkgadd -d pkg_get.pkg
export PATH=$PATH:/opt/csw/bin
pkg-get install
I use the full glib'd version of vim for most of my development work and the out of the box vim wasn't compiled with the -g option. Unfortunately, it doesn't look like there is a package yet in the IPS for gvim, so I turned to blastwave: pkg-get install gvim (then sit back and watch the billion and 1 glib, gtk, glade dependencies get loaded). Oh well, for me at the moment a small price to pay to get my favorite text editor up and running.
Ok we have gvim (just added the blastwave install location to my path to make the gvim command simple../opt/csw/bin). Copy over my old .vimrc and .vim directory...fire up gvim. Not too bad. Some problems with path issues for things in my .vimrc that either I'll pull out for now or comment until I can address. But, overall not bad. I have my Ruby and Ruby on Rails plugins as well as most everything else.
Peek to see if we have OpenOffice..looks like that is not out of the box default, ok, pkg install OpenOffice, wait for download, and install, and we are good to go with OpenOffice 2.4
So, that was yesterday. Since then I've been working full steam ahead on my current Ruby on Rails project. After taking these notes yesterday, I since connected to my svn repository over ssh with no problem. Checked out my project, and have been going to town. This is pretty amazing. I'm at a day and a half, and haven't had to boot a single time back to Ubuntu to get anything or do anything that I forgot along the way.
Well Ian, last year when you asked: "How many of you would take Solaris for a spin if doing so was as easy as, say, downloading the latest version of Ubuntu and installing it?" my hand immediately went up. Well it just came down, because I just did exactly that. Thanks to everyone involved. Hopefully my OpenSolaris fu will get better and I can give back to the community as I learn.
No comments:
Post a Comment