首先,mint,没有装Oracle的Server
$ uname -a
Linux somedargon-K45VD 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
下载Oracle Clinet rpm包
https://help.ubuntu.com/community/Oracle%20Instant%20Client
Convert these .rpm files into .deb packages and install using “alien” (“sudo apt-get install alien” if you don’t have it):
alien -i oracle-instantclient-basic*.rpm
alien -i oracle-instantclient-sqlplus*.rpm
alien -i oracle-instantclient-devel*.rpm
然后,设置 ldconfig
sudo vi /etc/ld.so.conf.d/oracle.conf
and add the oracle library path as the first line. For example,
/usr/lib/oracle/12.1/client64/lib/
Then run ldconfig:
sudo ldconfig
这时,执行sqlplus就不报缺少*.o的错误了。
sudo vim /etc/profile
插入
export ORACLE_HOME=/usr/lib/oracle/12.1/client64
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
执行
source /etc/profile
登陆
sqlplus sys/password@ip/orcl as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Mon Oct 19 12:19:07 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options