SysAdmin's Journey

Separating Your Personal Signal From Noise at ServerFault.com

Matt Simmons over at Standalone Sysadmin has been evangelizing ServerFault.com for awhile now. The idea is great, and it really works - I’ve learned a lot of things from the site already. However, checking websites is so 1998 - everything I do is RSS now. Simply adding the homepage of ServerFault.com to your RSS reader using http://serverfault.com/feeds results in a huge amount of items that I could care less about, and I hate clutter in my RSS reader. After poking around a bit, I found some undocumented features that you can use to eliminate unneeded noise from your RSS feed (or your browser if you still live in 1998 :-) ). The key to doing this is tags. Every question on ServerFault has one or more tags. You can view them all at http://serverfault.com/tags. There’s two ways you can go about getting only what you want in your feed – excluding tags or including tags. Let’s start with including tags.

Including Tags

When using this method, I haven’t figured out how to use an “OR” when using multiple tags, you can only use the builtin AND operation. Let’s say that you only want questions tagged with Linux. Easy enough, your feed URL would be ht tp://serverfault.com/feeds/tag/linux. Now your feed will only show you questions tagged with Linux. Say that’s getting to be TMI, and you want to limit that feed to only include questions tagged Linux and Ubuntu. Simply add more tags to your feed URL with +tagname, and urlencode the plus - resulting in this URL: http://serverfault.com/feeds/ tag/linux%2bubuntu. Now, you can’t do “OR”’s in a single query, but you can create multiple feed URL’s that include just what you want and use your feed reader to combine them into one folder.

Excluding Tags

The above example works, but not many sysadmins I know are so focused in just a few areas. Also, the above configuration will not keep you in-tune to new tags that you might be interested in. For myself, I’m interested in everything except anything Windows related. By excluding tags, you will need to go through an iterative process, but once you’re done you’ll be quite happy with the results. Let’s get to it. The first step is to make a URL that gives an RSS feed for all posts not tagged windows. Easy: http://serverfault.com/feeds /tag/-windows. Now, unfortunately, many questions are tagged as windows-server-2003, but are not tagged windows. So, we append the URL with a “AND NOT THISTAG” operation like this: http://serverfault.com/feeds/tag/-windows%2B-windows- server-2003. You can see where I’m going with this now. Using these two methods, you can create a very nice, clean, and relevant personal RSS feed for ServerFault’s questions. Nothing here is rocket science, but it’s not documented either – hopefully it helps someone else. Note that you can preview what your query will generate in your browser by replacing “feeds/tag” in the URL with “tags”. In case you’re wondering, my “everything except Windows” feed URL is still not perfect, but here’s what I’ve got so far: http://serverfault.com/feeds/tag/-windows%2B-windows-server-2003%2B-sqlserver %2B-windows-server-2008%2B-windows-xp%2B-iis%2B-active-directory%2B-sharepoint %2B-vista%2B-exchange%2B-outlook. Share your URL’s and tips I may have missed in the comments!

Product Review: FileRun PHP File Management System

large_filerun.jpg

At work, we had a need for software that addresses a specific problem. We have a bunch of users that need to share files in a secure manner via HTTPS, but the app has to be drop-dead easy. Being an e-commerce shop, we could have written our own, but we didn’t have the time and resources. We could have outsourced it to box.net or a similar service, but the company frowns upon outsourced solutions. I happened to stumble upon FileRun, and I have to admit that I’ve been very impressed. Read on for the full review.

