Good News/Bad News

Good News: Scientific Linux 6.1 is out in (very stable) Beta. I get mine here.

Bad News: Centos 6.0 still hasn’t been released.

Good News: Scientific Linux 6.1 has a network install boot ISO (as SL 6.0 did, but SL 5.6 didn’t)

Bad News: the Scientific Linux network install boot ISO is over 200MB in size -so you almost might as well install from the original CDs or DVDs! By way of comparison, the Centos 5.6 netinstall boot ISO was only 10MB in size. Maybe not so important when $4 USB drives come in 2GB sizes and up, but annoying nonetheless. I notice Fedora 15′s net install ISO is similarly huge… progress, I guess!

Even Badder News: you can’t use the Centos 5.6 netinstall boot ISO to kick off a Scientific Linux 6.1 install. (At least, I’ve not managed it yet!)

Good News: Gladstone has been updated to work with the 6.1 version of Scientific Linux.

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.

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!

Updated Gladstone for Centos users

I missed the precise release date of Centos 5.6 and I’ve recently spent a fortnight touring Tasmania (thoroughly recommended if you get the chance!), so I’m even more behind than usual.

It’s not a particularly exciting release -hardly anything has really changed much compared with version 5.5 (as the numbering might lead you to expect, I suppose). But my original Gladstone Oracle Preinstallation script won’t run on it because it checks the OS self-identification strings, which have changed.

Happily, however, I’ve finally gotten around to revising Gladstone so he takes account of the new release. Both 10gR2 and 11gR2 install without drama once Gladstone’s done his stuff.

Additionally, if you click on that link, you’ll note that it’s pointing to a Google Docs repository… my original choice of file host turned out to have a penchant for pop-ups, pop-unders, adverts galore and other faintly unsavoury web practices.

(Update August 1st 2011: all downloadable files are now stored on a Dropbox public repository. Google Docs suddenly stopped being shareable in quite the way I needed it to be.)

Gladstone – An Oracle installation script

I only have twenty-nine 150GB-plus databases to manage these days, and most of those are running on servers with uptimes in excess of a year (it would have been longer, but I only got them to switch to Linux about 13 months ago). I don’t, therefore, tend to do a lot of Oracle installations these days -and my automated pre-installation configuration shell script which used to make the job fairly easy has therefore languished of late.

That automated script initially went by the name of ‘Doris‘ (for “Dizwell/Oracle Reliable Installation Script”), a name which appears to have stuck in some quarters.

About a year after Doris appeared, I re-wrote it (and updated it) to use Gnome GUI pop-ups and other interactive elements and accordingly re-named it ‘GOAL‘ (for “Graphical Oracle All-in-one Loader”).

Now, I’ve re-written the script one more time. Call it Doris 2 or GOAL 2, if you like. Me? I’m calling it Gladstone for no reason whatsoever except that half of Diznix’s name comes from Disraeli, so it’s only fair to remember the other fella from time to time!

I thought it might be worth mentioning a couple of Gladstone’s key design features here:

Gladstone deals with modern distros and has been run successfully on:

Note that if a distro supplies a “Live CD” and a much larger DVD installation ISO, it is the DVD ISO version that will work. The Live CD version will (probably) be missing quite a lot of files and libraries that Gladstone expects to be there, because they are there when a full-blown DVD ISO is used for the Operating System install. Specifically, do not use the Live CD versions of Fedora, Centos or Scientific Linux and expect Gladstone to work. Similarly, do not use the Server Edition of Ubuntu… Gladstone’s been designed for, and tested on, the Desktop Edition only.

Gladstone only prepares your distro for the installation of 10g Release 2 or 11g Release 2… code to do an 11g Release 1 installation, for example, has been dropped. The reasoning there is that those are the only two still-supported Oracle releases (though obviously support is not provided by Oracle at all if you’re doing home installations onto the likes of Debian anyway!). Putting it another way: you’d be certifiably insane (IMNHO) to consider installing any other Oracle version these days, so I’m not going to waste time coding for something that isn’t worth doing!

For all tested distros, both Oracle releases eventually install successfully, though nearly all 10g installations run into the “Error in invoking target ‘collector’ of makefile ‘/srv/oracle/product/10.2/db_1/sysman/lib/ins_emdb.mk’” error during the Oracle installation linking phase. This is a non-fatal error that can be ignored without apparent harm to any substantial bit of Oracle RDBMS functionality.

Nearly all 11g installations are flawless on all tested distros. Two distros (Fedora and Linux Mint Debian Edition) require an additional workaround for which a shell script is created by Gladstone. Run that additional script when you get linking errors during the main Oracle installation and you’ll be able to click ‘Retry’ and continue to a successful conclusion.

Gladstone was written with the idea of allowing myself to become the oracle user, rather than merely creating a new user as is traditional. By default, you are still prompted to supply a new account name (and if you just press enter, you get a new one called ‘oracle’), but if you type your own username in (or that of any existing user, come to that), that account will be re-configured to make it suitable for Oracle installation ownership. This is definitely a ‘non-standard’ way of doing things, but suits me and my desktop (and laptop) PCs just fine. Your mileage might well vary, of course, and all the usual disclaimers apply!

Some people never liked Doris or GOAL… they thought it wasn’t very original and would break Oracle support if done on a production box. Well, Gladstone isn’t very original either, since what it does is only what’s documented as needing to be done prior to an Oracle installation (though because you’re not having to do all the typing, it’s likely to get it more correct than you might manage on your own -which is the whole point, of course!) And the issue of support is moot, anyway -because the thing simply can’t be run (as it stands and by design) on a distro for which Oracle offers any support!

Anyway, take it or leave it. If you take it and find that you encounter errors or issues, let me know here and I’ll see what can be done, if anything, to fix it for others. I’ll have detailed notes for each supported distro in due course.

Centos DVD/CD Permission Denied Errors

You build yourself a virtual (or real, come to that) Centos server, on which you plan to install Oracle. You have prepared your Oracle DVD ISO in the manner I described in another post here. You insert that DVD (or get the virtual machine manger to present the ISO as though a physical DVD had been inserted) and Centos helpfully auto-mounts it. You become the oracle user and invoke the runInstaller script… and you get told

-bash: /media/CDROM/runInstaller: /bin/sh: bad interpreter: Permission denied

What’s wrong? Well, Centos (like a lot of distros before it) has ‘broken’ auto-mount by ensuring that “noexec” permissions are set for auto-mounted CDs and DVDs. The idea is that ordinary users can’t run executables from removable media -and, in most circumstances, that might be a sensible security measure to have in place. But not in this case! In this case, the oracle user (who counts, in this context, as decidedly ‘ordinary’!) must be able to execute that runInstaller script. How then to allow that? Easy:

umount /media/CDROM
mount -o loop /dev/hdc /media

Those two commands (both issued as root) first dismount the automounted CD or DVD and then re-mount it as a loop device. Manually mounting the drive causes the “exec” permission to be set… and thereafter, the oracle user will be able to run the installation script without a problem.

Of course, the specifics of those commands will need to be changed to suit your local circumstances. The DVD drive might not be /dev/hdc, for example, and you might want to mount the contents of your ISO image somewhere other than /media. But hopefully, you get the idea.

Incidentally: if you don’t know what device name identifies your DVD drive, try mounting it after the drive has already auto-mounted. For example, when I ‘insert’ my ISO image, it gets mounted as /media/CDROM. So if I then try, as root, to mount /media/CDROM again, I get told:

mount: /dev/hdc already mounted on /media/CDROM

…and right at the beginning of that error message, there’s your proper device identifier.