Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5762049
  • 博文数量: 675
  • 博客积分: 20301
  • 博客等级: 上将
  • 技术积分: 7671
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-31 16:15
文章分类

全部博文(675)

文章存档

2012年(1)

2011年(20)

2010年(14)

2009年(63)

2008年(118)

2007年(141)

2006年(318)

分类: LINUX

2008-12-22 20:04:54

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) |
给主人留下些什么吧!~~