Alas, poor Romulus

As time races towards the point where the last bits of my Sydney server room are moved to Seattle, this was one of the more poignant moments: the point where I shut down my OID (Oracle Internet Directory) server, which has been doing faithful names resolution duties for quite a while:

The load averages are nothing to write home about, but that box has been running uninterrupted for 2 years and 17 days. Until now.

Oh -and look. It is possible to use CentOS (4.x) in a production environment!

Fedora 16 (alpha!)

The first alpha release of what will eventually become Fedora 16 has been released -I got my copy from here.

The default artwork for the release (see left) is, to my eyes, frankly alarming -well, if not alarming exactly, at least not very good! It’s only a wallpaper change away, but I do wish Fedora would stop trying to theme their desktops to match their fairly arbitrary choice of version codename (in this case, Fedora 16 is codenamed Jules Verne, as in Twenty Thousand Leagues Under the Sea. Yeah, I think it’s a bad idea for a desktop theme, too!)

And I’m still not convinced by Gnome 3 (initial horror with Fedora 15′s implementation of it gave way several weeks ago to keen enthusiasm, but that has since been replaced by indifferent dislike… there’s nothing much I’ve seen in Fedora 16′s implementation that counts as a major improvement). Otherwise, there’s the usual software-stack updates (Firefox is at version 6, for example; and you get 3.4.2 of LibreOffice thrown in), but most of the changes are, I think, under-the-hood stuff and aren’t likely to revolutionise your Linux life!

I have successfully tested a Gladstone-prepared 11g Release 2 installation on the new release. There is the usual pile of software the OUI claims doesn’t exist (click Ignore All when prompted, because they do). There is also the expected ‘Error in invoking target agent nmhs of makefile ins_emagent.mk‘ problem during the linking phase. The workaround here is to run the fedora-linking-error-fix.sh script in your Desktop directory which Gladstone will have created for you (just navigate there with Nautilus and double-click the shell script when the linking error occurs, then click Retry in the Oracle Universal Installer. It’s plain sailing after that).

Interestingly, one of the reasonably significant changes made in this release (enough to get a mention in the release notes, anyway) is that, by default, a Desktop directory is no longer created for you during installation. However, Gladstone is hard-coded to write its fix-up script there, so a /home/<username>/Desktop directory needs to exist: create one before you start if you need to.

Of course, there can be no guarantees: what works in an alpha release might be broken by any subsequent beta, let alone the final, finished distro. But since it’s working right now, a revised, Fedora 16-aware, version of Gladstone is downloadable from the usual place.

Incidentally, I have not tested a 10gR2 installation on Fedora 16, and won’t be doing so. As was mentioned in various discussions on this blog lately, 10g Release 2 is out of mainstream Oracle support these days, and I don’t therefore propose to spend any more time on it from now on. So Gladstone may or may not work for 10g: feel free to give it a whirl, I guess.

Nice!

I feel moderately pleased with myself:

That’s a work system that involves querying a table with about 16 million rows containing 12GB of free-form text (via an Oracle Text index) about five times a second, with response times over the web of less than 0.5 seconds. It probably counts as a bit of tiddler in the great scheme of things, but when I took it on, they had a quarter of the records with average response times of 26 seconds. I feel as if I’ve earned my money!

(Apropos nothing in particular, their uptime was originally less than 90 days… they were running Windows 2003. I’m just sayin’…)

It would have been longer, too, except the SysAdmin caused the rack to short one day about a year and a month ago (by plugging in a USB device somewhere. Go figure!)

Oracle Article

As a follow-up to the article on building an Apache box is a new article explaining how you can use it to help automate the build of an Oracle database server.

The new article takes you from building a virtual machine, installing the operating system using Kickstart configuration files, running Gladstone to get all the Oracle prerequisites right through to getting Firefox displaying Flash properly and setting a fixed IP address.

Available in the usual place.

Forum…

I am getting quite a number of technical questions via email and as comments posted to various blog posts here, which is all fine… but is a complete mess, with quite often the same technical reply posted multiple times in different places.

I’ve therefore decided to open a forum where all technical questions should be asked. It’s linked to in the ‘metadata column’ at the right, but you can also visit it by clicking here.

Having been down the road of running forums before, I can tell you I’m very reluctant to do it again -and, as a result, I don’t intend to spend any time moderating it or doing anything much other than see if someone’s posted a question and answering it if I can. If it works, it works and if it doesn’t, I’m not going to worry about it.

LibreOffice & Oracle

I don’t often try and connect to Oracle from LibreOffice, but had to today… and got completely stuffed whilst doing so!

There are two essential problems.

