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中,如何为每个组选择前2行 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 更改自动增量起始编号? 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- SQL 临时表问题 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01