Tidy-up the Windows install section and remove focus on Instant Client
This commit is contained in:
parent
46a5476ae7
commit
6a76715b95
59
INSTALL.md
59
INSTALL.md
|
@ -22,7 +22,7 @@ limitations under the License.
|
||||||
3. [Node-oracledb Installation on Linux with Instant Client ZIP files](#instzip)
|
3. [Node-oracledb Installation on Linux with Instant Client ZIP files](#instzip)
|
||||||
4. [Node-oracledb Installation on Linux with a Local Database](#instoh)
|
4. [Node-oracledb Installation on Linux with a Local Database](#instoh)
|
||||||
5. [Node-oracledb Installation on OS X with Instant Client](#instosx)
|
5. [Node-oracledb Installation on OS X with Instant Client](#instosx)
|
||||||
6. [Node-oracledb Installation on Windows with Instant Client](#instwin)
|
6. [Node-oracledb Installation on Windows](#instwin)
|
||||||
7. [Advanced installation on Linux](#linuxadv)
|
7. [Advanced installation on Linux](#linuxadv)
|
||||||
|
|
||||||
## <a name="overview"></a> 1. Overview
|
## <a name="overview"></a> 1. Overview
|
||||||
|
@ -452,17 +452,20 @@ To run a database on OS X, one option is to use VirtualBox,
|
||||||
see
|
see
|
||||||
[The Easiest Way to Enable Oracle Database Application Development on Mac OS X](https://blogs.oracle.com/opal/entry/the_easiest_way_to_enable).
|
[The Easiest Way to Enable Oracle Database Application Development on Mac OS X](https://blogs.oracle.com/opal/entry/the_easiest_way_to_enable).
|
||||||
|
|
||||||
## <a name="instwin"></a> 6. Node-oracledb Installation on Windows with Instant Client
|
## <a name="instwin"></a> 6. Node-oracledb Installation on Windows
|
||||||
|
|
||||||
### 6.1 Install required tools
|
### 6.1 Install required tools
|
||||||
|
|
||||||
Install a Microsoft C/C++ compiler.
|
Install a C/C++ build environment such as Microsoft Visual
|
||||||
|
Studio 2013. Compilers supported by Oracle libraries are found in
|
||||||
|
Oracle documentation for each version, for example
|
||||||
|
[Oracle Database Client Quick Installation Guide 12c Release 1 (12.1) for Microsoft Windows x64 (64-Bit)](https://docs.oracle.com/database/121/NXCQI/toc.htm#NXCQI108).
|
||||||
|
|
||||||
Install Git 1.9 from [git-scm.com](http://git-scm.com/download/win).
|
Install Git 1.9 from [git-scm.com](http://git-scm.com/download/win).
|
||||||
While installing, select the 'Use Git from the Windows Command Prompt'
|
While installing, select the "*Use Git from the Windows Command
|
||||||
in the 'Adjusting your PATH environment' dialog. Select the option to
|
Prompt*" in the "*Adjusting your PATH environment*" dialog. Also
|
||||||
"Checkout Windows-style, commit UNIX-style line endings" in the
|
select the option to "*Checkout Windows-style, commit UNIX-style line
|
||||||
"Configuring the line ending conversions" dialog.
|
endings*" in the "*Configuring the line ending conversions*" dialog.
|
||||||
|
|
||||||
Install the Python 2.7 MSI from
|
Install the Python 2.7 MSI from
|
||||||
[www.python.org](https://www.python.org/downloads). Select the option
|
[www.python.org](https://www.python.org/downloads). Select the option
|
||||||
|
@ -478,65 +481,71 @@ git clone https://github.com/oracle/node-oracledb.git
|
||||||
|
|
||||||
Install the 64 bit Node.js MSI from [nodejs.org](http://nodejs.org/download/)
|
Install the 64 bit Node.js MSI from [nodejs.org](http://nodejs.org/download/)
|
||||||
|
|
||||||
Add the *node* and *node-gyp* directories to the path:
|
Add the Node.js directory to the path:
|
||||||
|
|
||||||
```
|
```
|
||||||
set PATH=%PATH%;"C:\Program Files\nodejs
|
set PATH=%PATH%;C:\Program Files\nodejs
|
||||||
set PATH=%PATH%;"C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 6.4 Install the free Oracle Instant Client ZIPs
|
### 6.4 Install the free Oracle Instant Client ZIPs
|
||||||
|
|
||||||
Download the free 'Basic' and 'SDK' RPMs from
|
Skip this step if you already have Oracle Database on your machine.
|
||||||
|
|
||||||
|
Download the free 'Basic' and 'SDK' ZIP files from
|
||||||
[Oracle Technology Network](http://www.oracle.com/technetwork/topics/winx64soft-089540.html).
|
[Oracle Technology Network](http://www.oracle.com/technetwork/topics/winx64soft-089540.html).
|
||||||
|
|
||||||
Extract `instantclient_basic-windows.x64-12.1.0.2.0.zip` and
|
Extract `instantclient_basic-windows.x64-12.1.0.2.0.zip` and
|
||||||
`instantclient_sdk-windows.x64-12.1.0.2.0.zip` to
|
`instantclient_sdk-windows.x64-12.1.0.2.0.zip` to the same location.
|
||||||
`C:\instantclient_12_1`.
|
|
||||||
|
Optionally rename the resulting directory to `C:\oracle\instantclient`
|
||||||
|
|
||||||
Update the path:
|
Update the path:
|
||||||
|
|
||||||
```
|
```
|
||||||
set PATH=C:\instantclient_12_1\;%PATH%
|
set PATH=C:\oracle\instantclient\;%PATH%
|
||||||
```
|
```
|
||||||
|
|
||||||
### 6.5 Install the driver
|
### 6.5 Install the driver
|
||||||
|
|
||||||
|
If you have Instant Client in a location that is *not*
|
||||||
Tell the installer where to find the Oracle libraries and headers:
|
`C:\oracle\instantclient`, then tell the installer where to find the
|
||||||
|
Oracle libraries and headers:
|
||||||
|
|
||||||
```
|
```
|
||||||
set OCI_INC_DIR=C:\instantclient_12_1\sdk\include
|
set OCI_LIB_DIR=D:\instantclient_12_1\sdk\lib\msvc
|
||||||
set OCI_LIB_DIR=C:\instantclient_12_1\sdk\lib\msvc
|
set OCI_INC_DIR=D:\instantclient_12_1\sdk\include
|
||||||
```
|
```
|
||||||
|
|
||||||
If you are installing with a local database, try:
|
If you are installing with a local database, use:
|
||||||
|
|
||||||
```
|
```
|
||||||
OCI_INC_DIR=C:\oracle\product\12.1.0\dbhome_1\oci\include
|
set OCI_LIB_DIR=C:\oracle\product\12.1.0\dbhome_1\oci\lib\msvc
|
||||||
OCI_LIB_DIR=C:\oracle\product\12.1.0\dbhome_1\oci\lib\msvc
|
set OCI_INC_DIR=C:\oracle\product\12.1.0\dbhome_1\oci\include
|
||||||
```
|
```
|
||||||
|
|
||||||
Run the installer:
|
Run the installer:
|
||||||
|
|
||||||
```
|
```
|
||||||
cd node-oracledb
|
cd node-oracledb
|
||||||
node-gyp rebuild
|
npm install -g
|
||||||
```
|
```
|
||||||
|
|
||||||
### 6.6 Run an example program
|
### 6.6 Run an example program
|
||||||
|
|
||||||
|
Set `NODE_PATH` to include the newly installed node-oracledb driver:
|
||||||
|
|
||||||
Set `NODE_PATH` to include the newly installed node-oracledb driver.
|
```
|
||||||
|
set NODE_PATH=%USERPROFILE%\AppData\Roaming\npm\node_modules
|
||||||
|
```
|
||||||
|
|
||||||
Edit `dbconfig.js` in the `examples` directory and set the database
|
Edit `dbconfig.js` in the `examples` directory and set the database
|
||||||
credentials to your environment.
|
credentials to your environment:
|
||||||
|
|
||||||
```
|
```
|
||||||
module.exports = {
|
module.exports = {
|
||||||
user : "hr",
|
user : "hr",
|
||||||
password : "welcome",
|
password : "welcome",
|
||||||
connectString : "myothermachine/orcl"
|
connectString : "localhost/XE"
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue