Kickstart and IIS

I posted some time ago about how you can store a Red Hat/Centos/Scientific Linux kickstart file and use it to perform repeatable, minimal Operating System installs which are then suitable to be used as the foundation for an Oracle 10g or 11g database installation.

So far so good -but what if, instead of Apache, your web server happens to be Microsoft’s own IIS (Internet Information Services). That is, after all, supplied as an installable option on most versions of Vista and Windows 7, so a lot of desktop users have ‘intrinsic ability’ to run IIS, even though they might not notice it. Personally, too, I have a Windows 2008 R2 server sitting in the corner of the study. It mostly runs Hyper-V, but one of its other roles is to run IIS. So the question is then: can IIS serve up kickstart configuration files the same way as Apache can?

To which this is the initial answer:

So that’s a ‘no’, then!

The problem here is simply that “.cfg” (which is the extension I use on my rh5 and rh6 kickstart files) is not, by default, recognised as a proper sort of thing for IIS to be handling. But this is fixable with a nasty-looking command in a command prompt, like so:

C:\Windows\System32\inetsrv>appcmd set config /section:staticContent /+[fileExtension='.cfg',mimeType='text/plain']
Applied configuration changes to section "system.webServer/staticContent" for 

As you can see, I’ve cd’d to the \windows\system32\inetsrv directory and used the appcmd utility to add details of a new ‘.cfg’ MIME type. I’m declaring it to be a document which contains merely plain text, so IIS won’t think it needs to launch any helper programs to let you read it. The “+” in that lot tells you I’m adding a new MIME type record; if you ever wanted to change your mind and remove a reference to this MIME type, you’d simply issue the exact same command but with a “-” where the “+” currently is.

Having added that new MIME type, I didn’t need to re-start the IIS service. I simply re-loaded the above page in my browser …and got this:

And if you can read the file in your browser, then it’s a certainty that the RHEL/Centos/SL installation process will be able to read it and use it, too.

VirtualBox Boot-time BIOS Error

A slightly annoying error message always appears whenever you boot Ubuntu 11.04 Server as a guest O/S in VirtualBox:

piix4_smbus 0000.00.07.0: SMBus base address uninitialized - upgrade bios or use force_addr=0xaddr

It doesn’t actually do any harm to the guest (as far as I can tell), so one could perfectly well leave it alone. But it’s possible to get rid of it altogether simply by issuing three commands and editing one configuration file. First:

sudo nano /etc/modprobe.d/blacklist.conf

Add the text

blacklist i2c_piix4

…to the end of the file. Finally, issue the commands:

sudo update-initramfs -u -k all
sudo reboot

When the machine comes back up after that last reboot, you won’t see the error message. What this is doing is simply preventing an attempt to load the i2c_piix4 kernel module. VirtualBox doesn’t emulate the hardware for which this module is actually needed, but Ubuntu doesn’t know that and tries to load it anyway. Blacklisting the module prevents Ubuntu doing that and thus makes the error disappear.

LibreOffice and 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:\app\hjr\product\11.2.0\dbhome_1\jdbc\lib). 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 …jdbc\lib 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.

A minor adjustment

I’ve made a minor adjustment to the RHEL5, RHEL6 and Fedora 15 Kickstart scripts I uploaded recently -and the new versions are downloadable from the old links automatically. The only change is that the scripts no longer try and set the root password to “dizwell”. In fact, they don’t try and set it to anything at all… which therefore means the Anaconda script prompts you to supply your own. It seemed that having “dizwell” by default was annoying some people -and I sympathise!