Oracle Instant Client Install On Ubuntu 8.10 Guide
by WangYao(wangyao@pact518)
08-12-22
1. Download oracle client
oracle-instantclient11.1-basic-11.1.0.7.0-1.i386.rpm
oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm
oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm
2. Install alien
#apt-get install alien
3. Create deb package
#alien -k Oracle-instantclient11.1-basic-11.1.0.7.0-1.i386.rpm
#alien -k Oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm
#alien -k Oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm
4. Install deb package
#dpkg -i oracle-instantclient11.1-basic_11.1.0.7.0-1_i386.deb
#dpkg -i oracle-instantclient11.1-devel_11.1.0.7.0-1_i386.deb
#dpkg -i oracle-instantclient11.1-sqlplus_11.1.0.7.0-1_i386.deb
5. Modify Some System Configs
1> Create /etc/oracle directory
This directory as this is where we will store Oracle configuration files.
Get a copy tnsnames.ora to this directory
Should be:
---------------------------------------------------------------------------
RCL.EXAMPLE.BE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.30.1.100)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA.EXAMPLE.BE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = HOSTNAME)(PORT = 1521))
)
(CONNECT_DATA =
(SID = PLSExtProc)
)
)
---------------------------------------------------------------------------
2> vi /etc/profile.d/oracle.sh
Add lines to the file:
export TNS_ADMIN=/etc/oracle/
export SQLPATH=/usr/lib/oracle/11.1/client/bin/
export LD_LIBRARY_PATH=/usr/lib/oracle/11.1/client/lib/:$LD_LIBRARY_PATH
export PATH=$PATH:$SQLPATH
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
*NOTES:
1>path should go with the oracle path on your system
2>for c++ developer TNS_ADMIN can be no set, also can not create /etc/oracle directory, copy tnsnames.ora to the directory
Reference:
http://www.gena01.com/forum/gena01_blog/installing_oracle_instant_client_11g_and_pecl_oci8-t193.0.html
http://rogerw.spaces.live.com/blog/cns!F8BE949E440133B!483.entry
阅读(4346) | 评论(0) | 转发(0) |