Set up Oracle 10g on Tiger

This describes how I set up Oracle 10g on OSX Tiger for development use.

Sergio has an excellent instruction on how to install Oracle 10g on Panther. However because the Oracle requires gcc 3.3 and Tiger uses gcc 4 by default. Some hacks are in order.

Following Sergio's instruction to prepare Oracle installation environment. Issue the following commands as root before launch installer.

sudo nicl . -append /groups/admin users oracle
sudo gcc_select 3.3
Then launch the Oracle installer. The installation will fail towards the end complaining lost TNS when running database creation wizard. Simply abort and do following extra steps.

Step 1: Firstly, set up $ORACLE_HOME and $PATH in your .bash_profile. By default, the ORACLE_HOME is at "/Volumes/u01/app/oracle/product/10.1.0/db_1" if you follow Sergio's instruction. While logged in as oracle, add following two lines to .bash_profile, adjust the ORACLE_HOME value as necessary.

export ORACLE_HOME="/Volumes/u01/app/oracle/product/10.1.0/db_1"
export PATH=$PATH:~/bin:$ORACLE_HOME/bin
Issue following command to activate new settings.
cd
. .bash_profile

Step 2: Relink Oracle libraries.

cd $ORACLE_HOME/lib
mv libnnz10.dylib libnnz10.dylib.ori
relink all
mv libnnz10.dylib.ori libnnz10.dylib

Step 3: Run 'dbca' to create a database. What to do when dbca does not start?

Step 4: Run '$ORACLE_HOME/root.sh'. This script will appear hang at end and displaying a message "Expecting the CRS daemons to be up within 600 seconds." The CRS is only available on OSX Server so simply Ctrl-C terminate the process.

Step 5: Download Oracle startup and stop script and extract it to 'oracle' user home. Now you can start and stop Oracle instance by running 'startup.sh' and 'stop.sh' respectively.

Step 6: If your machine has a fixed IP, you probably don't need to perform this step. Since I run Oracle on my powerbook and I am only going to use this Oracle for development purpose, I change listener.ora and tnsnames.ora under $ORACLE_HOME/network/admin to make it work with dynamic ip like 192.168.0.1 and only connectable from localhost.

My listener.ora looks like:

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = test1)
      (ORACLE_HOME = /Volumes/u01/app/oracle/product/10.1.0/db_1)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      )
    )
  )

And my tnsnames.ora looks like:

TEST1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = test1)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

One final point, Oracle 10g has its own JDBC driver. Drivers for Oracle 9 won't work with 10g.

Update (Tue Jul 26 08:48:23 PDT 2005): how to start isqlplus.

Technorati Tags: ,

Comments

Anonymous said…
When I installed Oracle on Tiger on my powerbook I didn't have any .ora files created for me at all. Did you have to create yours by hand? What created them for you?

I can bring up ORCL via the .sh scripts but that's about it at the moment.

Isn't the database intrinsicly tied to the hostname upon creation time? ie. I used 10.0.0.3 as my /etc/host address but I'm thinking I should just use localhost instead but I think that means installing running dbca again.
Anonymous said…
Should you wish to reply to my earlier comment you can reach me at robert@elastica.com

Cheers.
Anonymous said…
"What to do when dbca does not start?" link in your blog really helped me. I had done everything but that... I reinstalled oracle twice before I found your blog and that link in your blog.
Anonymous said…
Excellent blog! Thanks to Sergio and yourself as I was able to get Oracle 10g installed and running on my new iBook G4 running Mac OS X 10.4 "Tiger".

Question: where do I need to setup the dbstart and dbstop scripts? How can I automate this process? Do I need to set them up in root under /var/opt/oracle in oratab file? Thanks.
Anonymous said…
I followed your instructions and I got it. My really personal computer, my wonderful iBook G4 with Tiger has a newly oracle database up and running.
After so many years being a DBA and a MacUser to have both worlds together is a dream come true.

Thanks a million
Sandy said…
Brilliant! My installation is up and running .... Thank you very much for your howto.
Anonymous said…
This setup went almost perfect... light years beyond anything available from Oracle. I can't complement enough or be more grateful to this excellent blog.

