Skip to content

Commit 8e080a9

Browse files
committed
Doc npm proxy. Leave older changes to older manuals. Move resources to api.md
1 parent b08bd02 commit 8e080a9

File tree

2 files changed

+79
-139
lines changed

2 files changed

+79
-139
lines changed

INSTALL.md

Lines changed: 55 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ limitations under the License.
2121
## ===> *** Note: Go to [https://oracle.github.io/node-oracledb/INSTALL.html](https://oracle.github.io/node-oracledb/INSTALL.html) for production documentation ***
2222

2323
1. [Node-oracledb Overview](#overview)
24-
- 1.1 [Installation Changes in node-oracledb version 4.0](#mig40)
25-
- 1.2 [Installation Changes in node-oracledb version 3.1](#mig31)
26-
- 1.3 [Installation Changes in node-oracledb version 3.0](#mig30)
27-
- 1.4 [Installation Changes in node-oracledb version 2.0](#mig20)
28-
2. [Quick Start Node-oracledb Installation](#quickstart)
24+
- 1.1 [Installation Changes in node-oracledb version 4.0](#mig)
25+
2. [Quick Start node-oracledb Installation](#quickstart)
2926
3. [Node-oracledb Installation Instructions](#instructions)
3027
- 3.1 [Prerequisites](#prerequisites)
3128
- 3.2 [Node-oracledb Installation on Linux with Instant Client RPMs](#instrpm)
@@ -44,9 +41,10 @@ limitations under the License.
4441
- 3.11.1 [Copying node-oracledb Binaries on Windows](#winbins)
4542
- 3.12 [Installing Node.js and Node-oracledb RPMs from yum.oracle.com](#instnoderpms)
4643
- 3.13 [Building and Hosting your own node-oracledb Packages](#selfhost)
47-
4. [Installing Node-oracledb 1.x or 2.x](#installingoldvers)
48-
5. [Useful Resources for Node-oracledb](#otherresources)
49-
6. [Troubleshooting Node-oracledb Installation Problems](#troubleshooting)
44+
4. [Installing Older Versions of Node-oracledb](#installingoldvers)
45+
- 4.1 [Installing node-oracledb 2.x and 3.x](#installingv2)
46+
- 4.2 [Installing node-oracledb 1.x](#installingv1)
47+
5. [Troubleshooting Node-oracledb Installation Problems](#troubleshooting)
5048

5149
## <a name="overview"></a> 1. Node-oracledb Overview
5250

@@ -69,7 +67,7 @@ and versions of Node.js that the pre-built binaries are compatible
6967
with will change as the Node.js project evolves. The binaries are not
7068
guaranteed to be available or usable in your environment.
7169

72-
#### <a name="mig40"></a> 1.1 Installation Changes in node-oracledb version 4.0
70+
#### <a name="mig"></a> 1.1 Installation Changes in node-oracledb version 4.0
7371

7472
Node-oracledb 4.0 was refactored to use [N-API][53] version 4. On
7573
each operating system, a node-oracledb binary will work with a number
@@ -80,78 +78,21 @@ Node.js, you may not need to reinstall node-oracledb.
8078
If compiling from source code, the compiler no longer needs C++11
8179
compatibility. The node-oracledb source code is now pure C.
8280

83-
#### <a name="mig31"></a> 1.1 Installation Changes in node-oracledb version 3.1
81+
See [Installing Older Versions of Node-oracledb](#installingoldvers) for
82+
information about older versions.
8483

85-
Pre-built binaries are now contained in the package downloaded from
86-
npm. This removes the previous internally executed step of
87-
downloading a suitable binary package from GitHub. If install size is
88-
an issue, all binaries except those for the current Node.js version
89-
can be deleted with `npm run prune`.
90-
91-
Source code is no longer included in the package available from npm.
92-
To compile from source code, you need access to GitHub or its [Oracle
93-
mirror](#nogithubaccess).
94-
95-
Node-oracledb now loads the Oracle Client libraries the first time a
96-
connection is needed, not during `require('oracledb')`. This means
97-
that `require('oracledb')` can succeed on machines that do not have
98-
Oracle Client libraries installed. See the [CHANGELOG][43] for more
99-
information.
100-
101-
#### <a name="mig30"></a> 1.2 Installation Changes in node-oracledb version 3.0
102-
103-
Installation of node-oracledb binaries will now use the `npm config`
104-
proxy if it is set. However, due to known npm performance issues, it
105-
is recommended to use environment variables like `https_proxy`
106-
instead, since these will be used in preference to the npm
107-
configuration.
108-
109-
The node-oracledb installer now supports basic proxy authentication.
110-
111-
On Windows, node-oracledb will now attempt to load the Oracle Client
112-
libraries from the `node_modules\oracledb\build\Release` directory
113-
before doing the standard Windows library directory search i.e. of the
114-
`PATH` directories.
115-
116-
See the [CHANGELOG][43] and [Migrating from Previous node-oracledb
117-
Releases][47] for more information about node-oracledb 3.0.
118-
119-
#### <a name="mig20"></a> 1.3 Changes in node-oracledb version 2.0
120-
121-
In node-oracledb version 2.0, pre-built binaries are now available for
122-
some environments.
123-
124-
Building from source code has improved significantly in node-oracledb
125-
version 2.0. The Oracle header files, and the node-oracledb environment
126-
variables `OCI_INC_DIR` and `OCI_LIB_DIR` are no longer required.
127-
128-
The Oracle client libraries must now always be in the default library
129-
search path, such as `PATH` (on Windows), or `LD_LIBRARY_PATH` (on
130-
Linux), or in `~/lib` (on macOS). This is because they are
131-
dynamically loaded during execution. 'Rpath' linking is no longer
132-
performed on Linux or macOS.
133-
134-
Any node-oracledb version 2.0 binary will run with any of the Oracle
135-
client version 11.2, 12, or 18 libraries without needing recompilation.
136-
Note the available Oracle functionality will vary with different
137-
Oracle Client and Database versions.
138-
139-
See the [CHANGELOG][43] and [Migrating from node-oracledb 1.13 to
140-
node-oracledb 2.0][42] for more information about node-oracledb
141-
version 2.0.
142-
143-
## <a name="quickstart"></a> 2. Quick Start Node-oracledb Installation
84+
## <a name="quickstart"></a> 2. Quick Start node-oracledb Installation
14485

14586
- Install Node.js from [nodejs.org][11].
14687

147-
- Install node-oracledb using the `npm` package manager, which is
148-
included in Node.js. If you are behind a firewall, you may need to
149-
set the environment variable `https_proxy` first.
88+
- Install node-oracledb using the `npm` package manager, which is included in
89+
Node.js. If you are behind a firewall, you may need to set the proxy with
90+
`npm config set proxy http://myproxy.example.com:80/`.
15091

15192
- Many users will be able to use a pre-built node-oracledb binary:
15293

153-
- Run `npm install oracledb`, or add `oracledb` to your `package.json`
154-
dependencies. This installs from the [npm registry][4].
94+
- Add `oracledb` to your `package.json` dependencies or run `npm install
95+
oracledb`. This installs from the [npm registry][4].
15596

15697
Windows users will require the [Visual Studio 2017
15798
Redistributable][27].
@@ -206,8 +147,6 @@ Problems](#troubleshooting) if you have installation issues.
206147

207148
## <a name="instructions"></a> 3. Node-oracledb Installation Instructions
208149

209-
#### Which Instructions to Follow
210-
211150
Instructions may need to be adjusted for your platform, environment and versions being used.
212151

213152
I have ... | Follow this ...
@@ -222,7 +161,7 @@ Linux. I have the full Oracle client (installed via `runInstaller`) on the same
222161
Linux. I want to install Node.js and node-oracledb RPM packages | [Installing Node.js and Node-oracledb RPMs from yum.oracle.com](#instnoderpms)
223162
AIX on Power Systems | [Node-oracledb Installation on AIX on Power Systems with Instant Client ZIP files](#instaix)
224163
Solaris x86-64 (64-Bit) | [Node-oracledb Installation on Oracle Solaris x86-64 (64-Bit) with Instant Client ZIP files](#instsolarisx8664)
225-
Another OS with Oracle Database 11.2, 12, or 18 client libraries available | Update binding.gyp and make any code changes required, sign the [OCA][8], and submit a pull request with your patch.
164+
Another OS with Oracle Database 19, 18, 12, or 11.2 client libraries available | Update binding.gyp and make any code changes required, sign the [OCA][8], and submit a pull request with your patch.
226165
Source code from GitHub | [Node-oracledb Installation from Source Code](#github)
227166
I don't have internet access | [Node-oracledb Installation Without Internet Access](#offline)
228167

@@ -315,8 +254,7 @@ If you are behind a firewall you may need to set your proxy, for
315254
example:
316255

317256
```
318-
export http_proxy=http://my-proxy.example.com:80/
319-
export https_proxy=http://my-proxy.example.com:80/
257+
npm config set proxy http://myproxy.example.com:80/
320258
```
321259

322260
##### To install a pre-built binary:
@@ -471,8 +409,7 @@ If you are behind a firewall you may need to set your proxy, for
471409
example:
472410

473411
```
474-
export http_proxy=http://my-proxy.example.com:80/
475-
export https_proxy=http://my-proxy.example.com:80/
412+
npm config set proxy http://myproxy.example.com:80/
476413
```
477414

478415
##### To install a pre-built binary:
@@ -607,8 +544,7 @@ If you are behind a firewall you may need to set your proxy, for
607544
example:
608545

609546
```
610-
export http_proxy=http://my-proxy.example.com:80/
611-
export https_proxy=http://my-proxy.example.com:80/
547+
npm config set proxy http://myproxy.example.com:80/
612548
```
613549

614550
##### To install a pre-built binary:
@@ -704,8 +640,7 @@ If you are behind a firewall you may need to set your proxy, for
704640
example:
705641

706642
```
707-
export http_proxy=http://my-proxy.example.com:80/
708-
export https_proxy=http://my-proxy.example.com:80/
643+
npm config set proxy http://myproxy.example.com:80/
709644
```
710645

711646
##### To install a pre-built binary:
@@ -827,8 +762,7 @@ If you are behind a firewall you may need to set your proxy, for
827762
example:
828763

829764
```
830-
set http_proxy=http://my-proxy.example.com:80/
831-
set https_proxy=http://my-proxy.example.com:80/
765+
npm config set proxy http://myproxy.example.com:80/
832766
```
833767

834768
##### To install a pre-built binary:
@@ -976,8 +910,7 @@ If you are behind a firewall you may need to set your proxy, for
976910
example:
977911

978912
```
979-
set http_proxy=http://my-proxy.example.com:80/
980-
set https_proxy=http://my-proxy.example.com:80/
913+
npm config set proxy http://myproxy.example.com:80/
981914
```
982915

983916
##### To install a pre-built binary:
@@ -1063,8 +996,7 @@ If you are behind a firewall you may need to set your proxy, for
1063996
example:
1064997

1065998
```
1066-
export http_proxy=http://my-proxy.example.com:80/
1067-
export https_proxy=http://my-proxy.example.com:80/
999+
npm config set proxy http://myproxy.example.com:80/
10681000
```
10691001

10701002
Set the compiler to GCC:
@@ -1183,8 +1115,7 @@ If you are behind a firewall you may need to set your proxy, for
11831115
example:
11841116

11851117
```
1186-
export http_proxy=http://my-proxy.example.com:80/
1187-
export https_proxy=http://my-proxy.example.com:80/
1118+
npm config set proxy http://myproxy.example.com:80/
11881119
```
11891120

11901121
Use the GNU `gmake` utility:
@@ -1467,7 +1398,7 @@ See [Node.js for Oracle Linux][46] for details.
14671398
You can host node-oracledb packages locally.
14681399

14691400
Download the node-oracledb package from npm, for example from
1470-
`https://registry.npmjs.com/oracledb/-/oracledb-4.0.1.tgz`
1401+
[`https://registry.npmjs.com/oracledb/-/oracledb-4.0.1.tgz`](https://registry.npmjs.com/oracledb/-/oracledb-4.0.1.tgz)
14711402
Alternatively, if you want to build your own binaries and
14721403
node-oracledb package, the maintainer scripts in
14731404
[/package](https://github.com/oracle/node-oracledb/tree/master/package)
@@ -1476,7 +1407,7 @@ can be used. See
14761407
for details.
14771408

14781409
If you make the package accessible on your local web server, for
1479-
example at https://www.example.com/oracledb-4.0.1.tgz, then your
1410+
example at www.example.com/oracledb-4.0.1.tgz, then your
14801411
install command would be:
14811412

14821413
```
@@ -1494,70 +1425,60 @@ or your `package.json` would contain:
14941425
```
14951426

14961427

1497-
## <a name="installingoldvers"></a> <a name="installingv1"></a> 4. Installing Node-oracledb 1.x or 2.x
1428+
## <a name="installingoldvers"></a> 4. Installing Older Versions of Node-oracledb
14981429

1499-
### Installing Node-oracledb 1.x
1430+
### <a name="installingv2"></a> 4.1 Installing node-oracledb 2.x and 3.x
15001431

1501-
The node-oracledb 1.x installation steps are in the [version 1.x
1502-
INSTALL guide][32]. This version always requires compilation. To get
1503-
an old add-on you must explicitly use its version when installing:
1432+
Pre-built node-oracledb 2 and 3 binaries are available for some platforms and
1433+
Node.js versions. Review the [release tags][41] for availability. You can
1434+
compile the add-on for other platforms or Node.js versions.
1435+
1436+
The node-oracledb 3.1 installation steps are in the [version 3.1 INSTALL
1437+
guide][55].
1438+
1439+
The node-oracledb 3.0 installation steps are in the [version 3.0 INSTALL
1440+
guide][54].
1441+
1442+
The node-oracledb 2.x installation steps are in the [version 2.x INSTALL
1443+
guide][52]
1444+
1445+
To get an old add-on you must explicitly use its version when installing:
15041446

15051447
```
1506-
npm install oracledb@1.13.1
1448+
npm install oracledb@2.3.0
15071449
```
15081450

15091451
or your `package.json` could contain:
15101452

15111453
```
15121454
. . .
15131455
"dependencies": {
1514-
"oracledb": "1.13.1"
1456+
"oracledb": "2.3.0"
15151457
},
15161458
. . .
15171459
```
15181460

1519-
### Installing Node-oracledb 2.x
1461+
### <a name="installingv1"></a> 4.2 Installing node-oracledb 1.x
15201462

1521-
The node-oracledb 2.x installation steps are in the [version 2.x
1522-
INSTALL guide][52]. Pre-built binaries are available for some
1523-
platforms and Node.js versions. You can compile the add-on for other
1524-
versions. To get an old add-on you must explicitly use its version
1525-
when installing:
1463+
The node-oracledb 1.x installation steps are in the [version 1.x
1464+
INSTALL guide][32]. This version always requires compilation. To get
1465+
an old add-on you must explicitly use its version when installing:
15261466

15271467
```
1528-
npm install oracledb@2.3.0
1468+
npm install oracledb@1.13.1
15291469
```
15301470

15311471
or your `package.json` could contain:
15321472

15331473
```
15341474
. . .
15351475
"dependencies": {
1536-
"oracledb": "2.3.0"
1476+
"oracledb": "1.13.1"
15371477
},
15381478
. . .
15391479
```
15401480

1541-
## <a name="otherresources"></a> 5. Useful Resources for Node-oracledb
1542-
1543-
Node-oracledb can be installed on the pre-built [*Database App
1544-
Development VM*][33] for [VirtualBox][34], which has Oracle Database
1545-
12c pre-installed on Oracle Linux.
1546-
1547-
If you want to use your own database, installing the free [Oracle
1548-
Database 11.2 'XE' Express Edition][20] is quick and easy. Other
1549-
database editions may be downloaded [here][35] or [used with
1550-
Docker][36].
1551-
1552-
If you want to install Oracle Linux yourself, it is free from
1553-
[here][37].
1554-
1555-
Oracle's free [LiveSQL][38] site is a great place to learn SQL and
1556-
test statements without needing your own database. Any questions
1557-
about SQL or PL/SQL can be asked at
1558-
[AskTom][39].
1559-
1560-
## <a name="troubleshooting"></a> 6. Troubleshooting Node-oracledb Installation Problems
1481+
## <a name="troubleshooting"></a> 5. Troubleshooting Node-oracledb Installation Problems
15611482

15621483
*Read the [Node-oracledb Installation Instructions](#instructions)*.
15631484

@@ -1570,8 +1491,8 @@ If `npm install oracledb` fails:
15701491
operating system, then change your Node.js version or compile
15711492
node-oracledb from source code.
15721493

1573-
- Was there a network connection error? Do you need to set
1574-
`http_proxy` and/or `https_proxy`?
1494+
- Was there a network connection error? Do you need to use `npm config set
1495+
proxy`, or set `http_proxy` and/or `https_proxy`?
15751496

15761497
- Use `npm install --verbose oracledb`. Review your output and logs.
15771498
Try to install in a different way. Try some potential solutions.
@@ -1649,13 +1570,6 @@ Issues and questions about node-oracledb can be posted on [GitHub][10] or
16491570
[30]: http://www.oracle.com/technetwork/topics/aix5lsoft-098883.html
16501571
[31]: http://www.oracle.com/technetwork/topics/solx8664soft-097204.html
16511572
[32]: https://github.com/oracle/node-oracledb/blob/v1.13.1/INSTALL.md
1652-
[33]: http://www.oracle.com/technetwork/community/developer-vm/index.html#dbapp
1653-
[34]: https://www.virtualbox.org
1654-
[35]: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/
1655-
[36]: https://store.docker.com/
1656-
[37]: http://yum.oracle.com/
1657-
[38]: https://livesql.oracle.com/
1658-
[39]: https://asktom.oracle.com/
16591573
[40]: https://github.com/oracle/node-oracledb/tags
16601574
[41]: https://github.com/oracle/node-oracledb/releases
16611575
[42]: https://oracle.github.io/node-oracledb/doc/api.html#migratev1v2
@@ -1670,3 +1584,5 @@ Issues and questions about node-oracledb can be posted on [GitHub][10] or
16701584
[51]: http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html
16711585
[52]: https://github.com/oracle/node-oracledb/blob/v2.3.0/INSTALL.md
16721586
[53]: https://nodejs.org/api/n-api.html
1587+
[54]: https://github.com/oracle/node-oracledb/blob/v3.0.1/INSTALL.md
1588+
[55]: https://github.com/oracle/node-oracledb/blob/v3.1.2/INSTALL.md

0 commit comments

Comments
 (0)