Skip to content

Commit b93a1db

Browse files
committed
Update OS X install for Instant Client 12.1
1 parent 7c61c7d commit b93a1db

File tree

1 file changed

+27
-58
lines changed

1 file changed

+27
-58
lines changed

INSTALL.md

Lines changed: 27 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ client-server network compatibility applies. For example, with Oracle
4949
Client 12.1 you can connect to Oracle Database 10.2 or greater. Use
5050
Oracle Client 11.2 if you need to connect to Oracle Database 9.2.
5151

52-
A compiler is required. Use Visual Studio on Windows, gcc on Linux or
53-
Xcode on OS X. ** When building with Node 4 onwards, the compiler must
52+
A compiler is required. Use Visual Studio on Windows, GCC on Linux or
53+
Xcode on OS X. ** When building with Node 4 onward, the compiler must
5454
support C++11. ** Note the default compiler on Oracle Linux 6 and RHEL 6
5555
does not have the required support. Install a
5656
[newer compiler](https://blogs.oracle.com/opal/entry/getting_a_c_11_compatible)
@@ -238,9 +238,9 @@ export OCI_INC_DIR=/opt/oracle/instantclient/sdk/include
238238

239239
These variables are only needed during installation.
240240

241-
If Instant Client is in `/opt/oracle/instantclient` and you have no
242-
other Oracle software installed, then these variables are not
243-
actually required. See
241+
If Instant Client is in the default location
242+
`/opt/oracle/instantclient` and you have no other Oracle software
243+
installed, then these variables are not actually required. See
244244
[Oracle Client Location Heuristic on Linux](#linuxinstsearchpath).
245245

246246
If you are behind a firewall you may need to set your proxy, for
@@ -457,6 +457,11 @@ without re-installing node-oracledb.
457457
458458
## <a name="instosx"></a> 6. Node-oracledb Installation on OS X with Instant Client
459459
460+
Note: If you use Instant Client 11.2 because you need to connect to
461+
Oracle Database 9.2, refer to
462+
[these older instructions](https://github.com/oracle/node-oracledb/blob/v1.9.3/INSTALL.md#instosx).
463+
Otherwise follow the instructions below for Instant Client 12.1.
464+
460465
### 6.1 Install Xcode
461466
462467
Building node-oracledb requires Xcode from the Mac App store.
@@ -465,70 +470,34 @@ Building node-oracledb requires Xcode from the Mac App store.
465470
466471
Download the [Node.js package](http://nodejs.org) for OS X 64-bit and install it.
467472
468-
### 6.3 Install the free Oracle Instant Client 'Basic' and 'SDK' ZIPs
469-
470-
Follow the steps in either [6.3.1](#instosxICuser) or [6.3.2](#instosxICroot).
471-
472-
### <a name="instosxICuser"></a> 6.3.1 Install Instant Client in a user directory
473+
### 6.3 Install the free Oracle Instant Client 12.1 'Basic' and 'SDK' ZIPs
473474
474475
Download the free **Basic** and **SDK** 64-bit ZIPs from
475476
[Oracle Technology Network](http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html)
476-
and unzip them somewhere under your home directory:
477+
and install them into the same directory, for example:
477478
478479
```
479-
unzip instantclient-basic-macos.x64-11.2.0.4.0.zip
480-
unzip instantclient-sdk-macos.x64-11.2.0.4.0.zip
481-
cd instantclient_11_2
482-
ln -s libclntsh.dylib.11.1 libclntsh.dylib
480+
cd /opt/oracle
481+
unzip instantclient-basic-macos.x64-12.1.0.2.0.zip
482+
unzip instantclient-sdk-macos.x64-12.1.0.2.0.zip
483+
mv instantclient_12_1 instantclient
484+
cd instantclient
485+
ln -s libclntsh.dylib.12.1 libclntsh.dylib
483486
```
484487
485-
Link the OCI libraries into the user default library path:
488+
### 6.4 Install the add-on
486489
487-
```
488-
mkdir ~/lib
489-
ln -s $(pwd)/{libclntsh.dylib,libclntsh.dylib.11.1,libnnz11.dylib,libociei.dylib} ~/lib/
490-
```
491-
492-
To allow the node-oracledb installer to find the Instant Client
493-
libraries and headers, set the install-time variables `OCI_LIB_DIR`
494-
and `OCI_INC_DIR` to the appropriate directories:
490+
Tell the installer where to find Instant Client:
495491
496492
```
497-
export OCI_LIB_DIR=~/lib
498-
export OCI_INC_DIR=~/instantclient_11_2/sdk/include
493+
export OCI_LIB_DIR=/opt/oracle/instantclient
494+
export OCI_INC_DIR=/opt/oracle/instantclient/sdk/include
499495
```
500496
501497
These variables are only needed during installation.
502498
503-
Continue with [6.4](#instosxICaddon).
504-
505-
### <a name="instosxICroot"></a> 6.3.2 Install Instant Client in /opt
506-
507-
This alternative to [6.3.1](#instosxICroot) requires root access. It
508-
puts Instant Client in the default location used by the node-oracledb
509-
installer. If you don't want to update system directories then follow
510-
the steps in [6.3.1](#instosxICuser) instead.
511-
512-
Download the free **Basic** and **SDK** ZIPs from
513-
[Oracle Technology Network](http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html)
514-
and install them into the same directory:
515-
516-
```
517-
sudo su -
518-
unzip instantclient-basic-macos.x64-11.2.0.4.0.zip
519-
unzip instantclient-sdk-macos.x64-11.2.0.4.0.zip
520-
mkdir /opt/oracle
521-
mv instantclient_11_2 /opt/oracle/instantclient
522-
ln -s /opt/oracle/instantclient/libclntsh.dylib.11.1 /opt/oracle/instantclient/libclntsh.dylib
523-
```
524-
525-
Link the OCI libraries into the default library path:
526-
527-
```
528-
ln -s /opt/oracle/instantclient/{libclntsh.dylib.11.1,libnnz11.dylib,libociei.dylib} /usr/local/lib/
529-
```
530-
531-
### <a name="instosxICaddon"></a> 6.4 Install the add-on
499+
If Instant Client is the default location `/opt/oracle/instantclient`
500+
then these variables are not actually required.
532501
533502
If you are behind a firewall you may need to set your proxy, for
534503
example:
@@ -537,7 +506,7 @@ example:
537506
export http_proxy=http://my-proxy.example.com:80/
538507
```
539508
540-
As a normal user, install node-oracledb from the
509+
Install node-oracledb from the
541510
[NPM registry](https://www.npmjs.com/package/oracledb):
542511
543512
```
@@ -723,7 +692,7 @@ After node-oracle has been built on the source computer, copy the
723692
724693
The destination computer's `PATH` needs to include Visual Studio
725694
redistributables. If you used Oracle client 11.2 then the Visual
726-
Studio 2005 restributable is required. For Oracle client 12.1, use
695+
Studio 2005 redistributable is required. For Oracle client 12.1, use
727696
the Visual Studio 2010 redistributable.
728697
729698
You can also find out the version required by locating the library
@@ -777,7 +746,7 @@ Install them into the /opt/oracle.
777746
```
778747
cd /opt/oracle
779748
unzip instantclient-basic-aix.ppc64-12.1.0.2.0.zip
780-
uzip instantclient-sdk-aix.ppc64-12.1.0.2.0.zip
749+
unzip instantclient-sdk-aix.ppc64-12.1.0.2.0.zip
781750
```
782751
783752
To run applications, you will need to set the link path:

0 commit comments

Comments
 (0)