The first is that I run Windows 7 64-bit and LibreOffice only comes as a 32-bit Windows download. This means, in turn, that a 64-bit Java Runtime Environment is not recognised by LibreOffice, which therefore complains that no JRE exists whenever you try to connect to a database with its “Base” application. The fix here is to install a 32-bit JRE, which you can do by going here and making sure to select the Windows 7/XP Office (32-bit) download. 32-bit and 64-bit JREs can co-exist on the same PC, so installing both is not an issue.

The second is that Base connects to Oracle via its ‘Oracle JDBC’ option, which is there from the get-go… but which won’t work because it doesn’t know how to load the necessary Java classes. The fix here is to make sure you know where your ojdbc6.jar file is (which contains the necessary classes): on my Windows laptop on which I’d previously installed a complete 11g Release 2 database, that file can be found in %ORACLE_HOME%jdbclib (which, in my case, is c:apphjrproduct11.2.0dbhome_1jdbclib). With that location in mind, you need to open any of the LibreOffice applications, go to Tools > Options > Java and click the Class Path button. Click the Add Archive button and navigate to the …jdbclib directory and point it at the ojdbc6.jar file. Click OK as appropriate to store the new setting.

At which point, you should be good to go.

If, as is quite likely, you don’t have a complete Oracle installation on your client PC, and you’re disinclined to install a big, fat client either, then you can simply download the necessary ojdbc file from Oracle and stick it somewhere convenient. Point your LibreOffice Java Class Path at it, wherever it might be, and you should be good to go. For example, this shows you I have no Oracle client or database installed on this particular PC:

…you’d see something like ‘Oracle – OraDB11g_home1′ in the menu if I’d installed an Oracle database or client. But I did download the ojdbc6 file to my desktop -and here’s the LibreOffice setting for that:

And having set that, it’s then trivial to point LibreOffice’s Base at my Oracle database:

After which, standard ‘Access-like’ stuff becomes possible. Here’s LibreOffice’s Base and the good ol’ EMP table:

In short, it’s all relatively painless -provided you to stick to a 32-bit client/JRE and you know how to point your LibreOffice installation to your ojdbc class library.

 

Fedora 15 Released

Fedora 15 has finally been released and is available in all the usual places, including here.

Naturally, Gladstone has been tested on it (it’s been working on the Alphas and Betas for a while now), and works just fine (with a slight pause when it first runs, because it has to download the lsb_release package before it can really get going).

There is a nasty linking error for 11g, of course, as previously described -and the workaround is exactly the same as before, too. Namely, Gladstone outputs a new shell script in the oracle user’s Desktop directory ahead of time, and this script can then be run when the Oracle Universal Installer linking error occurs, after which you can click the OUI’s ‘Retry’ button and all will be fine. (You run the second shell script as the oracle user, not as root).

The only real problem now, which I mentioned before too, is that in Gnome 3, the contents of the Desktop directory are not displayed on the, er, actual Desktop! So, you have to know that second shell script is there, because you won’t actually be able to see it as such.

If that’s as clear as mud, well… stick with Scientific Linux for an easier ride, I guess!

Also, I noticed an extremely long pause between the conclusion of the linking phase and the start of the Database Configuration Assistant that wasn’t there in the Alpha or Beta versions. The pause happened on three different physical servers, so although your mileage might vary, I think it’s definitely real. You have to be very, very patient therefore -but it does get there eventually.

Anyway, I also have prepared a Kickstart script for Fedora 15 (and a floppy image containing said script for those that don’t have a web server onto which the plain script can be dropped). If you use that script to perform the initial installation (it’s invoked in exactly the same way as for Scientific Linux 6, which I discussed here), you’ll end up with a substantially slimmed-down O/S (no Evolution mail client, for example; and 890-ish packages installed instead of the default 1200+) that’s still Oracle-friendly.

Oracle is for Newbies

I’m not sure where all these “Senior DBAs” with 17 years’ experience who think that “Oracle is f*cking complicated” and “not for newbies” as a consequence actually learnt their trade, but I’ll take a stab in the dark and suggest that it was, as newbies, by installing it, playing with it and, occasionally, stuffing up whilst doing so.

I suppose it’s true that those same senior DBAs will concede, eventually, that all they really mean is that “a week long course is not going to get someone up to speed”, but if their headline basically says “go away newbies, this stuff’s too complicated for you”, the damage has already been done, I think.

In any case, I think a week-long course might well get someone “up to speed”, though it’s obviously not going to make them the world’s leading Oracle DBA expert. For what it’s worth, I taught my first DBA course at Oracle Corporation six weeks after having first set eyes on the software and, though I say it myself, it wasn’t a bad course and the technical content was all that was required. It can be done, then; if not in one week, then half-a-dozen or so. Competence, at least, if not expertise.

