Archive

Archive for the ‘work’ Category

Installing the Perl DBD::Oracle on SPARC/Solaris 10

June 4th, 2010 beezly 2 comments

Installing the Perl DBD::Oracle driver on Solaris is traditionally a complete ballache. I hate most things about Oracle software packaging and installation instructions, so I thought I’d get my own instructions going.

So here goes;

Compilers

Start by ensuring you have Solaris 10, patched up to date. First thing we need is a compiler, so take yourself off to http://developers.sun.com/sunstudio/ and get them installed. Once you have done that you should be able to run “versions” and get something like this;


[root@cisapplive /]# version
Machine hardware:   sun4u
OS version:         5.10
Processor type:     sparc
Hardware:           SUNW,SPARC-Enterprise

The following components are installed on your system:

Sun Studio 12 update 1
        Sun Studio 12 update 1 C Compiler
        Sun Studio 12 update 1 C++ Compiler
        Sun Studio 12 update 1 Tools.h++ 7.1
        Sun Studio 12 update 1 C++ Standard 64-bit Class Library
        Sun Studio 12 update 1 Garbage Collector
        Sun Studio 12 update 1 Fortran 95
        Sun Studio 12 update 1 Debugging Tools (including dbx)
        Sun Studio 12 update 1 IDE
        Sun Studio 12 update 1 Performance Analyzer (including collect, ...)
        Sun Studio 12 update 1 Performance Library
        Sun Studio 12 update 1 Scalapack
        Sun Studio 12 update 1 LockLint
        Sun Studio 12 update 1 Building Software (including dmake)
        Sun Studio 12 update 1 Documentation Set
        Sun Studio 12 update 1 /usr symbolic links and GNOME menu item

version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/cc": Sun C 5.10 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/CC": Sun C++ 5.10 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/f90": Sun Fortran 95 8.4 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/dbx": Sun DBX Debugger 7.7 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/analyzer": Sun Analyzer 7.7 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/dmake": Sun Distributed Make 7.9 SunOS_sparc 2009/06/03

Oracle Instant Client

Get the 32-bit SPARC Instant Client from http://www.oracle.com/technology/software/tech/oci/instantclient/index.html. Get the 32bit version even if you Solaris install is 64-bit (on SPARC, this doesn’t apply on x86-64). Your perl install is 32-bit (don’t believe me? Use file /usr/bin/perl to show you) and you need the 32 bit drivers.

You need the sqlplus, basic and sdk files from the Oracle site.

Extract the zip files into a directory. I put mine in /opt/instantclient. Then ensure your link loader knows where to find the libraries. You can use LD_LIBRARY_PATH although I generally don’t like that method and prefer to use crle instead.

crle -l /lib:/usr/lib:/opt/instantclient

Updating CPAN

The default install of CPAN on Solaris 10 has loads of out-dated modules. Fortunately, it is very easy to update them to current versions. You can start the CPAN shell by running (as root) perl -MCPAN -e shell.

The very first time you use CPAN it will ask you a lot of config questions. One thing I would strongly suggest doing is using gtar instead of the default Solaris tar. The default tar appears to have been written about the same time as Noah built the Ark and as such doesn’t support quite a few of the options modern tar files use (include the CPAN tar file which gets downloaded). Once you have finished answering the questions, you should be presented with a CPAN shell, where you can run;

install Bundle::CPAN

This will update CPAN and all the related modules. Answer “yes” to any questions it gives you and once it has completely finished use reload cpan to get it to refresh itself.

Installing DBD::Oracle

This is the last step. At the CPAN shell, use get DBD::Oracle to download the Oracle DBD interface and then make DBD::Oracle to build it. I do this as separate tests because it is very likely that the make test phase of the install will fail. Assuming that the compile is successful use force install DBD::Oracle to install the Oracle driver. The test-suite is very thorough and goes as far as checking for connectivity to a test database and the ability to perform operations on a test database (hence why I said it is likely to fail). Once the install phase is finished, you are done.

Categories: Computing, work Tags:

Cron’s environment is not your environment

August 20th, 2008 beezly No comments

Ok… a work related post.

I’ve been doing some work on systems that run commands automatically with Cron and our developers have been hitting some problems with commands that run fine as root, but don’t work correctly when they are executed by cron.

The cause of this is differences in the environment between the interactive root user environment and the cron root user environment. Let me demonstrate;

root@eeyore:~# env | wc -l
21

My interactive root user environment 21 lines of “stuff” in it, but if I run a env under cron and output that to a file I get this;

root@eeyore:~# wc -l /tmp/crontmp
5 /tmp/crontmp

Two quite different values.

The interactive $PATH is;

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin:/usr/X11R6/bin

whilst the cron PATH is;

/usr/bin:/bin

Hence you will have difficulties finding tools outside of this rather limited path. Quite often things like Java are outside of the limited path.

If you want to have a more complete PATH, you’ll either have to define on the individual lines in your crontab, or at the top of the crontab entry.

Update

The limited crontab is defined in /etc/crontab. On a RHEL4 system it defines;


SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

Categories: work Tags:

Back from Recording

August 12th, 2008 beezly 2 comments

Yestterday I was at the wonderful Leeders Farm recording studio with the rest of the band I’m playing in. We had a great time, got two awesome songs recorded and I must say a big thanks to both Nick and Alex at Leeders Farm. I’ve just heard a quick mix of both songs we did and they sound fantastic.

Here’s a sneak preview video of us at the studio…

Categories: Life, work Tags: , ,

Basstastic

July 29th, 2008 beezly No comments

So of you may know about this already but I’m playing in a band here in Ipswich. They’re called Hayze and you can find some of their previous recordings on their MySpace site.

We’ve been working hard towards doing some recordings in August and there are a few demo recordings from those rehearsals with me playing bass for you to enjoy!

We The People

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

A Little More Control

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Categories: work Tags:

First week in

January 12th, 2008 beezly No comments

I’ve been at my new job for a week now so I thought I’d give a quick update. I turned up a little bit early on Monday, mainly because I expected it to take a while to get through security (the place I work is on a big research site) but it only took 5 minutes.

I was supplied with a new laptop and a temporary desk to sit at. I spent the day trying to get my laptop working as I like it and also reading up on what different parts of the business do. I got my proper desk on Friday and I’ve got most things set up as I like them now. Getting my laptop working with the docking station meant some playing around with the X configuration. I might post some more on that later when I get chance.

Categories: work Tags: , ,