installing Oracle Instantclient on Mac OS/X without setting environment variables?(在 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.
在不设置任何环境变量的情况下使用即时客户端:
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 而不设置环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Mac OS/X 上安装 Oracle Instantclient 而不设置环境变量?
基础教程推荐
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- 在 SQL 中连接多个表 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- 无法解决整理冲突 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