First things first, let’s get the negatives out of the way. There’s just a few, and they didn’t impact us:

  • FileRun encrypts it’s PHP code using Zend Guard, making the majority of their code not viewable by the end user. In order to run Zend Guard encrypted binaries, you have to install a PHP module to run them.
  • The online documentation covers only the basics. Many of the features are undocumented, but are fairly self explanatory.
  • The software is written by developers in Romania. Again, this was not a problem for us, but emailing support sometimes got replies at odd hours of the day. Now, onto the positives. First of all, FileRun is very well written software. I’ve found only one bug, and it was a minor bug introduced in only the most recent update. I emailed support about it, they offered to patch it for me immediately if I couldn’t wait for it to be fixed in the next release. The development team operates under the “release early, release often” mantra, with new updates coming out about once a month. The support is very good; I got fast, knowledgeable answers to all my questions. The pricing is very workable and advertised on their site, and there is an online demo offered at their site. Where the software shines is in it’s interface. The main file interface is a typical Windows-like explorer window with two panes - one for folder navigation, the other for contents of the selected folder. Using AJAX, they have made the application feel more like a desktop application than a webapp. There are three methods of uploading files, one is a standard HTML form-based upload, the second is a Flash-based upload, and the third is a Java applet. The java applet allows for drag-and-drop uploads, and it also gets around the PHP upload limitations allowing you to upload unlimited file sizes (I uploaded a 2.6GB Solaris DVD iso to it and it didn’t skip a beat!). Any user who is used to file management on a desktop system will be off and running in no time. The backend has the concepts of Users, Groups, and Roles. Roles should probably have been called a “User Template”, because that’s really what they are. Each user can have one Role assigned to it, and the Role overrides settings such as home directory, permissions, etc. Groups are simply containers that hold one or more users, and each user can belong to zero or greater groups. Groups are used for sharing folders and setting permissions on shares. If I’m in Accounting, I can create a new directory under my home directory, and share it to the Payroll department. When a member of the payroll department logs in, they will see my shared folder. I can dictate whether payroll can upload, download, rename/delete/change files and folders in that shared directory as well. While Groups are used to set permissions on files shared between authenticated users, one of the biggest requirements for us was to be able to offer downloads to unauthenticated users. This is where the weblinks feature comes in, and I believe it’s the biggest feature in the application. Once I upload a file to FileRun, I can generate a weblink. This is simply a link generated by the PHP script that looks something like http://my.domain.com/weblinks/?id=b6d767d2fde85d21a44b0e4567680cb9. The user generating the weblink can set a shared password on the link, set an expiration date for the link, or even set the max number of allowed downloads for the link. The UI also has built in support for emailing a weblink directly from the app instead of copy/paste into your MUA. FileRun supports thumbnail generation via the convert binary from ImageMagick, so anytime a user uploads a pdf, jpg, png, psd, etc, a thumbnail is generated. There is also a search index feature where MS Office documents and PDF’s are indexed and are searchable via the UI. FileRun also supports versioning, but I haven’t yet researched whether or not the versioning stores only the deltas, or complete copies of the files - I suspect the latter. Another important feature of FileRun is that it stores the file itself on the filesystem - metadata is stored in MySQL. This means that you can interact with the files from the OS as well as from within FileRun. Another nice feature is the fact that it supports zip/unzip operations from within the UI, no need for external programs to create/extract zip files. Features that are there, but I haven’t played with yet include:

  • Online editing via Zoho.com and Snipshot.com

  • WebDav - MS Web Folders isn’t supported (what’s the point?)
  • Email files as attachments.
  • All actions are logged to the DB, and you can generate email-based notifications using rules. You can get emailed about every little activity, or only failures.
  • External Authentication is supported.
  • A recycle bin prevents unintended deletions.
  • See FileRun’s full feature list for more details. We’ve been using the software here for a couple of weeks, and I love it. It solves a problem for us that would have cost a lot more in dev time than what the licensing cost is, and they support the software, not us. It’s not without it’s issues, the pros far outweigh the cons.

Book Review: Learning NAGIOS 3.0 by Wojciech Kocjan

