Posts Tagged ‘installation’

OpenSuse 11.2, Oracle and GOAL

Tuesday, December 8th, 2009

OpenSuse got a bit of a facelift a few weeks ago and is now available in version 11.2. The installer looks quite gorgeous (just a shame you don’t tend to install distros that many times, I guess, so you’ll only appreciate the emerald green stuff once or twice!). I was surprised to discover that KDE is selected as the default desktop… Suse’s been Gnome-preferred so long, and KDE 4 has been so beta for so long, it seems a bit of a brave move to me. I am not, in any case, very used to KDE (I barely used 3.5 back in the day; 4.3 seems just very, very peculiar to me, though I guess I could acquire a liking for it eventually), so I found things a bit heavy-going, to be honest (not being able to drag-and-drop a file to the desktop took a bit of getting used to, for example!). And it’s all rather a lot of graphical overkill for an Oracle server, I suppose, in any case!

Anyway, my GOAL instructions say to perform a strictly default OS installation, so just for once I stuck with the KDE suggestion… and watched as GOAL completely failed to run at all! The reason is simple: GOAL depends on the zenity package to do its graphical stuff, and zenity is not installed as part of the default 11.2 KDE installation. So, I had to do a zypper -n in zenity as root, before anything else. Once that was done, though, GOAL did its thing and 64-bit 11g release 2 installed without a hitch (the usual pile of ‘these packages need to be installed’ messages can simply be dismissed with a wave of the ‘Ignore All’ option, of course). The GOAL download page has been amended slightly to reflect the fact that the new distro version has been tested and works fine.

Update: If you select the Gnome desktop option during the Opensue 11.2 install, zenity *is* included by default, so no extra, manual installation steps are required before GOAL can be run properly.

Fedora 12, Oracle and GOAL

Tuesday, December 8th, 2009

Fedora 12 was released about three weeks or so ago. It’s taken me that long to verify that my GOAL prerequisite installation script works correctly with the new distro. Happily, it does (I needed to make one small adjustment to let the script allow the use of the higher distro version number), so the GOAL download page has been modified accordingly.

I must say, the new Fedora is the first one I’ve ever seen that doesn’t immediately make me want to vomit: the desktop graphics are subdued and subtle, eschewing the balloons, DNA helices and God knows what other nonsense they’ve gone in for in the past. I still wouldn’t pick it as my first distro, however -from the Oracle perspective, for example, it’s the only distro that doesn’t give you the option to switch off SELinux and the firewall as part of the installation process. You have to remember to do that after the installation completes and you’ve performed your first log-in -which is precisely the time you are least likely to remember such niggly details!

Still, Fedora 12 and 64-bit 11g Release 2 work perfectly together, with a completely flawless installation -apart from a list of supposedly missing packages (which aren’t missing at all) which can be dismissed with a click of the ‘Ignore All’ checkbox!

Relenting

Sunday, September 13th, 2009

OK, I give in. The flood of emails has persuaded me (I call 28 “a flood”, anyway). So, if you go to the GOAL home page, you’ll find that there is now a GOAL script for 64-bit Fedora 11. Usual rules apply: default installation of the OS, except that you must choose a static IP address, switch off SELinux and disable the firewall (standard Oracle requirements, nothing to do with GOAL per se).

  • The 10g Release 2 installation results in an ins_emdb.mk linking error, but it’s ignorable and everything seems to work OK afterwards.
  • The 11g Release 1 prerequisites check complains that compat-libstdc++-33.i386 doesn’t exist, but it’s user-verifiable (that is, you can ignore it) because GOAL has already installed compat-libstdc++-33.i586. There are no linking errors.
  • The 11g Release 2 prerequisite check complains about various missing packages… but none of them are actually missing, so an ‘Ignore All’ is all that’s required to deal with that. There are no linking errors.

One unique problem I had with Fedora is that it seems to be very aggressive in checking for updates in the background, regardless of what’s happening in the foreground! Thus, having launched GOAL and gotten it to start downloading the various package prerequisites, I was suddenly confronted with a pile of these sorts of errors:

Another app is currently holding the yum lock; waiting for it to exit...
 The other application is: PackageKit
 Memory : 152 M RSS (397 MB VSZ)
 Started: Sun Sep 13 11:07:17 2009 - 00:13 ago
 State  : Sleeping, pid: 4852

