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 "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
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.