I install Oracle a lot. I use my own Doris shell script to do so on assorted Linuxes as painlessly as possible, since it’s been working well on 32-bit distros since December 2007. Since then, I’ve added 64-bit distro support, as well as 32-bit Mandriva and Ubuntu 8.04 support.
The only pain is having to supply a password every time I want to download the thing: I’m not good with getting passwords right, first time and every time. So it gets fiddly -and to make my life a bit easier in this regard, I’ve decided to put Doris back on public display. Now anyone can download her at any time -and without having to supply a password.
But I’m not offering any support on the use of the script, beyond this summary of the basic principles involved:
- Install your distro in absolutely stock-standard default mode. That is, accept whatever packages the installer proposes by default. Don’t add to them. Don’t update them once the OS installation is finished.
- Don’t allow your OS installer (if it gives you the option) to switch on a firewall.
- Don’t allow your OS (again, assuming it gives you the option) to enable SELinux.
- Don’t use DHCP (unless you have no choice), but if you decide you have to, at least make sure your DHCP server always assigns the same IP address to your Oracle server.
Other than that, just run the script as root immediately your OS install completes. You need a functioning connection to the Internet available and you supply the OS name and the Oracle version (for example, /home/hjr/doris1.sh fedora8 11g). Doris will then organise everything needed to make a subsequent installation of the Oracle RDBMS software work, provided you call the database the Oracle installer offers to create lin10 or lin11 (if you want to use some other name, you’ll need to edit the doris script before you run it and supply your alternatives in the appropriate place).
Once Doris completes, quit being root and become the oracle user (usually, that means you type exit to stop being root and su - oracle to become the oracle user, but on Ubuntu and Debian, you need to actually log right out and log back in again from scratch as the oracle user, using the full-blown GUI logon manager, otherwise you get problems with your X display (and fiddling about with values for the DISPLAY environment variables won’t fix them).
I’ll also add that 64-bit installations of 10g (the problem doesn’t arise with 64-bit 11g installations) on Fedora 8 and OpenSuse 10.3 will appear to bomb out during the linking phase with errors of the ‘error in invoking target of makefile…’ type. I’ve not found a way to stop those happening. But you can click ‘ignore’ when the error appears and the installation will proceed to completion -and everything will work (as far as I can tell) quite normally. I’m still looking into how to eradicate the errors appearing in the first place, but since 10g is getting pretty ‘old hat’ these days, I wouldn’t personally be holding my breath on that score…
Updates:
- Version 1.1a adds support for Fedora 9 (x86 only) for 10g and 11g installations. It also allows you the choice of database name (so ‘lin10′ and ‘lin11′ are now merely default options) and also the choice of name for the owner of the Oracle installation (so ‘oracle’ is now only the default owner’s name, but you can supply any other you like -though “root” is not acceptable and you shouldn’t supply your own username). [May 21st 2008]
25 Comments
I liked your posts on what now looks like a previous web page regarding Oracle installs on various distros — but I can no longer find them. Any plans on bringing them back here? Or is there an alternate site where they might be found? Thanks for providing them — it as real public service.
This was my old bookmark:
Installing Oracle | Dizwell Informatics
http://www.dizwell.com/prod/node/3
There’s a history to this Bryan, but I won’t bore you with it. The short answer is, no, that material is no longer available, and I’m not bringing it back any time soon. If it’s found to be hosted anywhere else, it would be in breach of copyright and I’d take steps to have it removed.
The doris script should mean you don’t need it anyway. It installs 10g or 11g onto any of the top 8 distros as currently measured by distro watch. The other stuff would only be relevant if you were using an ancient distro (such as Red Hat ES3) or using an equally ancient version of Oracle (i.e., 8i or 9i)… at which point, my advice would be to move to an OS or Oracle Version that is vaguely current… and at which point also doris kicks in and does her stuff.
Thank You Dizwell, for posting the DORIS script.
Hi Dizwell,
I used your previous posts to do a couple of installs of 10g on Feisty Fawn late last year and found them very helpful. Other HOWTOs I read before that would get some things right but wouldn’t work 100% correctly. I found I was constantly flipping back and forth between them to try to get a working system. Once I found your instructions, however, it was a breeze. I panicked when you removed them as I had relied on them quite a bit.
I’ve got a new dev server I’m building at the moment and have just downloaded and run Doris - she’s a beauty! As I write this I’ve just finished my first install with her. I had given myself more time to do it as I’m a bit rusty with install scripts but now I’m done and it’s beer o’clock!
Thanks for a great script.
Phillip Monk
Glad it’s of some use, Paily & Phillip.
Great job on the script. I had a need to prepare several machines for an Oracle installation and this actually is right up my alley. Thanks for making this available!
Have you had any success in creating an IDE environment for Ubuntu (ie: Oracle Forms/Reports)? Even getting web forms to execute in Firefox seems prohibitive at this point after having learned that jInitiator is a Windows-only product.
Hi Howard,
I see if your brief notes that the user of the script is advised to change the default database name assigned by the script, i.e. lin10 or lin11. This is important as there are a number of “guesser” tools out there and it wont be long before lin10 and lin11 are added to their dictionaries, they are in mine already.
Also worth pointing out for your readers is the usefulness of changing the software owner name from “oracle” - this would require editing of the doris script of course by the reader. This is importnat. I do a lot of database security audits for clients and I am seeing an increasing number of attempts to connect to servers by guessing the OS username of “oracle”. Default names give attackers a head start, unfortunately.
The same, but to a much lesser extent applies to the default name “dba”, obviously it cannot be an advantage to guess it, but the script could be improved to allow the segregation of duties afforded by the creation of an OSDBA and OSOPER Unix/Linux group. I have to say I never see any database where this is done, having the OSOPER group/alias allows the creation of an OS account that can be assigned this group, who can then stop and start the database but is actually only connected as PUBLIC not SYS. Its easy to fix after the fact also by editing the $ORACLE_HOME/rdbms/lib/config.c or .s (Real Unix) and relinking.
Great script Howard,
cheers
Pete
Thanks Pete. A new version of the script is in preparation for Fedora 9 capabilities, in preparation for which I had already introduced an interactive bit where you get to pick the database name and the oracle user name. I won’t be implementing the OSDBA/OSOPER split though: I figure anyone with enough nous to want to do that won’t be using this script anyway.
Thanks for the update Howard, I guess as far as OSOPER is concerned all the user needs to do is to create the group and also assign it to the sofwtare owner (they would need to modifiy DORIS to do this if using DORIS) and then outside of DORIS identify the group assigned as OSOPER to the database install as well.
But you are right, anyone wanting to do this will do it anyway. It always amazes me that I never see the group split on production databases but what amazes me more is the reaction when i tell the client about the fact you can have this segregation of duties, everyone always says, wow, what a good idea BUT, why didnt they do it to start with?, its often clear they were aware it could be done.
thanks Howard
cheers
Pete
hi, thanks for the script. and i really mean that. it saves lot of time and very easy..
Hi Howard.
You don’t know how glad I was to see that you decided to make Doris available again. It makes it a lot easier for someone like me (a semi-newb) to get thing working the right way on Linux.
Hurray I dare say.
Nicolai
Hello Howard,
In “doris1.1a.sh”, choice of “ubuntu8″ is missing on line 313
Regards
Andrei
It’s missing because it doesn’t have to be there. Line 62 works out if your input choice of OS is valid -and at that point, ubuntu8 is a valid entry because you might type ‘ubuntu8′. Line 313 is only working out ‘if they’re installing onto Ubuntu, this is where the config file’.
In between those two lines is supposed to be the line that says ‘treat Ubuntu 8 as if it is Ubuntu 7′. That line did indeed once live between the two others, but unfortunately my fiddling to put in user-choosable installation owner and database names pushed it down to line 433 -which is, of course, after the point where it could have done some good.
That’s now been corrected and the all-important “ubuntu8=ubuntu7″ line now appears at line 123. Which means that the OSCHOICE variable specified at what used to be line 313 (and is now line 320) does NOT need to include “ubuntu8″ as a comparison option. Thanks for the heads-up, however, that I’d buggered up the placement of the ‘ubuntu8=ubuntu7′ line.
If you get a chance, by all means test the 1.1b version of the script (i.e., the amended one) and let me know whether or not it now sets the environment variables for Ubuntu 8 properly.
I’ll tried the script on fedora 9 and that works like a charm, but using it on Ubuntu 7.10 and 8.04 it seems to fail around here I have used the default user oracle bur orcl as database name.:
Propose a database name:
orcl
User Environment now configured as follows…
———————————————
doris1.1b.sh: 1640: cannot create : Directory nonexistent
update to my previouse post:
I had to do this first:
root@idlebox:~# cd /bin
root@idlebox:~# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2007-11-04 15:29 /bin/sh -> dash
root@idlebox:/bin# ln -sf bash /bin/sh
root@idlebox:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2007-11-05 10:42 /bin/sh -> bash
from : http://www.pythian.com/blogs/654/installing-oracle-11g-on-ubuntu-linux-710-gutsy-gibbon
No, you don’t have to do any of that at all. I run Ubuntu 8 at home, and I would have noticed by now if you did.
Hi.
Ok. So I’m confused here.
I tried to run your script and it stopped at “User Environment now configured “, while doing “ln -sf bash /bin/sh” the script ran smmothly and I got the Oracle db 10g installed. Isn’t it so that Ubuntu by default (and correct me here if I’m wrong) uses dash and not bash? Mayby not by default but at least on my machine it did (I’ve got an HP xw4600 Workstation).
Forgive me if you misinterpreted my last post as being rude, if so it is not intentional.
I ran doris 1.1b on an fedora 9 installation on the same machine without troubles at all.
I have no idea. I have just done a new install on Ubuntu 8.04 x86 (32 bit) and the complete output from the terminal session is available for scrutiny here.
There’s no sign in that lot of ‘nonexistent directory’, and the script sailed through to completion without a glitch or a problem. Naturally, the Ubuntu machine I used for this purpose was 100% freshly installed, using all defaults. Yes, Ubuntu does use dash instead of bash (or so I read some time ago). But that has *never* stopped me performing a perfectly standard install without creating symbolic links left, right and center. That was so even before I wrote doris: not once have I ever documented the creation of such symbolic links, because I’ve never, ever needed them.
I didn’t think you were being rude. I hope you don’t think my reply was, either -it was made at 6.30 in the morning as I was rushing for the train, so any perceived abruptness will hopefully be forgiven.
Naturally, I make mistakes (see above in the list of comments!) and it’s quite possible that my fixing of the “ubuntu7=ubuntu8″ issue mentioned earlier in these comments broke something else… but having just run the thing without a problem, I can’t see that I’ve done that on this occasion. I’m sorry I have no answer for you, but when the thing just works for me on a freshly-built default Ubuntu 8 box, I can’t diagnose what about your situation might or might not be different and giving rise to grief.
All I can say with some degree of certainty is that there is no need to go around creating symbolic links between dash/bash in order to get ANY Oracle 10g or 11g install working on Ubuntu, whether you use doris or not.
Incidentally, the error you reported earlier (doris1.1b.sh: 1640: cannot create : Directory nonexistent) indicates a problem at line 1640 in the script: but you will only get to line 1640 if you have supplied non-valid OS or Oracle parameters when running the script. You are doing “doris.1b.sh ubuntu7 10g” or “doris.1b.sh ubuntu8 11g” (or similar combinations), aren’t you?
Hi Dizwell,
i like your script, very comfortable to use.
I found that the header contains
# The Dizwell-Oracle Reliable Installation Script (DORIS) version 1.0a
which is quite confusing, as at the end in version history it says it’s 1.1b already. Apart from this it works perfectly (even with this of course)
best regards
s.
Just found your doris1.1b.sh script. Makes Oracle installations very easy. However, I did find a problem. If you don’t enter a value for the database name at line 348, the code that sets INSTPATH is never executed. This causes a problem at line 411 where ORACLE_HOME is set in the environment file. Since INSTPATH is not set,
ORACLE_HOME=/u01/app/oracle/product/$INSTPATH/db_1
gets expanded to
ORACLE_HOME=/u01/app/oracle/product//db_1
This may be what was causing Nicolai’s problem. I notice that he was not using the default database name.
Kevin
Thank you Scott and Kevin: I’ll look into both issues tomorrow.
Hi Diz!
I was reading your post and in the past i had been confronted to the linking problems on suse 64 bits, being helped by your “RIP” guide how to install 10GR2 on open suse 10.2 (that i lost the printed version lol) i found out that if i install the libs in their 32bits version, these errors won’t appear, i will test oracle installation on open suse 11 soon.
Hi Kevin.
I’ll give it a go making sure to enter e.g. oracle as a database name.
Doing a clean install right now.
Nicolai
Howard,
Very many thanks for the script. Haven’t used it yet, but it looks great.
One small question: I have downloaded the file named doris1.1b.sh - but the first line of comments it says “version 1.0a”. Have I got the latest version? I’m on Ubuntu 8.0.4 if it helps, I got it from the Google archive link, and it’s 55436 bytes.
Thanks,
Paul