在Mac OS/X上安装Oracle Instantclient而不设置环境变量? [英] installing Oracle Instantclient on Mac OS/X without setting environment variables?

查看:295
本文介绍了在Mac OS/X上安装Oracle Instantclient而不设置环境变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Oracle的说明指定设置DYLD_LIBRARY_PATH.这使我的应用程序依赖于随机用户的配置,并且设置起来非常麻烦.

Oracle's instructions specify setting DYLD_LIBRARY_PATH. This makes my application dependent on random users' configuration and is very troublesome to set up.

如何避免设置任何环境变量?

How can I avoid having to set any environment variables?

http://www.oracle.com /technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html

与Linux相关的说明:在Linux上安装Oracle Instantclient而不设置环境变量吗?

related note for linux: installing Oracle Instantclient on Linux without setting environment variables?

推荐答案

Oracle的InstantClient安装说明指定用户设置DYLD_LIBRARY_PATH.对于多个用户来说,这非常麻烦.

Oracle's instantclient installation instructions specify that the user set DYLD_LIBRARY_PATH. This is very troublesome to manage for multiple users.

要在不设置任何环境变量的情况下使用InstantClient:

To use the instantclient without setting any environment variables:

从oracle.com下载InstantClient发行版.为了进行非Java软件开发,您将需要(假设使用Oracle 10.2):

Download the instantclient distribution from oracle.com. For doing non-java software development, you will need (assuming Oracle 10.2):

instantclient-basic-macosx-10.2.0.4.0.zip
instantclient-sdk-macosx-10.2.0.4.0.zip
instantclient-sqlplus-macosx-10.2.0.4.0.zip

解压缩这三个文件.这会给你一个目录

Unzip the three files. This will give you a directory

instantclient_10_2/

将文件复制到/usr,这是动态加载程序搜索的默认位置之一.

Copy the files to /usr, which is one of the default places the dynamic loader searches.

sudo cp instantclient_10_2/sdk/include/*.h /usr/include
sudo cp instantclient_10_2/sqlplus         /usr/bin
sudo cp instantclient_10_2/*.dylib         /usr/lib

如果使用tnsnames.ora,请将其复制到/etc,这是oracle运行时搜索的默认全局位置.

If you use tnsnames.ora, copy it to /etc, which is the default global place the oracle runtime searches.

sudo cp tnsnames.ora /etc

测试

/usr/bin/sqlplus scott/tiger@myoracle

这篇关于在Mac OS/X上安装Oracle Instantclient而不设置环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