Skip to content

Commit e697c17

Browse files
committed
First pass at Windows installation doc
1 parent 754423b commit e697c17

File tree

1 file changed

+95
-6
lines changed

1 file changed

+95
-6
lines changed

INSTALL.md

Lines changed: 95 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ limitations under the License.
2121
2. [Node-oracledb Installation on Linux with Instant Client RPMs](#instrpm)
2222
3. [Node-oracledb Installation on Linux with Instant Client ZIP files](#instzip)
2323
4. [Node-oracledb Installation on Linux with a Local Database](#instoh)
24-
5. [Node-oracledb Installation on OS X with Instant Client ZIP files](#instosx)
25-
6. [Advanced installation on Linux](#linuxadv)
24+
5. [Node-oracledb Installation on OS X with Instant Client](#instosx)
25+
6. [Node-oracledb Installation on Windows with Instant Client](#instwin)
26+
7. [Advanced installation on Linux](#linuxadv)
2627

2728
## <a name="overview"></a> 1. Overview
2829

@@ -59,7 +60,7 @@ Linux. My database is on another machine. | [Node-oracledb Installation on Lin
5960
Solaris. My database is on another machine. | [Node-oracledb Installation on Linux with Instant Client ZIP files](#instzip)
6061
Linux or Solaris, with a database on the same machine. | [Node-oracledb Installation on Linux with a Local Database](#instoh)
6162
Linux or Solaris, with the full Oracle client (installed via runInstaller) on the same machine. | [Node-oracledb Installation on Linux with a Local Database](#instoh)
62-
Mac OS X. | [Node-oracledb Installation on OS X with Instant Client ZIP files](#instosx)
63+
Mac OS X. | [Node-oracledb Installation on OS X with Instant Client](#instosx)
6364
Another OS with Oracle 11.2 or 12.1 libraries available | Update binding.gyp and make any code changes required, sign the [OCA](https://www.oracle.com/technetwork/community/oca-486395.html), and submit a pull request with your patch (Windows support is already being worked on).
6465

6566
### Other Resources Useful for node-oracledb
@@ -353,7 +354,7 @@ Run one of the examples:
353354
node examples/select1.js
354355
```
355356

356-
## <a name="instosx"></a> 5. Node-oracledb Installation on OS X with Instant Client ZIP files
357+
## <a name="instosx"></a> 5. Node-oracledb Installation on OS X with Instant Client
357358

358359
### 5.1 Install Xcode
359360

@@ -450,7 +451,94 @@ To run a database on OS X, one option is to use VirtualBox,
450451
see
451452
[The Easiest Way to Enable Oracle Database Application Development on Mac OS X](https://blogs.oracle.com/opal/entry/the_easiest_way_to_enable).
452453

453-
## <a name="linuxadv"></a> 6. Advanced installation on Linux
454+
## <a name="instwin"></a> 6. Node-oracledb Installation on Windows with Instant Client
455+
456+
### 6.1 Install required tools
457+
458+
Install a Microsoft C/C++ compiler.
459+
460+
Install Git 1.9 from [git-scm.com](http://git-scm.com/download/win).
461+
While installing, select the 'Use Git from the Windows Command Prompt'
462+
in the 'Adjusting your PATH environment' dialog. Select the option to
463+
"Checkout Windows-style, commit UNIX-style line endings" in the
464+
"Configuring the line ending conversions" dialog.
465+
466+
Install the Python 2.7 MSI from
467+
[www.python.org](https://www.python.org/downloads). Select the option
468+
to add the Python directories to the path.
469+
470+
### 6.2 Clone [this repository](https://github.com/oracle/node-oracledb)
471+
472+
```
473+
git clone https://github.com/oracle/node-oracledb.git
474+
```
475+
476+
### 6.3 Install Node.js
477+
478+
Install the 64 bit Node.js MSI from [nodejs.org](http://nodejs.org/download/)
479+
480+
Add the *node* and *node-gyp* directories to the path:
481+
482+
```
483+
set PATH=%PATH%;"C:\Program Files\nodejs
484+
set PATH=%PATH%;"C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin
485+
```
486+
487+
### 6.4 Install the free Oracle Instant Client ZIPs
488+
489+
Download the free 'Basic' and 'SDK' RPMs from
490+
[Oracle Technology Network](http://www.oracle.com/technetwork/topics/winx64soft-089540.html).
491+
492+
Extract `instantclient_basic-windows.x64-12.1.0.2.0.zip` and
493+
`instantclient_sdk-windows.x64-12.1.0.2.0.zip` to
494+
`C:\instantclient_12_1`.
495+
496+
Update the path:
497+
498+
```
499+
set PATH=C:\instantclient_12_1\;%PATH%
500+
```
501+
502+
### 6.5 Install the driver
503+
504+
505+
Tell the installer where to find the Oracle libraries and headers:
506+
507+
```
508+
set OCI_INC_DIR=C:\instantclient_12_1\sdk\include
509+
set OCI_LIB_DIR=C:\instantclient_12_1\sdk\lib\msvc
510+
```
511+
512+
Run the installer:
513+
514+
```
515+
cd node-oracledb
516+
node-gyp rebuild
517+
```
518+
519+
### 6.6 Run an example program
520+
521+
522+
Set `NODE_PATH` to include the newly installed node-oracledb driver.
523+
524+
Edit `dbconfig.js` in the `examples` directory and set the database
525+
credentials to your environment.
526+
527+
```
528+
module.exports = {
529+
user : "hr",
530+
password : "welcome",
531+
connectString : "myothermachine/orcl"
532+
};
533+
```
534+
535+
Run one of the examples:
536+
537+
```
538+
node examples/select1.js
539+
```
540+
541+
## <a name="linuxadv"></a> 7. Advanced installation on Linux
454542

455543
### Instant Client RPMs and RPATH
456544

@@ -464,7 +552,8 @@ require the node-oracledb installation variables `OCI_LIB_DIR` or
464552
`ldconfig` configuration for run time. Installation is simply:
465553

466554
```
467-
rpm -i ...
555+
rpm -ivh oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
556+
rpm -ivh oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
468557
npm install -g
469558
node examples/select1.js
470559
```

0 commit comments

Comments
 (0)