I was recently asked by PACKT Publishing to review the book Learning NAGIOS 3.0 by Wojciech Kocjan. I agreed to do so so long as I could state whatever I felt about the book, and PACKT was fine with that. I’m guessing they were fine with that because they knew the book was pretty darn good! Click through for a full chapter-by-chapter breakdown of the book. Learning Nagios
3.0.png Title: Learning NAGIOS 3.0 Author: Wojciech Kocjan ISBN: 978-1-84719-518-0 Overall, this is a good book, with material that everyone except the most seasoned Nagios veterans can appreciate. I myself have been using Nagios for about the last 10 years, and I’ve been too lazy to upgrade my 2.x install to the latest 3.x install. After reading the book, I think I’ll make it a priority. The book’s main audience is probably ideally someone who isn’t new to *nix, but is new to Nagios. They will get the most use out of this book. That being said, there was quite a bit of new information or tips that I hadn’t discovered on my own within the book as well. Perhaps what I liked most about the book is that not only did it tell you how to get things set up when you have only 10 hosts and 20 services to monitor, it told you how to set things up so that performance and manageability don’t become an issue when that same instance of Nagios is monitoring thousands of hosts and services. Here’s a quick breakdown of content by chapter. Note that Chapter 7 is clickable - you may download a PDF for free of that chapter.

Chapter 1: Nagios Overview

The author does a good introduction about the core ideas and conventions in Nagios, and at the end he offers a “What’s New” section for sysadmins who are upgrading from 2.x.

Chapter 2: Installation and Configuration

This chapter walks you through installing Nagios from source on Ubuntu ‘Gutsy’ 7.10. It also goes through the basic tasks of creating hosts, services, commands, time periods, contacts, and groups of objects. After getting your feet wet, the book dives into one of the key features of Nagios, inheritance. New to Nagios 3.0 is the capability to inherit from more than one parent, which is a welcome addition. The final section goes into one of the most important features (and one of the features Nagios implements best): notifications.

Chapter 3: Using the Nagios Web Interface

The first precursor to using the web interface is to get it setup properly. One key point that the book leaves out, and can be a major stumbling block for new users is that the core of the web interface is compiled C binaries. Most users expect PHP, Perl, or some other interpreted language, but this is not the case in Nagios. This severely limits the number of people who can go in and modify the web UI - everyone knows PHP, not many know C. The rest of the chapter goes through using the web interface to check status, print reports, etc.

Chapter 4: Overview of the Nagios Plugins

Each Nagios installation is only as good as it’s plugins. In fact, without any plugins, Nagios is unable to really do anything at all. Nagios' reliance upon plugins is one of the reasons that it’s been around for so long, and seems to fit everyone’s setup. Most use the same Nagios core, but you’d be hard pressed to find two installations using the exact same set of plugins. The majority of the chapter goes over the core plugins that are included in the Nagios Plugins distribution.

Chapter 5: Advanced Configuration

Chapter 5 covers some things that the Nagios docs don’t - mainly how to organize your definitions into a maintainable file and directory structure. It also goes into detail about the depth-first inheritance search order, and multiple inheritance - new to Nagios 3. Also new to Nagios 3, custom variables, are covered here as well. Chapter 5 also covers the algorithm used to determine flapping, and does it very well. I’d never comprehended it until reading the book.

Chapter 6: Notifications and Events

Note: This chapter has two abstracts available on PACKT’s website - you can read Part 1 here, and Part 2 here. This chapter goes over the ins and outs of setting up contacts properly. The key here is to not over-notify contacts about incidents they have no input or control on, because they will quickly delete or even filter all messages from Nagios. The chapter also goes into different types of notifications available to Nagios. When fixing a broken application’s source code is not an option, many times the only solution is to restart the application when it fails. Nagios can do this for you as well in what’s referred to as Event Handlers. This chapter walks you through setting up an event handler that restarts Apache should it die. New to Nagios 3 is Adaptive Monitoring. Adaptive monitoring gives you the ability to dynamically change configurations stored in the config files via the named pipe. The remainder of the chapter walks you through building, installing, and configuring NSCA to accept passive check results over the network.

Chapter 7: Passive Checks and NSCA

