![]() |
|
|
|
|
Note: The preliminary installer for Autostarting Oracle is below. Note: XCode 1.5 and OS/X 10.3.5 have recently been released. There shouldn't be a problem with XCode 1.5, but we are still waiting for reports about 10.3.5. There are a few tricks to getting Oracle 10g for OS/X (currently Developer's Release 2 (10.1.0.3)) correctly installed. Oracle 10g can be sucessfully installed on OS/X Client or Server. You could even probably install it on Darwin, though you'd need to install java as well. The Oracle installation documentation is very detailed, so follow the instructions carefully. But here is some important information that may not be obvious from the instructions: - You must install XCode 1.2. The latest version of gcc is required to link Oracle together. You might read the installation instructions and notice that you have gcc 3.3 20030304 installed and figure, well, that must be good enough and ignore the requirement for build 1635; maybe you thought it was a typo. Well, that would be dead wrong. Oracle requires the -mlongbranch option to link during the installation process. There's a patch for this on Apple's ADC site, but you are best off installing the lastest XCode version, 1.2 at this writing, as other problems have been reported with earlier versions. The 1.5 beta should also work, but 1.2 has been tested. - You must be running OS/X 10.3.4. Again, what's a minor version number? Just the difference between working and not working. Luckily Oracle does not check that it is running under OS/X Server (which is listed as a requirement. See, sometimes those things aren't right after all!). Hopefully they won't enforce that for the final release. - On OS/X, there is no "oper" group, though there is an "operator" group. Adding the oracle user to these groups is not necessary for successful installation, but there's no harm in adding the user to "operator". - Installation Location. A proper Oracle installation requires a number of separate disks so that there is no contention between the various Oracle components. But I only have 1 drive on the Powerbook that I am using to test Oracle. This will not be particularly efficient, but will work. I placed Oracle under the standard Apple user locations using /Users/oracle/u01 to store the home files and /Users/oracle/u02 for the data files. - The network configuration can give you a lot of trouble if you don't have a static IP with a DNS record. Several Oracle utilities store their configurations by IP address and/or hostname, and the installer also checks to see if the machine name maps to the IP address. If the installer starts coughing up errors saying "thrown when the IP address of the machine cannot be determined", or something like that, then you should probably abort the installation and fix the problem, because it will bite you later. If you have a static IP, and this IP has a real DNS name, then there is no problem. Otherwise, you need to make it look like this is properly configured or you may have problems later. The easiest way to fix this is to add the machine name (which can be anything, since you're forcing it) and the IP address to /etc/hosts. Panther is configured by default to check first in the /etc/hosts file for address resolution, which wasn't true in previous versions of OS/X. If you have a static IP, but it has no real DNS entry, you can just add one to your /etc/hosts file or your nsinfo service if you're feeling ambitious. The format is: IP HOSTNAME For instance my /etc/hosts files is: 192.168.0.19 my.hostname.com Just put in the static IP and give it whatever name you like. If you have a DHCP hostname, then you can do the same thing for installation purposes. Just put in the assigned address as the IP and give it a name. That's the 192.168.0.19 address at the top of my /etc/hosts. If you have more than one IP address, say you have airport on and also a land line, you should just pick the one that you are more likely to use, and disconnect one of them during installation. If your IP is dynamic and later changes, then you will have problems because enterprise console, for instance, goes by the configured hostname. This can be a pain, because these utilities need to be set for the new address. Also the SQL*NET configuration files need to be changed. So you may install using 127.0.0.1, which is the loopback address and will always resolve. To do this you need to disconnect from all networks before you install. There are a lot of potentially different situations, so this is not a complete description. - One user reports that you also need to add the database global name to /etc/hosts in order for the listener to autodiscover the oracle instance. I didn't run into this, but FYI. - During the installation, at a certain point you need to open up a terminal window and run root.sh. Unfortunately, the root.sh generated by the installer is ill-formed for OS/X (Darwin) as far as file locations go. You can download a copy of my root.sh, or run root.patch on the copy that is generated on your machine. When the oracle installer pauses for you to run root.sh, patch the generated root.sh or just run my root.sh after making any changes to the defined locations for your system (ORACLE_HOME). To patch the file, just use the command 'patch root.sh < root.patch'. Back up the generated file just in case. You also need to patch the $ORACLE_HOME/bin/crsctl file. This is a trivial change, you can do it yourself easily enough. Just change the uname invocation near the top from /bin/uname to /usr/bin/uname, or download crsctl.patch and it will do this for you. This doesn't really matter as clusters don't seem to work on OS/X at the moment, but it will eliminate some error mesages and make you feel better. In addition, you need to create the /opt directory at this point if it does not already exist. Again, this doesn't really matter (no clusters) but it will make the script happy. If you make these changes, then the root.sh process should complete without major error, although it will still not be able to generate keys for OCR. Ignore this. If you ran the defective root.sh file, then you probably got a lot of errors. The only thing that you really need to correct before running a proper one is the /etc/oratab file. The defective root.sh creates a directory /etc/oratab with another file oratab (/etc/oratab/oratab) inside. This is incorrect. Delete the /etc/oratab directory and run the correct root.sh. If you have a previous installation of Oracle then there might be data in the oratab file, so be careful here. - Additional users need to go into the "dba" group. Not an installation issue, but required to access Oracle's shared memory from other accounts. OS/X and Darwin don't use the standard System V way of starting daemons that Linux and most Unix systems use. I don't see it as an improvement, and it seems to be unfinished at this point since there is no Shutdown procedure. In order to get Oracle to begin automatically upon startup, you need to install a StartupItem into /Library/StartupItems that contains the proper commands. I'm not going to go into the details here, you can check Apple's documentation and other places for the detailed specs. Essentially, you need to create a directory for the StartupItem (call it Oracle), a Properties file called StartupParameters.plist that describes the startup item, a script to be invoked with the same name as the directory, Oracle, and another script that is called by that script, start_oracle, which starts the listener, database, and enterprise manager. So just download those files and put them into /Library/StartupItems/Oracle and Oracle will be automatically started. Don't forget to make Oracle and start_oracle executable. At the current time, the flexibility of the automatic startup is somewhat limited. It assumes that the oracle user sets the proper ORACLE_HOME and ORACLE_SID in .bash_profile. Only that SID is started (not all in /etc/oratab). At the very least they should show you how to use the Startup facility to get to your normal unix startup scripts. If you need to customize the startup script, you can just edit oracle_start or point to a different script. You can download an installer that will install these files here. This is a brute force procedure at present. It will overwrite anything in /Library/StartupItems/Oracle, so use with care, especially if you customize the script. In the near future I will be putting together a more comprehensive installer and Preference Pane to give greater control over what the Startup Item does. Autostopping Oracle: OS/X does not implement a clean Shutdown procedure for daemons. Even though the StartupParameters.plist files can define a procedure to stop a service, this routine is never actually called. Why this is, I don't know. However, OS/X can obviously shut down it's own services. I am working on a stub application that will intercept a shutdown command and try to cleanly shutdown Oracle. If anyone has any suggestions, please feel free to help. I'll probably be getting to it next week. Questions, feedback, etc.., please contact me at
|
|
© 2004 Crisp Data All rights reserved. |