GOAL can’t download the right software packages if Fedora’s own PackageKit application is busy in the background checking to see what system updates and so on are available. One slow fix to this problem is to wait until everything’s settled down: let PackageKit do it’s thing and be patient before even thinking about running GOAL. But the fix I deployed was, perhaps, a little ‘aggressive’ in its own way: open another terminal, become root, and then kill -9 4852 (or whatever pid is listed in the last line of that error message). Messy, but effective. Another reason I don’t like Fedora, though.

And therefore this is definitely it: no more distros! Ever!! Probably.

Incidentally, it is quite OK to email me, and I’m a little surprised if anyone ever thought differently. That I don’t post to forums, other people’s blogs or give access to my old technical advice articles is a result of the behaviour of a tiny handful of people. My problems with those few individuals (unfortunately, some of the loudest in the Oracle community, though not often the most technically able) don’t mean I’ve become a hermit or blown up my email server. So long as you’re not one of the problem ones, emailing me is just fine… though I don’t do technical support by email!

64-bit Oracle 11g R2 Installations with Goal

Thursday, September 3rd, 2009

Thanks to a nasty bout of ‘flu-like symptoms, I have been able to experiment with Goal (my graphical oracle all-in-one loader script) and the new 11g Release 2 rather sooner than I was expecting to be able to. I am running a temperature and feeling pretty bloody awful, so apologies if this is not quite as polished and coherent as it should be!

Now, you will remember to start with that Goal seeks to do just one thing: install 64-bit Oracle onto 64-bit Red Hat 5 (or Centos 5 or Oracle Enterprise Linux 5 or any exactly-equivalent recompilation of Red Hat source code). Just so we set expectations suitably low!

The good news is that a new version of Goal is now available which allows for 10g Release 2, 11g Release 1 and 11g Release 2 installations and which works almost perfectly (I’ll come to explain that “almost” in just a moment!) The kernel parameters required for an 11g Release 2 installation have changed significantly since 11g Release 1 days (so when other sites simply re-badge their 11gR1 articles without changing the actual content, be warned!), so that’s why Goal has to allow for two different types of 11g installation: the settings for 11gR1 would be inadequate for 11gR2 and cause the installer to stall you on a page warning of this fact. Anyway, I’ve gone through the official documentation and made sure that Goal sets the recommended values for all the assorted kernel parameters, old and new.

I have, however, encountered what is perhaps 11gR2’s first bug! The documentation (at Section 4.3) clearly says that for Red Hat 5 (and hence Centos 5, which is what I was using), one of the required prerequisite packages is ksh-20060214. I don’t have a problem with that: Goal does actually download and install the package ksh, which is close enough. The bug, however, is that the installer will insist that you don’t have the package pdksh installed. Which is true enough: it isn’t installed because the package doesn’t actually exist in the RH5 repositories! Pdksh is a published requirement for Red Hat 4, however, not Red Hat 5… so it would seem that the installer has been written to deal with both RH4 and RH5 installations with the unfortunate consequence that it demands the installation on RH5 of a package which actually should be demanded of an installation on RH4.

The long and the short of this is that it seems impossible to go through Oracle’s 11gR2 installer wizard without being told at one point that you have failed to install a required package… even though it doesn’t exist for RH5 and even though the documentation itself makes it clear it is not a required package on RH5 at all! It would be nice to have a 100% flawless installation wizard, but this “issue” prevents that from happening -and there’s nothing Goal can do about it. I believe that if you are using “proper” distros (such a true Red Hat Enterprise Server 5 or Oracle Enterprise Linux 5), rather than cheap clones such as Centos, this problem goes away. I have to do some more testing to determine that, though.

Anyway, in the meantime, it’s possible to simply click the ‘Ignore All’ checkbox at this point, and the installation will proceed despite the “missing” package.

And it will proceed smoothly, without errors or alerts about ‘error in invoking target install of makefile such-and-such’. The whole thing succeeds completely, in other words, and without fuss or bother.

Finally!

Wednesday, September 2nd, 2009

Hooray. At last, 11g Release 2 is available for download (and, interestingly enough, for Linux first… and currently only!). Go here if you want it.

It’s been a long time between releases. Much longer than, for example, between 9iR1 and 9iR2 or between 10gR1 and 10gR2. Or maybe it just feels that way! Anyway, 11gR1 was a bit of a dog in my not-so-humble opinion: polished, certainly, but with a curious lot of bugs, too. I’ve certainly kept work at 10.2.0.4 for quite a while, simply because I wouldn’t touch 11g with a long bargepole. But now that release 2 is out, it may be worth re-checking the state of play. Experiments begin at once, of course!!