It all depends on the person involved, really, doesn’t it? If you happen to be inquisitive, diligent and with a logical frame of mind, you’ll take to Oracle very well. If you’re intellectually lazy, casual in your study methods and find strict logic tricky, you’re not going to be very good at Oracle, no matter how long you study it. It also, I think, depends on the person doing the teaching: if their teaching style or materials leaves willing students bewildered, that’s the teacher’s (or her materials’) fault, not the student’s. But either way, the point is that “it depends”… and dismissal of entire swathes of people as mere ‘newbies’ doesn’t get us meaningfully closer to what’s really going on.

For the record, I don’t think database administration is particularly difficult -nor that Real Application Clusters are especially more difficult than single-instance Oracle to manage effectively. It’s an acquired skill, of course… but we all had to acquire it somewhere, sometime; and I don’t think it’s anything particular more skilful than the wizardry my local car mechanic performs every time he fixes my car. Anyone that tells you this stuff is so complicated that it’s for the eyes of Senior DBAs only and you might as well not bother is basically doing the old High Priest trick: only they are privy to the Great Mysteries and you are unworthy. Which is simply not true… and is otherwise known as “being patronising”.

New Scientific Gladstone (5.6)

My Gladstone pre-installation script for those intending to install the Oracle 10gR2 or 11gR2 RDBMS has been updated to take account of the fact that there is now a beta version of Scientific Linux 5.6 out.

I downloaded the O/S itself from here, and a modified version of Gladstone that can cope with the new O/S is available from the usual place.

It’s interesting to see how the cloners are handling their release schedules, what with Red Hat having just released version 6.1 of the “real” Enterprise O/S. Centos decided to concentrate on getting version 5.6 out of the door and worrying about getting a version 6 later; Scientific Linux did exactly the opposite. Their version 6 has been out quite a while whilst their 5.6 is, as this post has already mentioned, still in beta.

Where the Scientific Linux community gets my vote is that their 5.6 is obviously not far away (the beta I linked to above is incredibly stable), and their 6.0 has been a pleasure to use for months. Centos, meanwhile, managed to be late with their 5.6 release and still hasn’t got a 6.0 release planned for, as far as anyone can tell, any time soon.

From the outside, it looks like Centos as a project is really struggling -from internal politics? lack of developers? lack of other resources? I don’t know, and they’re not exactly communicative. But the net result from my perspective is that I’ve given up on Centos and will be using Scientific as my RHEL clone of choice from here on. I have mentioned this before, but now I’m getting serious about it: there will be no more Centos-compatible releases of Gladstone, even if they finally get version 6.0 out in the next couple of weeks.

How small can you get it?

My blog post title naturally refers to “the size of one’s Centos installations”, in case it wasn’t obvious!

Centos (and therefore Red Hat and its other clone cousins) installs a dirty great big Gnome system by default, complete with software such as OpenOffice.org, which I wouldn’t have said was exactly essential on a server! So how minimal can you get a Red Hat/Centos/etc installation, whilst nevertheless retaining a highly functional OS (so you have a file manager and an Internet browser so on, not just a bare command line?), that is additionally capable of running something like Oracle?

I’ve played around with this question quite a bit over the years, and here’s my not-so-secret recipe for svelte-ish Centos.

The first and most important thing to do is to make sure you customise your list of packages during the OS installation process itself… and de-select absolutely everything, including the Base group.

So, for starters, de-select “Desktop – Gnome” and select “Customize now” on this screen:

Once you click Next, you’ll be taken to this screen, where you work through the list on the left and de-select anything that’s been selected by default in the right-hand panel:

You’ll notice here that I’m de-selecting the Base package group, but there are about a half-dozen other groups that are selected by default lurking under the Applications and Servers groups, so un-check those, too.

Now you can go ahead and complete the OS install: it should only take around 3 minutes. When you reboot, you’ll have to log on at a command prompt (as root), at which point you can check how slim you’ve managed to get things:

That’s a 677MB installation of Centos 5.6 (64-bit), sitting on a suitably modest  1.9GB root partition – and that’s probably about as small as you’ll ever get a Red Hat-type OS to be (Ubuntu Server can be about half that size, by way of comparison). I’ll therefore call this the “minimal OS” and I’ll use it as the base onto which each of the options described in the rest of this blog piece will be installed.

A 677MB O/S is a good start, I suppose …but it’s not really usable, is it? Not unless you are a command-line loving guru, anyway. So how, minimally, to get a GUI-ish environment added to your 677MB starter OS? Well, there are a couple of options here.

Option 1 : Drastically Minimal

