Comment installer Oracle sur Mac ?


Membre confirmé
20 Juillet 2007

Après avoir cherché sur le net je m'en remet à vous pour mon problème :

J'ai besoin de tester des requêtes SQL sous Oracle. Je voudrais l'installer sur mon mac (intel CORE DUO sous Tiger) mais je ne sais pas comment faire. Je n'en ai besoin que pour une utilisation locale.

Je ne comprend même pas quels sont les différentes distribution d'Oracle (l'instant client, la Database release etc...). J'ai essayé tant bien que mal d'installer la 9i mais ça n'a pas fonctionné.

Alors est ce que quelqu'un peut m'aider et m'indiquer un tuto facile à lire (même en anglais) pour moi. Merci en tout cas de m'avoir lu ;)


Membre confirmé
20 Juillet 2007
En fait avant de venir ici j'ai épuisé Google...

Mais toutes les docs que j'ai trouvé (dont celle que tu m'envoies olof) demandent Mac OS X Server. Alors que je n'ai que la version familiale.

La 10g fonctionne sur Panther et je n'ai que Tiger encore.

en fait j'ai suivi cette doc et le terminal me dit qu'il ne reconnait pas SQLplus...

:hein: :hein:

Merci en tout cas d'avoir lu :)

When you have downloaded the database, you will need to create a user and a group to own the database files and the daemon processes. Open a terminal window, and type the following commands, entering your password when prompted:

shell$ sudo mkdir /Users/oracle
shell$ sudo nicl . -create /groups/dba passwd "*"
shell$ sudo nicl . -append /groups/dba gid 1521
shell$ sudo nicl . -append /groups/dba users oracle
shell$ sudo nicl . -append /groups/admin users oracle
shell$ sudo nicl . -create /users/oracle
shell$ sudo nicl . -append /users/oracle gid 1521
shell$ sudo nicl . -append /users/oracle uid 1521
shell$ sudo nicl . -append /users/oracle shell /bin/bash
shell$ sudo nicl . -append /users/oracle home /Users/oracle
shell$ sudo nicl . -append /users/oracle realname "OracleDB"
shell$ sudo chown oracle:dba /Users/oracle
You will notice that the user and group IDs are set to 1521, which is the default TCP port for the Oracle listener. I follow this convention for user accounts that run daemon processes—if you already have a user with 1521 as a user ID or want to follow a different convention, modify the commands accordingly. Now set the password for the Oracle user:

shell$ sudo passwd oracle
Next move the files you downloaded to the Oracle user's home directory and change their ownership. The macosx_920_dev_rel.tar.gz file may have been decompressed into macosx_920_dev_rel.tar by your browser. If not, first decompress it:

shell$ gunzip macosx_920_dev_rel.tar.gz
Then move it and the php source to the Oracle user's home directory:

shell$ sudo mv macosx_920_dev_rel.tar php-4.3.4.tar.bz2 /Users/oracle
And make sure they're owned by the Oracle user:

shell$ sudo chown oracle:dba /Users/oracle/*
The majority of the remainder of the installation will be completed as the Oracle user, so open another terminal window and type

shell$ sudo su - oracle
to switch to the Oracle user.

The next step is to unpack the Oracle developer release and put it in place. Starting from the Oracle user's home directory, enter the following commands:

shell$ tar xf macosx_920_dev_rel.tar
(this will take a while, and at the end you will be left with an
'orahome' directory)
shell$ mkdir Source
shell$ mv orahome Source/9iR2
shell$ cd Source/9iR2
shell$ ln -s lib dylib
Your ORACLE_HOME is /Users/oracle/Source/9iR2. If you want to move it elsewhere, be sure to set up symlinks so that the Oracle binaries can find the libraries they need.

To create a database and run Oracle properly, you must first customize the oracle user's environment, by setting a few environment variables and adjusting default process and memory limits. Create a file in the Oracle user's home directory called, with the following contents:

# - set up ENV for oracle users

# Change ORACLE_SID, HOST_NAME, and DOMAIN_NAME below to suit your
# environment
export HOST_NAME=host

## You shouldn't have to change anything below here ##

# Root of All Oracle installation
# If you change this, set up symlinks so Oracle binaries can find libs
export ORACLE_HOME=/Users/oracle/Source/9iR2
# Add Oracle binaries to path
# Required to find dynamic libraries

# Set shell user limits
ulimit -c unlimited
ulimit -d unlimited
ulimit -s 65536

# Fix delete in SQL*Plus
stty erase ^H

# Alias for ease of movement
alias cdo="cd $ORACLE_HOME"
Note that the beginning of the file sets several environment variables: ORACLE_SID, HOST_NAME, and DOMAIN_NAME. Change their values to suit your environment. I try to keep my development environment as similar to my production environment as possible, so I would change my ORACLE_SID to be the same as the ORACLE_SID in the production system, perhaps adding DEV to the end to indicate that it is a development instance. The HOST_NAME and DOMAIN_NAME variables are used by the script that creates the database and the following networking configuration files—if you do not have a DNS name for your computer, you should be able to use the default value or change it to a preferred name without adverse effects.

When your configuration is complete, create or edit a file in the Oracle home directory called .bashrc and add the following line:

. ~/
This will allow subsequent logins as the Oracle user to automatically acquire the environment from the The commands are stored in a separate file, so that other users on the machine who need to use Oracle can add the same line in their .bashrc file.

If you have created the .bashrc file, you will probably also want to adjust your path, by including this line:

export PATH=$HOME/bin:/usr/local/bin:/usr/local/sbin:$PATH
To activate the environment for your current shell, type the same line at your prompt:

shell$ . ~/
Next, make sure your system can resolve the name you set for HOST_NAME. Use sudo (entering the Oracle user's password) to edit the /etc/hosts file, changing the line that reads localhost
to localhost HOST_NAME
where HOST_NAME is the value you set in

Creating a Database

Now that your ORACLE_HOME is in place and your environment is correctly configured, you can create a database. Copy the lines in Listing 1 into a file called createDB.

This script creates several configuration files (init{ORACLE_SID}.ora, listener.ora, and tnsnames.ora) and then creates the database. There are several areas of this script you may want to modify, particularly if you are setting up a development environment that mirrors a current production environment. First, you can change the LOG_DIR and DATA_DIR variables to put your database log files and data files into another directory. The default directory is $ORACLE_HOME/dbs.

Second, after the "# Set up your INIT.ORA file" line, you can adjust some of the settings in init{ORACLE_SID}.ora to reflect your production environment, keeping in mind that the resource settings may not need to be as high for your development instance as for the production server. You can request a copy of your production init.ora file from your DBA, and there is a detailed reference to the settings in the Oracle9i Database Administrator's Guide, which you can find at (OTN membership required).

Third, you can customize the settings for the Oracle listener daemon and clients, by editing the sections after "# Set up your LISTENER.ORA file" and "# Set up your TNSNAMES.ORA file." The default is IPC (interprocess communication), but if you need to have remote clients connect to the database, you should un-comment the TCP lines. You can also add other instances to the TNSNAMES.ORA file, if you want to use SQL*Plus on your Mac to work with remote databases.

Finally, you can customize the commands that create the database. For example, you will see that the script creates two separate tablespaces—one called "tmeda" and one called "imeda." In our application tables are created in the "tmeda" tablespace, indexes are created in the "imeda" tablespace, and the tablespace files are on separate disk partitions on the production machine. You can also modify the size of the datafiles and logfiles to reflect the amount of space you'll need for your application.

When you have customized the script for your environment or decided that the defaults are fine, make it executable and run it. Be aware that the script takes a while to run and uses a significant amount of resources—you may want to run out and grab a burrito while it executes. For instance, the default script took 30 minutes on my 12-inch PowerBook G4 867 with 640 MB of RAM.

Enter the following commands:

shell$ chmod 755 createDb
shell$ ./createDb
Test the Instance

After the script has finished executing, the database and the listener should be running. To confirm that everything is in order, log in via SQL*Plus and execute the following command:

shell$ sqlplus scott/tiger
SQL> select object_name from user_objects;


Membre actif
4 Novembre 2001
j'avais il y a quelques années de ca, installé Oracle sur un Mac, mais c'etait effectivement sur MacOS X Server. La doc etait dispo sur le site d'Oracle.
Mais a mon avis il te faudra un macos x server car il y a de la configuration a faire dans tous ce qui est service web de memoire.


Membre confirmé
20 Juillet 2007
Ah la la !!!

Bon je préfère finalement me dire que c'est impossible comme ça je vais plus perdre mon temps à chercher ! Merci pour tes conseils Marcus.

Je suis au moins pas le seul dans ce cas :(

Merci d'avoir lu !