The first thing that will trip up the unwary is that 11gR2 comes in two parts. That is, there are two zip files to download, each about 1GB big. You need both. What’s more, you need to unzip both into the one database directory before you can use the resulting uncompressed file structure as an installation medium. If you’re using my instructions on how to create ISO images from OTN downloads, for example, you’ll need to do the following:

  • Download both zip files to your desktop
  • Open a command prompt and unzip the linux_11gR2_database_1of2.zip file. That will create a database directory.
  • Now unzip the linux_11gR2_database_2of2.zip file. The contents of this file will be extracted into the already-existing database directory.
  • Now you can create your ISO image from the Desktop/database directory, using the command I documented before:
genisoimage -o Desktop/ora11gx64.iso -R -J -hfs Desktop/database

After that’s all done, you’ll be able to burn the ISO to disk as per normal… and then you’ll want to install it onto something!

As far as that goes, I am happy to report that Doris works fine with the new release, provided you’re running on Centos/Redhat/OEL (that is, I haven’t tested anything else). She gets invoked as per normal (i.e., as root from a login shell (so su – root to start with) and then something like ./home/hjr/Desktop/doris1.1g.sh redhat5 11g). The installer sports a radically new look:

11gr2install

…and she’ll complain that various parameters aren’t set correctly and that assorted packages aren’t installed. But if you select the ‘Ignore All’ check box at that point, the installation will nevertheless complete successfully. The path created for the installation by Doris is wrong, of course (11.1.0, rather than -say- 11.2.0), but don’t let that little detail stop you either. Additionally, you’ll get an ‘error in invoking target install of  makefile … ins_ctx.mk’. You can ignore that, too (and I’ll work out what’s causing it and write a proper fix before too long). The point is, you end up with a fully-functional system-plus-database in less time than it takes to make a wallaby drink a cup of coffee.

I haven’t tested Goal yet, because I can’t currently access a 64-bit Centos/Red Hat machine… but I’ll obviously be checking ASAP (and posting back as required!)

Note that there will be an extremely long pause, with nothing very obviously happening, at the point where the installer hits the ‘Oracle Database configuration’ installation item. Just be very, very patient and you’ll eventually be rewarded with the usual sort of ‘create database’ progress bar. But it does take an awfully long time to appear!

64-bit Oracle on 64-bit Ubuntu

Monday, July 27th, 2009

I haven’t found any particularly good instructions on the Internet explaining how to do a 10g or 11g installation onto 64-bit Ubuntu (32-bit installations are a piece of cake… and even my own doris script has done those without trouble for a long time). Indeed, for a long time, I considered any such installation practically impossible -and used virtual Centos machines instead (where the 64-bit Oracle installation works flawlessly).

But times change: I use 64-bit Ubuntu as my OS at work and at home, and there are times when I don’t want to have to fire up a virtual machine just so I can do some Oracle experimentation. I’ve therefore been forced to work out how the Oracle installation can be made to succeed on that platform. I should say upfront that it’s still not a perfect installation: no matter what I do, I can’t get rid of an error in invoking target ‘collector’ of makefile ‘ins_emdb.mk’ message during the linking phase of the installation -but it is, at least, the only such error and it doesn’t seem to make any difference to the overall ability of the Oracle software to create, run and manage databases.

Here’s how I did it (and these instructions work for both 10g and 11g, with minor differences noted in the appropriate places).

Step 1: Perform a completely default Ubuntu 9.04 64-bit Desktop installation.

Step 2: Change the PC to use a static IP address rather than a DHCP-assigned one. That’s done by selecting System -> Preferences -> Network Connections. Select your network connection (for example, mine was under the “Wired” tab, called ‘Auto eth0′) and click Edit. Select the IPv4 Settings tab. Change the Method to Manual (from the default “Automatic DHCP”). Click Add and then specify an appropriate value for your Address (e.g., 192.168.0.100), Netmask (e.g., 255.255.255.0) and Gateway (e.g., 192.168.0.1). The Gateway’s especially important because if your Ubuntu machine cannot connect to the Internet, you won’t be able to download the necessary software prerequisites. If your Ubuntu machine is connected directly to the Internet, then of course you leave the Gateway blank. Otherwise, it’s the IP address of your router (or its equivalent, depending on your physical network setup). Also set up a suitable value for your DNS Server and Search Domains. Your DNS Server will either be an internal one if you’ve got one, or the one your ISP provides you with. The Search Domains entry should be the name of your internal network (such as ‘dizwell.home’) if you’re using an internal DNS Server: it’s basically the domain name for which the DNS Server you’ve just specified is authorative. If you don’t have an internal DNS Server, your Search Domains entry can be set to the domain name of your ISP (siuch as ‘telstra.com’).