Chapter 7 starts the content with the subject of passive checks. Passive checks are the key to scaling Nagios to thousands of hosts. The author then goes into the pros and cons of active and passive checks. From there, you are taken through several examples of passive host and service checks.

Chapter 8: Monitoring Remote Hosts

This chapter introduces the reader to the concept of remote checks, and how they differ from passive checks. The first part of the chapter goes into detail about using SSH to execute remote checks. Personally, I have never used this approach, as it introduces a little more security risk - if someone were to compromise the nagios user account on the Nagios server, they would likely get shells on all your other servers as well. The next section of the chapter goes into setting up NRPE, which I personally recommend and use extensively. NRPE is has much less overhead than SSH, but still encrypts the connection. Also, NRPE is not a shell, so if the nagios user is compromised on the server, the only thing the attacker could do to the remote machines is run the previously defined service checks on your client hosts. The author walks the reader through examples of using both approaches.

Chapter 9: SNMP

SNMP is very near and dear to me - I was forced to love it when working with DOCSIS back in my cable industry days. The author gives a pretty good introduction to SNMP in the beginning of the chapter. After introducing the reader to net-snmp utilities and some GUI’s, he goes into detail about installing and testing the net-snmp agent on the remote hosts. Once SNMP is set up on the remote hosts, it’s time to start playing with the check_snmp plugin. check_snmp is not so different from other plugins, and is not bad to setup at all. One thing that I had tried before, and failed at doing, was setting up Nagios to be a SNMP trap destination. The author presents a way to do this, but I would argue that his method wouldn’t scale very well. Either way, his method works - although it’s important to remember that Nagios is not a SNMP management package.

Chapter 10: Advanced Monitoring

The first part of the chapter goes into using NSClient++ to monitor Windows systems. I would argue that this is not necessarily “Advanced Monitoring” - maybe there should be a small chapter dedicated to monitoring Windows. However, that’s all semantics - the content itself is accurate and well stated. The chapter goes into detail about installing NSClient++ and using check_nt, check_nrpe, and passive checks using NSCA to get data from your Windows hosts. The remainder of the chapter goes into distributed Nagios instances. I myself have never had to do this, but in reading through the content, it certainly looks doable. It appears as though there isn’t too much to the initial setup, but config file maintenance looks like it could become cumbersome. I’ll have to noodle on that for a bit!

Chapter 11: Extending Nagios

Yoda might have been quoted as saying “Only after a padawan writes plugins will the true power of Nagios be unveiled to him” - or maybe not, but it’s definitely a true statement. That’s what chapter 11 is all about - writing your own plugins. I can especially appreciate the fact that the author distinguishes between a working plugin, and a plugin written the right way. The chapter finishes up with how you might go about writing your own web interface (only skimming the surface for obvious reasons).

Summary

In summary, this book is for anyone who runs, or is thinking about running Nagios 3.0 for business or pleasure. It’s a pretty quick read, and has quite a bit of information in it that will have you reaching for it like you would a reference book. In the interest of full disclosure, all links to PACKT’s website from this article will result in me receiving referral dollars should you purchase the book from them. I only participate in referrals when I have personally used and approve of the product. If you enjoyed this review and are interested in purchasing the book, I would appreciate your referral.

Back to Linux for My Desktop