For truly minimal results, having logged on as root, type this command:

yum install xorg-x11-server-Xorg xorg-x11-xinit twm nano xterm

That should prompt you to perform a 34MB download/install, comprising about 40+ packages.

You may now need a quick edit of your default /etc/X11/xorg.conf file: mine had a section which mentioned driver=”vmware”. Because I hadn’t installed guest additions in my virtual machine at this point (because we’re being minimalist, right?!), that would not work. Change it to driver=”vesa”, however, and you’ll be good to go.

Now, you should be able to issue the command:

startx

…which will get you this:

This is the twm window manager, which is as basic (and horrible) as it’s possible to get. Left-click anywhere on the desktop and that sickly-green menu will appear, which contains ‘kill’ options to let you shut something down and an ‘xterm’ option to let you open up a terminal session. From the terminal, of course, everything is possible… indeed, I well recall using exactly this interface back in 2004 to install from scratch a two-node RAC in New York from a Sydney office. So, the functionality is certainly there, if you are able to grit your teeth hard enough. You’ll note from the screenshot that we’re now up to 865MB used on my root partition… still fairly svelte, for Red Hat-based distros, I think.

If you’re going to install Oracle on this box, you may well want to do it by using the Gladstone preinstallation script… and that’s fine. But you’ll first need to issue this command:

yum install redhat-lsb

…which adds another 14MB or so to the server.

Of course, you’ll then be needing an Internet browser to download Gladstone in the first place: the simplest approach, I think, is to do a

yum install firefox

… (though it costs another 75MB of download, including a lot of Gnome-related ‘litter’). You run the browser subsequently by opening an xterm and typing the command firefox, after which everything’s pretty standard fare.

You won’t be able to right-click the downloaded Gladstone shell script to alter its permissions, of course: old timers won’t be surprised to know, however, that a chmod 775 gladstone.sh at the command prompt will achieve the same thing.

Option 2 : Getting Fairly Maximal

If the delights of twm seem a bit too minimalist for you, there is a slim-ish alternative: Xfce. This is the desktop environment that Xubuntu uses (for one): it’s claimed to be lighter on resources than Gnome or KDE and therefore a lot faster than either. However, it uses a lot of the same libraries that Gnome uses, so I’m not really convinced that choosing it over bog-standard Gnome is hugely worthwhile: I mention it here only because it’s a nice way of showing what you can get on Centos without completely buying into Gnome. 

Assuming you’re prepared to give it a whirl, however, you’ll find that it’s very simple to install in your “minimal OS” install. Just issue the commands:

yum groupinstall "XFCE-4.4"
yum install xorg-x11-xinit xorg-x11-server-Xorg

That will trigger a somewhat less-than-svelte 123MB download, involving around 200+ packages. It takes a while, therefore, to get installed. It’s also true that I again needed to edit my /etc/X11/xorg.conf to change the driver from “vmware” to “vesa”; but once I’d done that, I simply had to type the command:

startxfce4

… to get this:

Now that’s a proper GUI, complete with the Thunar file manager and a truly graphical terminal. Any Gnome or KDE user would, I think, feel rapidly at home here. But look at the disk usage figures on the root partition in that screenshot: we’re now using 1.2GB of disk space, which is quite a jump from the 677MB starting-point. It’s a lovely GUI environment, therefore… but it’s not exactly “lightweight”, not in the extreme sense meant in this article, anyway.

Option 3: The Best of Both Worlds

Happily, there’s no reason why you have to install the entire XFCE desktop environment just to get some of its nicer tools (like the Thunar file manager). If you do the Option 1 route I’ve described above, there’s nothing to stop you simply typing:

yum install thunar

A mere 13MB later and you’ll be able to run the very GUI file manager by issuing the command thunar in an x terminal session. Stick an ampersand on it (i.e., type thunar &) to make it run in the background, freeing your xterm for other work in the foreground.

And that’s pretty much the way I like my Red Hat/Centos/Scientific Linux boxes to run when I use them as an Oracle database server: minimal install, add in a couple of X-related packages, add twm, add Firefox, Thunar and redhat-lsb … done! That all takes up a mere 1.1GB, but makes a perfect platform on which to run Gladstone and then install Oracle.

There are other non-Gnome, non-KDE window managers, of course. Fluxbox is nice; icewm is attractive; ratpoison is ghastly in a 1970s pre-GUI way… but very, very functional. Not all are easy to install on Centos, since they’re not always in the standard repositories, but they’re all do-able with various degrees of difficulty. But I’ll settle for what I’ve described here: it means I can manage the servers when I have to, but know otherwise that nothing’s getting between my databases and my CPU cycles unnecessarily!