Once that’s done, make your /etc/hosts file reference your static IP address by machine name. That is, issue the command

sudo gedit /etc/hosts

…and change the top part of the file from this:

127.0.0.1    localhost
127.0.1.1    heracles

…to this…

127.0.0.1    localhost
127.0.1.1    heracles
192.168.0.100 heracles

That is, my Ubuntu machine was created with a hostname of ‘heracles’. By default, that name is only mapped to a loopback address of 127.0.1.1. I’ve just set my IP address to be a static one of 192.168.0.100, so now I’m saying that the new IP address should also map back to my hostname. You obviously change the specific numbers and names used in the file to suit your own situation.

Step 3: Install the necessary software prerequisites:

sudo aptitude update
sudo aptitude install gcc libaio1 lesstif2 lesstif2-dev
     make libc6 libc6-i386 libc6-dev-i386 libstdc++5
     lib32stdc++6 lib32z1 ia32-libs sysstat rlwrap
     unixodbc unixodbc-dev elfutils rpm

(That should all be on one line, of course).

Step 4: Append appropriate entries to the following configuration files…

/etc/sysctl.conf

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
vm.swappiness=5

/etc/security/limits.conf

*       soft    nproc    2047
*       hard    nproc   16384
*       soft    nofile   1024
*       hard    nofile  65536