Well, it’s been just over a month since I’ve converted my main workstation over to OpenSolaris. Unfortunately, I’m going to abandon the project, and switch back to Linux as my choice as primary desktop OS. The main reason? Cost in productivity. It’s not that I can’t build things from source, or tweak config files, but I just don’t have the time to anymore. Unlike OpenSolaris, dual-head works as expected on Linux. I had to do voodoo to make the home and end keys work in the gnome-terminal. Little things, like gcc being the first compiler found in PATH, but most binaries on the system being compiled with SunStudio cc cause larger issues like CPAN not working correctly. Certain things just aren’t even there yet, like virtual consoles, which are invaluable when troubleshooting Xorg issues. Each one of these issues is fixable, but the key is that they don’t exist in the first place when I use Linux. The lack of graphics acceleration for my card turned out to be more of an issue that I would have thought (you want your desktop environment to be snappy). Also, not being able to use the AHCI mode on my SATA controller killed disk I/O. Since OpenSolaris has far fewer adopters than Linux, binary-only applications often don’t release binaries for OpenSolaris (Dropbox for example). The community is growing, and is very helpful, but it’s not near anywhere as massive as the Linux community. Often times, Google searches result in no hits when troubleshooting. Don’t get me wrong, it’s not that I dislike OpenSolaris, or the direction it’s going. The opposite is true - I love it! ZFS is truly incredible, and SMF is a godsend. IPS, while a long ways from being as fast and comprehensive as apt-get, is a huge improvement over the old way. In fact, one of the first things I plan on doing in Linux is installing VirtualBox and installing OpenSolaris within it. To summarize, when using OpenSolaris as my primary desktop OS, the “you gotta be kidding me”’s and the “dammit”’s far outnumbered the “ooh”’s and “ahh”’s. By using Linux as my desktop OS and OpenSolaris as a VM, I can isolate myself from the negatives. I just can’t afford the impact to my productivity right now. As long as Oracle doesn’t muck too much with the current state of affairs, there’s a good chance that in a year or two, I’ll try again and have much better luck. Until then, OpenSolaris will be on my VM’s and Servers, but won’t be on my workstation.

The $23 Quadrillion Character - Space!

From Slashdot: Hmmm2000 writes “Recently several Visa card holders were, um, overcharged for certain purchases, to the tune of $23,148,855,308,184,500.00 on a single charge. The company says it was due to a programming error, and that the problem has been corrected. What is interesting is that the amount charged actually reveals the type of programming error that caused the problem. 23,148,855,308,184,500.00 * 100 (I’m guessing this is how the number is actually stored) is 2314885530818450000. Convert 2314885530818450000 to hexadecimal, and you end up with 20 20 20 20 20 20 12 50. Most C/C++ programmers see the error now … hex 20 is a space. So spaces were stuffed into a field where binary zero should have been.” That’s probably more damage than Y2K ever hoped of doing ;-)

Making Home and End Work Like They Do in Linux on OpenSolaris

In OpenSolaris, the xterm bindings aren’t there for the End and Home keys - they do nothing. Yes, I know, Ctrl+a and Ctrl+e do the same things, but my laziness has turned into muscle memory. Here’s how to fix it: As your normal user, run the following:

mkdir /tmp/foo
env TERMINFO=/usr/share/lib/terminfo /bin/infocmp xterm > /tmp/foo/xterm.ti
echo ' knp=\E[6~, kpp=\E[5~, kend=\EOF, khome=\EOH, '  >> /tmp/foo/xterm.ti
env TERMINFO=/tmp/foo /bin/tic -v /tmp/foo/xterm.ti
cd /usr/share/lib/terminfo/x/
pfexec cp xterm xterm.orig
pfexec cp /tmp/foo/x/xterm xterm.new
pfexec cp xterm.new xterm

Now your home and end keys will behave like your used to in Linux! All of this was pretty much copied and pasted from http://tech.groups.yahoo.com/group/sol arisx86/message/20027 - thanks to Juergen Keil for the tip!

Migrating a Zone to a Different Machine on Solaris 10

Zones are one of the best features in Solaris 10 – they’re so lightweight that you can use them at almost no cost in performance. Today, I ran across a situation where one of my zones needed more RAM, and the box it was on didn’t have it. Read on for how to migrate a Solaris Zone to a different machine, and an important update to Solaris 10/08 that makes the process so much easier. The initial steps in migrating a zone are very similar. First, you need to halt the zone:

# zoneadm -z myzone halt

Next, you need to detach it from it’s non-global zone:

# zoneadm -z my-zone detach

Now, you need to copy the zone files over to machine B. You can use rsync + ssh, tar + ssh, tar + ftp, cpio, or any other mechanism. If you have your zone installed in /apps/zones, then the following should do the trick:

