mac下安装oracle客户端
下载 并解压后,
拷贝到/Library/OracleClient/instantclient(也可以其他目录)
- cd ~
- vi .bash_profile 修改环境变量
export ORACLE_HOME=/library/OracleClient/instantclient
export DYLD_LIBRARY_PATH=$ORACLE_HOME
export TNS_ADMIN=$ORACLE_HOME/network/admin
export SQLPATH=$ORACLE_HOME
export PATH=$PATH:$ORACLE_HOME
说明: 记得把tns文件拷贝到/Library/OracleClient/instantclient/network/admin
- Source .bash_profie
注:还是报错,后来又参考了官网上的说明,不过我下载的是10.2的版本,所以下面的命令的版本号要改一下
3. Create the appropriate libclntsh.dylib link for the version of Instant Client. For example:
cd ~/instantclient_12_1
ln -s libclntsh.dylib.12.1 libclntsh.dylib
Note: OCCI programs will additionally need:
ln -s libocci.dylib.12.1 libocci.dylib