(Make sure to add those lines before the “# End of file” one).

/etc/pam.d/login

session    required     pam_limits.so

Step 5: Create the Oracle User and all appropriate installation directories

sudo sysctl -p
sudo groupadd nobody
sudo groupadd oinstall
sudo groupadd dba
sudo useradd -s /bin/bash -g oinstall -G dba oracle -m
sudo passwd oracle

(…and supply a password for the oracle user when prompted)

sudo mkdir -p /u01/app/oracle/product/10.2.0/db_1
sudo chown -R oracle:oinstall /u01/app
sudo chmod -R 775 /u01/app

Step 6: Create necessary symbolic links

sudo ln -s /usr/bin/awk /bin/awk
sudo ln -s /usr/bin/rpm /bin/rpm
sudo ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so
sudo ln -s /usr/bin/basename /bin/basename

Step 7: Set appropriate environment variables for the oracle user

sudo gedit /home/oracle/.bashrc

…and then past these lines onto the end of that file:

ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
ORACLE_SID=ubu102
export ORACLE_BASE ORACLE_HOME ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH:.
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export LD_LIBRARY_PATH CLASSPATH
alias sqlplus='rlwrap sqlplus'

Note that the above lines assume that you will call your starter database ‘ubu102′. If you want to call it something else, set the ORACLE_SID environment variable appropriately now. Also note that the above content assumes you are installing 10g (it has a ‘10.2.0′ bit in the ORACLE_HOME setting). If you’re installing 11g, that should be replaced with ‘11.1.0′.

Step 8: Become the Oracle User and commence the installation

sudo xhost +
su - oracle
export DISPLAY=":0.0"
/media/cdrom/runInstaller -ignoreSysPrereqs

Note that last command assumes you have created a proper installation CD from the 10gR2 cpio/zip file download. I describe how to do that here.

For the most part, you then just keep clicking [Next] through the Oracle Universal Installer’s screens. You’ll need to change the proposed database name to match what you typed for the ORACLE_SID in Step 7 (in my case, therefore, I changed the proposed ‘orcl’ to ‘ubu102′). You will, of course, fail all of the system tests that the OUI might try to do, but you can click through those regardless and confirm that you know what you’re doing: the thing will work correctly anyway.

As I mentioned at the beginning, you will see an error during the linking phase (relating to ims_emdb.mk) -at least, you are very likely to! I’ve had a couple of installations where no errors at all were raised, but others (following the same instructions, mind!) did. Go figure! If you happen to be unlucky enough to get a linking error, simply click ‘Continue’ when it appears, and the installation should proceed to completion without further incident, correctly creating appropriate networking configurations and a starter database. I wouldn’t call that a particularly robust installation -and there’s no way I’d want to run anything even vaguely of ‘production quality’ on the result! But it does at least work -to the point where I’m running a useful test database on my Ubuntu installation at work, including a very large and demanding Oracle Text index, without any apparent problems.

Goal!

Saturday, July 4th, 2009

I’ve been quite proud of Doris, the ‘Dizwell-Oracle Installation Script’: she was my first attempt at a complex Bash script that would do something useful (namely, help automate the process of preparing a Linux box to be able to run Oracle database software). She worked quite well, too (which is probably the main thing!): downloading the correct software dependencies, creating database auto-start scripts, setting kernel parameters properly and setting all the right environment variables for an appropriate user, too.

Some people carped, of course, that Doris ‘hid’ all the complexities of installing Oracle, which meant you weren’t learning anything. Such people have obviously never quite mastered the ability to read, since merely reading the script would teach you everything you ever needed to know about how to install Oracle on Linux! Additionally, some might argue (I would, anyway) that you tend to install Oracle just a few times but use it hundreds of thousands of times… so maybe learning how to use it is a tad more important than learning how to install it? Just a thought.

Anyway, I know that Doris has helped hundreds of people, so I’d say on balance, she’s been a good thing to have written. Trouble is, she’s a bugger to maintain!

For a start, she was over-ambitious: she attempted to automate 10g and 11g installations on Redhat 4, Redhat 5, Suse10, Suse 11, Mandriva 2008, Ubuntu 7, Ubuntu 8, Fedora 8, Fedora 9 and Fedora 10, Debian 4.0… and even PCLinuxOS. In addition, she coped with both the 32-bit and 64-bit versions of at least three of those distros. Naturally, and inevitably, all of those options made coding her in the first place a complex proposition -but keeping her up-to-date as new distros arrived was a nightmare. By now, she’s getting a bit long in the tooth: no explicit support for Ubuntu 9 or Debian 5, for example (though I happen to know she works on those distros if you simply pretend they’re Ubuntu 8.10 or Debian 4.0 respectively, since my own installations on to both those platforms relied on me doing just that).

Well, all of the above is a long-winded way of saying that Doris is retiring: I’m not going to maintain her or bug-fix her any more.

Instead, I’m going to unveil her replacement: Goal -the Graphical Oracle All-in-one Loader. Goal is different from Doris in two main respects. First, it uses a graphical interface, because a lot of Linux first-timers seem to be a bit nervous around the command line! Second, it focuses on just one distro and one architecture. Out goes PCLinuxOS, for example, and Mandriva, Suse, Fedora, Ubuntu and the rest. Only support for Redhat remains (and its cousins, such as Oracle Enterprise Linux and Centos), largely because that’s the only distro (in my experience) that provides a completely solid, 100% reliable platform on which to run Oracle.

Also gone is the support for 32-bit architectures. I use 64-bit Linux myself and nearly all CPUs produced in the past 4 years are capable of running a 64-bit OS. Meanwhile, anyone thinking of doing any serious database work needs to switch to a 64-bit platform pronto, because running an instance in less than 4GB of RAM is, these days, a mug’s game (and don’t even think of talking to me about PAE!).

In short, Goal will do 64-bit 10g and 11g installations on Redhat 5 (or Centos 5 or OEL 5) only, and I have zero plans to add any other capabilities to her, ever. (Note that I will modify Goal whenever necessary to accommodate new Oracle versions. So, she’s already been amended to allow 10g, 11g Release 1 and 11g Release 2 installations, for example).

Doris will remain downloadable for the foreseeable future, since she clearly does things which Goal isn’t going to do. But she’ll just get quietly older and increasingly irrelevant! Meanwhile, if you want to run 64-bit Oracle on a ‘proper’ server-oriented distro that Oracle has been especially tailored to run on (i.e., basically, Redhat), then you should switch to Goal.

Goal is available for download from here.

You simply download the file onto (say) your desktop. You then right-click the file, select Properties -> Permissions and then set the Allow executing file as program checkbox to ‘on’. Click Close to shut the properties page down -and then simply double-click the file to launch it. When prompted, you select the ‘run in a terminal’ option. You don’t have to become root (though you’ll be prompted for the root password) and you don’t need to run anything manually from the terminal. Follow the prompts and Goal will configure your server appropriately. Once that’s done, you will need to perform the Oracle installation itself -and that will require you to open a terminal and become the oracle user… but there’s nothing I can do to work around that particular requirement, of course!

Goal does everything required for a successful Oracle installation: creating the right user and groups; setting the kernel parameters to appropriate values; downloading all software prerequisites; creating scripts required to automate the startup of databases at a bounce. All you have to do is sit back and let Goal do its thing! A directory called /osource is also created for you, if you require it: it’s where you’d download or copy the Oracle software to if you were going to perform the Oracle installation’off disk’ (that is, you’d invoke the Oracle Installer with the command /osource/database/runInstaller or something similar, depending on the precise directory structure). If you prefer to install straight off a DVD/CD (or a DVD/CD ISO mounted as a loop device so that it looks like a real DVD or CD), then the /osource directory is redundant and you can simply delete it (as root).

Once the Oracle software installation itself is complete, you will need to edit the /etc/oratab file (as root) to get a database to actually re-start each time the server boots up. The edit involves changing the final ‘N’ of the script into a ‘Y’. You also have to edit (as the oracle user) the $ORACLE_HOME/bin/dbstart script so that the ORACLE_HOME_LISTNER variable is set to the full path of the $ORACLE_HOME, instead of the $1 it’s set to in 11g and the bizarre /ade/vikrkuma_new/oracle it’s set to in 10g. Both edits take place around lines 78 to 80, regardless of the version of Oracle involved.

Apart from those edits of two configuration files, however, Goal will have done everything else for you.

Centos DVD/CD Permission Denied Errors

Saturday, July 4th, 2009

You build yourself a virtual (or real, come to that) Centos 5.3 server, on which you plan to install Oracle. You have prepared your Oracle DVD ISO in the manner I described in the last 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.

Oracle DVD Creation on Linux

Thursday, July 2nd, 2009

If you get your free OTN copies of Oracle 11g from here, then you’ll be the proud owner of a zip file called something like linux.x64_11gR1_database.zip. That’s perfectly fine if you don’t mind unzipping the files on your hard disk and installing Oracle from there. But if I create a virtual machine to run Oracle, I would usually prefer to be able to install Oracle from a DVD (or, at least, a DVD image in the form of an ISO), because that way I needn’t consume nearly 4GB of virtual disk space by copying the zip file to it and then unpacking it. So the question then arises, how do you turn that downloaded zip file into a functional DVD image?

Well, one thing you can’t do is use Brasero (the default Ubuntu/Gnome CD and DVD creation tool) to simply create a disk image of the extracted zip file! That’s because Oracle uses a lot of nested directories, and Brasero doesn’t let you configure the necessary extensions to the ISO standard to allow all those directories to be read properly from the finished DVD image. You’ll just get execution errors the minute you try using a DVD image that’s been constructed that way.

I am sure various GUI tools could be employed to get around this problem (and if I was a KDE user, I know that K3B can do the job with ease), but the simplest thing is for confirmed Gnome users is to issue the following command in a terminal window:

genisoimage -o Desktop/ora11gx64.iso -R -J -hfs Desktop/database

What all that means is that you’re using the program genisoimage (which should be installed by default in Ubuntu 9.04: if not, use aptitude or the Synaptic Package Manager to install it) to output a file called (in my case) ora11gx64.iso in my home’s Desktop directory. The image should use the Rockridge and Joilet extensions (which is what lets those multiple nested sub-directories work OK). And the source of the entire DVD image is to be the Desktop/database directory (which will only exist, of course, if I’ve already extracted my downloaded zip file on my desktop).

The output from that lot takes just a few moments to create, but it will be usable in an Oracle installation. You can use the ISO output file directly if installing Oracle in a virtual machine; or you can use Brasero to burn it to a physical DVD.

Update: The 11g Release 2 OTN downloads come in two parts. That is, there are two separate zip files, each about 1GB in size. Those need to be unzipped into a single directory (called database) before the genisoimage command can be pointed at it. So, for that release of Oracle, you have to do the following:

  • Download both zip files to your desktop
  • Open a command prompt and unzip the linux_11gR2_database_1of2.zip file. That will create a database directory.
  • Now unzip the linux_11gR2_database_2of2.zip file. The contents of this file will be extracted and merged into the already-existing database directory.
  • Now you can create your ISO image from the Desktop/database directory, using the command shown above.

Perfect Ubuntu (Part 1: Installation and Graphical Bling)

Saturday, June 20th, 2009

(Well, perfect for me, anyway!)

I seem to be addicted to installing operating systems, to the point where there are times when I don’t think I actually do anything productive with my PCs except install operating systems on them! I got bored with Debian a while ago, and so (naturally!) installed Windows 7 RC1. That’s been running really well, so (equally naturally) I got bored with that and decided to replace it with something else. On this occasion, having been using Ubuntu 9.04 (32 bit) as my desktop at work (they take a liberal line on what we’re allowed to install on our work PCs, thankfully!), and having gotten to like it very much over the past couple of weeks, I decided to install Ubuntu 9.04 (64 bit) over the increasingly mundane Windows 7. The new installation may not last an awful lot longer than any of the several hundred previous ones, but at least I can spend my weekend having some fun!

The specs of this particular PC are quite reasonable: Quad Core 9550, 2.8GHz, 8GB RAM, 60GB solid state hard disk, plus 2 x 200GB Seagate HDDs, plus 2 x 1TB Samsung HDDs, 1 24″ monitor (1920×1200) plus 1 18.5″ monitor, Nvidia 8400-GS graphics card (nothing special required for a guy who mainly plays Solitaire!) and Canon PIXMAR 210 printer. The 2 200GB drives had previously been used in (SATA) RAID-0 as a boot drive for Windows 7 RC1. The 2 1TB drives had previously been used as a RAID-1 set, using software RAID in Windows 7 (that is, the disks had been converted to dynamic disks, and a Windows mirrored pair created). Internet connection is via a wireless broadband USB modem plugged into an ancient laptop running Windows XP and shared to the household courtesy of Windows’ own Internet Connection Sharing (so all other PCs have their IP addresses assigned by DHCP). Since I am confidently expecting Ubuntu to not understand the 200GB ‘fake raid’, still less the 1TB Windows software raid, I backed up all the important stuff onto an external USB drive earlier in the week.

The Installation

I tried going straight for the ‘install’ option off the CD, but that would simply get to a 1280×1024 display of the Jaunty wallpaper and then hang (no menus or anything). So I unplugged the second monitor (on the grounds that maybe that was confusing things) and booted into the Live CD environment. Everything worked fine -and even the 24″ monitor’s resolution was set correctly (which is something of a first for any Ubuntu version as far as I can remember!) I then selected the ‘install’ option from the Live desktop. Partitioning was fine: I left all the traditional hard disks alone for now, and simply wiped the 60GB Solid State disk, creating a 4GB swap partition (probably unnecessarily, to be honest) and assigning the rest to the root partition. I formatted that with ext4 (for I feel like living dangerously!) Installation was predictably straightforward thereafter, and the thing even managed to reboot correctly into a fully-functional Ubuntu 9.04 x86-64 desktop at the end of it (and Grub having managed to install itself correctly in my environment so that could happen is also something of a first in my experience!)

Post-Installation

The Update Manager launched itself after I’d been logged in for a couple of minutes and proposed 97MB of upgrades to be installed. I simply accepted that proposal without demur. During that installation, the Printer Driver dialogue popped up warning me that no driver for my printer could be found. I used the Printer Configuration wizard that had been launched automatically to select the nearest match (a Canon PIXMAR 220), and that seeems to be working just fine. Once the Update Manager had finished doing its thing, it prompted me to restart my machine: I am gratified to note that from the time the Grub bootloader launches to the time I get to log in, just 7 seconds elapses!

Blinging the Desktop

Time to jazz things up a little, graphically, and so I take the System -> Administration -> Hardware Drivers menu options, selecting to ‘activate’ the Nvidia 180 accelerated graphics drivers. The download and installation take just over a minute, and I am then prompted to restart the PC once more (I thought this was Linux and that sort of thing wasn’t necessary?!!) Actually, I decide to shut the machine down, plug in the second monitor once more, and then boot up.

The second monitor is completely dark (but at least the main one still works OK!). There is always the System -> Administration -> NVIDIA X Server Settings tool, of course, but previous experience in Debian has taught me that using it from those menu options is a complete waste of time… because changes to my X configuration will need to be written to /etc/X11/xorg.conf, and that will require root (or, in Ubuntu’s case, sudo) privileges. Instead, therefore, I open a terminal and type the command sudo /usr/bin/nvidia-settings. The tool launches fine and tells me the nature of the problem: the second monitor has been disabled by default. I select to configure it in TwinView mode, save the configuration file, quit the tool and log out. When I log back in, the second monitor springs to life and all looks good. I go back into the NVIDIA configuration tool, however, to make one slight adjustment that it wouldn’t let me make first time around:

Setting the spare monitor position down a bit

Setting the spare monitor position down a bit

The subtle point here is that the spare monitor is set to align to the bottom of the main monitor, not the top (as it is by default). Doing that involves dragging the purple-y block representing the spare monitor down a bit: quite why that was impossible to do first time around, I’m not sure. Anyway, one more log out and in, and all is fine in the graphical department. Elapsed time since the installation finished: about 4 minutes, which isn’t bad, I think.

With the drivers all sorted out, I can finally enable some graphical bling (because I love it, especially desktop cubes!)

System -> Preferences -> Appearance and select the New Wave theme (it’s not perfect, but it’s better than the default Human one). Then, System -> Administration -> Synaptic Package Manager and type in compiz in the search box. Select to install the compizconfig-settings-manager (plus its dependencies). When that’s been installed, System -> Preferences -> CompizConfig Settings Manager and select the appropriate effects. I switch on Desktop Cube (requiring “Desktop Wall” to be disabled), plus Minimize Effect (disabling ‘windowanimations’) and Wobbly Windows (disabling Snapping Windows). After wondering why the Desktop Cube didn’t actually do very much, I realised I should also have switched on the Rotate Cube effect. Additionally, for the cube actually to be a cube rather than a plane with just two faces, I needed to right-click the Workspace Switcher (at the far right-hand of the bottom panel, just next to the recycle bin icon), select Preferences and change the ‘columns’ settings from its default 2 to a more sensible 4. That gets you a proper desktop cube when you Ctrl+Alt+Right Arrow (or left arrow, come to that!) or when you hold down Ctrl+Alt whilst clicking and dragging anywhere on the desktop (it’s easier to do than it sounds!)

I haven’t yet decided if I want multiple cubes (one per monitor) or a single giant cube: if only I’d paid for a second screen the same size as my main one, I think the decision would be a lot easier!! For now, I’ve switched on multiple cubes (in the CompizConfig Settings Manager, actually click on the Desktop Cube icon, rather than selecting its checkbox), but that may change.

Finally, run to Interfacelift.com and get some nice wallpaper to replace the ghastly orange thing Ubuntu ships with. The only trouble I had at this point was, again, my dumb choice of a smaller screen (and hence smaller screen resolution) for my second monitor as compared to the main one: 1920×1200 on one, but only 1600×900 on the other… so what resolution wallpaper should I download?! Well, I experimented with the dual-screen option that Interfacelift sometimes has for certain images (a 2560×1024 one was available, for example), but I had to stretch that to fit the main monitor’s higher vertical resolution, and that looked pretty horrible. I also tried the 2560×1600 option, but I had to scale that down, and that looked weird, too. In the end, I download the plain vanilla 1920×1200 one and tiled that: the sky gets chopped out on the second monitor, but it otherwise looks pretty decent, I think:

desktopwallpaper

Just bear in mind that I don’t get to see that chunk of black at the top of the right-hand screen, because the second monitor’s display is only as tall as the part of the picture underneath that. That’s what moving the alignment down in the NVIDIA configuration tool did for me, after all.

My last major piece of blinging-up the desktop was to install a new icon set (because I don’t particularly like the Human one Ubuntu ships with). Instead, I use Dropline Neu. Download that, saving it to the desktop. Then System -> Preferences -> Appearance and click Install. Point to the new icon file and then select the ‘Apply new Theme’ option when prompted. I also took the opportunity to click ‘Customize’, select the Colors tab and then change the colours for Selected Items and Tooltips (to #568AFF and #C4D6FF respectively): the aim is to get rid of any orangey-ness about my desktop altogether!

Very finally (for now!), use System -> Preferences -> Screensaver to switch to ‘Random’ rather than the default ‘Blank ccreen’ (which is very black and very boring!)

Total time taken so far: about 20 to 30 minutes. My PC boots like lightning, looks good and the desktop rotates at my command, which is the main thing.