root@hostA # cd /apps/zones; tar -cf myzone.tar myzone
root@hostA # scp myzone.tar someuser@hostB:/var/tmp/ && rm myzone.tar
# ssh over to hostB, and become root 
root@hostB # cd /apps/zones/ && tar -xf /var/tmp/myzone.tar && rm /var/tmp/myzone.tar
root@hostB # zonecfg -z my-zone
my-zone: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:my-zone> create -a /apps/zones/my-zone
zonecfg:my-zone> commit
zonecfg:my-zone> exit

As you can see, the process of moving a zone isn’t too difficult, but the sticking point is when the global zone on machine A has different software and patches than machine B. Since a non-global zone’s inherit files and packages from the global zone, things can get messy. Up until Solaris 10/08, getting things straightened out was an exercise left up to the sysadmin, and it often times was no small task. If you’re on a release prior to 10/08, and there’s a lot of difference between Machine A & B, then you have your work cut out for you. Try this (running this on 10/08 or newer doesn’t hurt anything, and it allows you to “preview” changes):

root@gaia /apps# zoneadm -z sstg attach
These packages installed on this system were not installed on the source system:
    SUNWi15cs (2.0,REV=2004.08.23.14.43)
    SUNWi1cs (2.0,REV=2004.08.12.10.14)
    SUNWlocaledefsrc (11.10.0,REV=2004.08.12.18.18)
    SUNWnamdt (1.0,REV=2004.08.12.10.18)
    SUNWnamos (11.10.0,REV=2003.12.08.12.08)
    SUNWnamow (1.0,REV=2004.03.03.14.07)
    SUNWplow (1.0,REV=2004.08.12.10.19)
    SUNWplow1 (1.0,REV=2004.11.10.13.49)
    SUNWpsvrr (5.0,REV=2005.05.13.16.32)
    SUNWpsvru (5.0,REV=2005.05.13.16.32)
    SUNWtcatr (11.10.0,REV=2005.01.08.05.16)
    These patches installed on the source system are inconsistent with this system:
        118666: version mismatch
            (18) (20)
        118667: version mismatch
            (18) (19)
        118683: version mismatch
            (02) (03)
        118718: version mismatch
            (01) (02)
        118777: version mismatch
            (13) (14)
        118959: version mismatch
            (03) (04)
        119059: version mismatch
            (46) (47)
        119090: version mismatch
            (31) (32)
        119213: version mismatch
            (18) (19)
        119254: version mismatch
            (65) (66)
        119278: version mismatch
            (25) (27)
        119280: version mismatch
            (19) (20)
        119315: version mismatch
            (15) (16)
        119470: version mismatch
            (15) (16)
        119538: version mismatch
            (18) (19)
        119757: version mismatch
            (14) (15)
        119963: version mismatch
            (12) (15)
        120272: version mismatch
            (23) (24)
        120410: version mismatch
            (30) (31)
        120753: version mismatch
            (05) (07)
        120812: version mismatch
            (29) (30)
        121081: version mismatch
            (06) (08)
        121104: version mismatch
            (06) (07)
        122212: version mismatch
            (32) (33)
        122259: version mismatch
            (01) (02)
        122261: version mismatch
            (01) (02)
        122675: version mismatch
            (02) (03)
        122911: version mismatch
            (15) (16)
        123590: version mismatch
            (09) (10)
        123893: version mismatch
            (05) (15)
        123938: version mismatch
            (01) (02)
        124149: version mismatch
            (14) (15)
        125172: version mismatch
            (01) (02)
        125332: version mismatch
            (05) (06)
        125533: version mismatch
            (10) (11)
        125555: version mismatch
            (02) (04)
        125719: version mismatch
            (17) (20)
        125952: version mismatch
            (18) (19)
        126530: version mismatch
            (01) (02)
        126655: version mismatch
            (01) (02)
        127976: version mismatch
            (04) (05)
        136998: version mismatch
            (05) (06)
        137000: version mismatch
            (03) (04)
        137034: version mismatch
            (01) (02)
        137080: version mismatch
            (02) (03)
        138174: version mismatch
            (01) (02)
        138322: version mismatch
            (02) (03)
        138822: version mismatch
            (02) (04)
        138826: version mismatch
            (02) (04)
        138874: version mismatch
            (01) (03)
        139099: version mismatch
            (01) (02)
        139606: version mismatch
            (01) (02)
        139928: version mismatch
            (01) (02)
        139966: version mismatch
            (01) (02)
        139974: version mismatch
            (02) (03)
        139977: version mismatch
            (03) (04)
        140074: version mismatch
            (05) (08)
        140171: version mismatch
            (01) (02)
        140391: version mismatch
            (02) (03)
        140397: version mismatch
            (06) (08)
    These patches installed on this system were not installed on the source system:
        119397-09
        119788-09
        122130-04
        125060-05
        136708-01
        140589-01
        140916-01
        140917-01
        140919-01
        140921-01
        141414-01
        141686-01
        141688-01
        141690-01
        141692-01
        141694-01
        141715-01
        141717-01
        141719-01
        141721-01
        141726-01
        141729-01
        141731-01
        141733-01
        141736-01
        141738-01
        141740-01
        141742-01
        141743-01
        141765-01
        141767-01
        141773-01
        141775-01
        141781-01