Oracle should be totally ashamed for their negligence of OS X.
Anonymous said…
Wow, incredible - somehow, I too now have Oracle 10g up and running on my PowerBook with OS 10.4.2. Thanks so much for the help!
Anonymous said…
Is there something like Oracle Enterprise Manager Console on Oracle 10g on the Mac? I use Oracle 9.2 on my iBook and it's sometimes frustrating to have to do everything through sqlplus! Or is the browser based Enterprise Manager available on 10.1?
Anonymous said…
Cannot thank you and Sergio enough. Had many reservations about getting through this until I ran into your posting. It is working. Now I'm getting familiar with it. Thanks again.
satejano@earthlink.net
Anonymous said…
Thanks for this blog ! I installed on Tiger 10.4.4 Server, but still have the error on the root.sh execution:

...
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
...
Adding to inittab
Checking the status of Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
Giving up: Oracle CSS stack appears NOT to be running.
./root.sh: line 788: /System/Library/StartupItems/OracleCRS: is a directory
Oracle CSS service would not start as installed
Automatic Storage Management(ASM) cannot be used until Oracle CSS service is started


What will be the impact of this - at first glance, the DB's up and running ?

Has anybody patched this script yet for Tiger 10.4.4 server ?
Thx,
peter 'at' goedtkindt 'dot' name
Anonymous said…
Has anyone got Enterprise Manager dbconsole to correctly report and manage the oracle instance? When I get EM up by using emctl start dbconsole, it is available on http://localhost:5500/em but it says the database is not running when it is and cannot startup or recover the database. I think it might be to do with the hostname fudge as it reports the database being on hostname.local whereas I have patched my listener etc be on localhost. Any ideas on solving this?

macdba "at" quentin "dot" org "dot" uk
Anonymous said…
I had the same problem as Quentin. The instructions are excellent and my Oracle installation worked and ran fine. 42 days later I had to reboot my Mac OS X Server today and Oracle didn't come up. I started the emctl dbconsole, the listener and isqlplus (clutching at straws!). I get the message that the database is down and none of the options I use for logging in work. I get this error message: RemoteOperationException: ERROR: NMO not setuid-root (Unix-only).

Frustrating or what.
Anonymous said…
If you have a problem getting the dbconsole from working this is because the setting for it are in a folder named after the DNS name of your m/c or the IP addreess if it could not find a name.
So in oracle/product/10.1.0/db_1 you will have a folder either called [a ip address]_[oracle database sid] or [dns name of m/c]_[oracle database sid], I can not remember how I found out what it called the m/c, I think I just guessed, but I put a sym link to the current folder with the name I found that it was looking for.
Anonymous said…
Hi Anonymous,

Could you be more specifics please? Where did you put your link, and what did it point to?
Anonymous said…
Has anyone succesfully installed oracle on an intel macbook?

I've followed all instructions but can't get the installer to run.
Anonymous said…
Hi anonymous,

Before you start emctl, you first have to startup your instance.

Make sure you have the em db(web)console stopped, after that use:

sqlplus
-login as sys/ as sysoper
-type your pwd
startup

:)
after that you can startup em.
Anonymous said…
I have followed what notes I can find for Oracle 10g on MacOSX; however, I am not able to run the installer. I have followed the Oracle installation instructions, and what I can from Sergio's blog (no longer there - had to view cached version). Here is what I get:

>>>>>>>>>>>>>>>>

Starting Oracle Universal Installer...
No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2006-08-14_11-53-23PM. Please wait ...Oracle Universal Installer, Version 10.1.0.3.0 Production
Copyright (C) 1999, 2004, Oracle. All rights reserved.

