Skip to content

Commit eb749cb

Browse files
committed
Cleanup README examples and notes, and separate install instructions
1 parent d9163e5 commit eb749cb

File tree

2 files changed

+233
-257
lines changed

2 files changed

+233
-257
lines changed

INSTALL.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Detailed installation instructions
2+
3+
You need to download and install [Oracle instant client](http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html) from following links:
4+
5+
http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
6+
7+
1. Instant Client Package - Basic or Basic Lite: All files required to run OCI, OCCI, and JDBC-OCI applications
8+
2. Instant Client Package - SDK: Additional header files and an example makefile for developing Oracle applications with Instant Client
9+
10+
For Windows, please make sure 12_1 version is used.
11+
12+
**Please make sure you download the correct packages for your system architecture, such as 64 bit vs 32 bit**
13+
**Unzip the files 1 and 2 into the same directory, such as /opt/instantclient\_11\_2 or c:\instantclient\_12\_1**
14+
15+
On MacOS or Linux:
16+
17+
> There is an experimental script that checks the environment and in most cases only needs OCI_HOME
18+
> to be set:
19+
>
20+
> ` source pre_install_check.sh`
21+
>
22+
> it checks for the necessary environment variables, checks (and creates) the necessary links,
23+
> installs missing libraries etc.
24+
> At this time the script is to be considered 'experimental' (use at your own risk).
25+
26+
1. Set up the following environment variables
27+
28+
MacOS/Linux:
29+
30+
```bash
31+
export OCI_HOME=<directory of Oracle instant client>
32+
export OCI_LIB_DIR=$OCI_HOME
33+
export OCI_INCLUDE_DIR=$OCI_HOME/sdk/include
34+
export OCI_VERSION=<the instant client major version number> # Optional. Default is 11.
35+
export NLS_LANG=AMERICAN_AMERICA.UTF8
36+
```
37+
__If you do not set NLS_LANG, returned Chinese may be garbled.__
38+
39+
2. Create the following symbolic links
40+
41+
MacOS:
42+
43+
```
44+
cd $OCI_LIB_DIR
45+
ln -s libclntsh.dylib.11.1 libclntsh.dylib
46+
ln -s libocci.dylib.11.1 libocci.dylib
47+
```
48+
49+
Linux:
50+
51+
```
52+
cd $OCI_LIB_DIR
53+
ln -s libclntsh.so.11.1 libclntsh.so
54+
ln -s libocci.so.11.1 libocci.so
55+
```
56+
57+
`libaio` library is required on Linux systems:
58+
59+
* On Unbuntu/Debian
60+
61+
```
62+
sudo apt-get install libaio1
63+
```
64+
65+
* On Fedora/CentOS/RHEL
66+
67+
```
68+
sudo yum install libaio
69+
```
70+
71+
3. Configure the dynamic library path
72+
73+
MacOS:
74+
75+
```
76+
export DYLD_LIBRARY_PATH=$OCI_LIB_DIR
77+
```
78+
79+
Linux:
80+
81+
Add the shared object files to the ld cache:
82+
83+
```
84+
# Replace /opt/instantclient_11_2/ with wherever you extracted the Basic Lite files to
85+
echo '/opt/instantclient_11_2/' | sudo tee -a /etc/ld.so.conf.d/oracle_instant_client.conf
86+
sudo ldconfig
87+
```
88+
89+
On Windows, you need to set the environment variables:
90+
91+
If you have VisualStudio 2012 installed,
92+
93+
```bat
94+
OCI_INCLUDE_DIR=C:\instantclient_12_1\sdk\include
95+
OCI_LIB_DIR=C:\instantclient_12_1\sdk\lib\msvc\vc11
96+
OCI_VERSION=<the instant client major version number> # Optional. Default is 11.
97+
Path=...;c:\instantclient_12_1\vc11;c:\instantclient_12_1
98+
```
99+
100+
**Please make sure c:\instantclient_12_1\vc11 comes before c:\instantclient_12_1**
101+
102+
If you have VisualStudio 2010 installed,
103+
104+
```bat
105+
OCI_INCLUDE_DIR=C:\instantclient_12_1\sdk\include
106+
OCI_LIB_DIR=C:\instantclient_12_1\sdk\lib\msvc\vc10
107+
OCI_VERSION=<the instant client major version number> # Optional. Default is 11.
108+
Path=...;c:\instantclient_12_1\vc10;c:\instantclient_12_1
109+
```
110+
111+
**Please make sure c:\instantclient_12_1\vc10 comes before c:\instantclient_12_1**
112+

0 commit comments

Comments
 (0)