WOW. That’s a lot of cleanup. It’s no wonder Sun was compelled to add the update flag. Here’s how to save yourself some hair: At this point, you’re good to ‘boot’ the zone on HostB. Thanks to Sun’s update feature, moving my resource-starved zone to a larger server was a painless ordeal

Fixing CPAN Perl Module Installation Issues on OpenSolaris

In OpenSolaris, if you’re installing perl modules via CPAN, you might run into this error:

cc: unrecognized option `-KPIC'
cc: language ildoff not recognized
cc: ReadKey.c: linker input file unused because linking not done

In order to fix that, edit the file /usr/perl5/5.8.4/lib/i86pc-solaris- 64int/Config.pm, and make the following changes to the existing lines for ‘optimize’ and ‘cccldflags’: UPDATE! Thanks to reader Vesta for his tip. The original tip I posted will not fix all the issues, for example Apache2::Util won’t install. This problem occurs because the Sun developers build perl with the cc from SunStudio, but by default, the first ‘cc’ found in a user’s path is a symlink to gcc. All you need to do is to install SunStudio, and prefer it’s cc:

pfexec pkg install ss-dev

Now, edit ~/.profile, and prepend your path with SunStudio’s bin directory, like so:

export PATH=/opt/SunStudioExpress/bin/:/usr/gnu/bin:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin

You can log out, reboot, source the new .profile, or export a new PATH variable to make the new settings stick. Now you should be able to install most any Perl module!

Plunging Into the Deep End: Running OpenSolaris on My Primary Workstation

Well, like I did with Linux ten years ago, I installed OpenSolaris 2009.06 on my primary workstation at work. There’s simply no better way to learn an OS than to force yourself to run it. While I was pretty close to Ctrl-C'ing the whole project a couple of times, I’m now getting things set up pretty much the way I need them to be. Stay tuned for articles with my tips, but here’s my first impressions:

  • IPS - the new package manager is fairly robust. It certainly appears to have some speed issues, but all in all, it works pretty well. It has a good selection of software available - not extensive, but enough to get you going. I’m sure both the speed and the quantity will both improve with time.
  • The Gnome Desktop as shipped has a very sharp and clean feel to it. It’s hard to describe, but I like it.
  • From what I can tell, Compiz is only supported with NVidia graphics cards. The fglrx driver doesn’t yet exist for OpenSolaris.
  • It really sucks trying to debug Xorg setup without virtual consoles!
  • While I’m a long ways from being comfortable, I’m now at a point that I don’t think I’ll find any showstopping issues.