Can't connect to window server - not enough permissions.
172.16.1.37:0.0
172.16.1.37:0.0
Unable to start an interactive install session because of the following error:Can't connect to window server - not enough permissions. The DISPLAY environment variable should be set to {hostname or IP address}:{screen}, where the {screen} is usually '0.0'.
Depending on the Unix Shell, you can use one of the following commands as examples to set the DISPLAY environment variable:
- For csh: % setenv DISPLAY 192.168.1.128:0.0
- For sh, ksh and bash: $ DISPLAY=192.168.1.128:0.0; export DISPLAY
Use the following command to see what shell is being used:
echo $SHELL
Use the following command to view the current DISPLAY environment variable setting:
echo $DISPLAY
- Make sure that client users are authorized to connect to the X Server.
To enable client users to access the X Server, open an xterm, dtterm or xconsole as the user that started the session and type the following command:
% xhost +
To test that the DISPLAY environment variable is set correctly, run a X11 based program that comes with the native operating system such as 'xclock':
% {full path to xclock... see below}
If you are not able to run xclock successfully, please refer to your PC-X Server or OS vendor for further assistance.
Typical path for 'xclock': ''

>>>>>>>>>>>>

X is running and I can get xclock, xeyes, etc. to run. I have seen something regarding AWT headless requirements but I do not see the Java call in any script to alter the JVM parameters.

Any help is greatly appreciated.

Bill
Anonymous said…
I have ORACLE running on OSX Intel !

It is a bit of a cheat, however.

I installed parallels and a windows application within it. I gave the windows pc in parallels a fixed IT address.

I then installed oracle on the windows pc in parallels.

I can then access oracle from OSX Using JDBC and tools such as jdeveloper and aqua data studio.

I can also run applications in OSX that access oracle over JDBC connections.

Still no sign of native ORACLE on MAc OSX INTEL 'though. Shame !
Anonymous said…
they are going to discontinue oracle on mac AGAIN!!

have a look on the product matrix, and it clearly shows that after 10.1 NOTHING is planned.
that's oracles "code" for dropped
Anonymous said…
also

DO NOT abort step 4
Step 4: Run '$ORACLE_HOME/root.sh'. This script will appear hang at end and displaying a message "Expecting the CRS daemons to be up within 600 seconds." The CRS is only available on OSX Server so simply Ctrl-C terminate the process.

let it run, as the script sets the execute flags on some oracle files, (the agents) AFTER the 600second bullshit has timed out
Anonymous said…
I'm having the same problem as Barry. This is a MacBook Pro, 2GHz Intel processor, 512 MB memory and following instructions of Oracle dox with help from Sergio's and this blog. Installer bombs out with the first click of "Next". Error file is an unwind of a java error stack that appears to be saying that there is no oInstall.

Anyone have an idea?

r,

Gus
gspier@chiliad.com
Anonymous said…
The OSX versions for PPC aren't going to work on Intel hardware... that's why they had to create Rosetta and release universal binaries.

Our only real hope for installing Oracle natively on OSX is to go with a Linux version and ride the coattails of BSD Linux Compat, which I don't really know anything about (other than that it exists).

For now I'm going to install Linux under Parallels (which is only $80 and runs things at realtime speeds because it's Intel-native code) and go with it. I think, when it comes to Oracle, we're in an icky position.
Anonymous said…
What is the diffence between Oracle 10G on Mac OS 10 and Oracle 10G on Windows systems or a Windows with SSH to access Unix server?
Anonymous said…
What is the diffence between Oracle 10G on Mac OS 10 and Oracle 10G on Windows systems or a Windows with SSH to access Unix server?
Nonnya said…
Has anyone tried the 10g install on Linux/ Parallels yet? Any hints & tips would be greatly appreciated! Thanks.
Anonymous said…
Has anyone ever tried connecting from MAC OS 9 to an Oracle 10g database sitting on AIX 5.2 platform? If yes, any help will be appreciated. Thanks.
BEWARE!!

WARNING!!!

This has been mentioned above in a previous post, but I can't stress enough how important this is:


DO NOT ABORT STEP 4!!!

root.sh still has some things to do after the 600 seconds passes. If it doesn't do them, you _will_ encounter problems down the road!


I REPEAT: DO NOT ABORT STEP 4!!

WARNING!!

BEWARE!!
Anonymous said…
These comments have been invaluable to me as is this whole site. I thank you for your comment.
i like this

Popular Posts