如何在 Linux 中安装 SQL * PLUS 客户端 [英] How to install SQL * PLUS client in linux

查看:22
本文介绍了如何在 Linux 中安装 SQL * PLUS 客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发 AWS 服务.我有一个 ec2 ( centos ) 实例.我需要在这台 centos 机器上配置 SQL*Plus 客户端.

I am working on AWS services. I have an ec2 ( centos ) instance. I need to configure SQL*Plus client on this centos machine.

我要连接的服务器位于某个偏远地区.服务器版本为oracle-se(11.2.0.2)

The server with whom I want to connect is at some remote area. The server version is oracle-se(11.2.0.2)

请帮我在 centos 机器上安装客户端.

Kindly help me getting the client installed on the centos machine.

提前致谢.

推荐答案

转到 Oracle Linux x86-64 即时客户端 下载页面

Go to Oracle Linux x86-64 instant clients download page

下载匹配的客户端

oracle-instantclient11.2-basic-11.2.0.2.0.x86_64.rpm
oracle-instantclient11.2-sqlplus-11.2.0.2.0.x86_64.rpm

安装

rpm -ivh oracle-instantclient11.2-basic-11.2.0.2.0.x86_64.rpm
rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.2.0.x86_64.rpm

在你的 ~/.bash_profile

ORACLE_HOME=/usr/lib/oracle/11.2/client64
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_HOME
export LD_LIBRARY_PATH
export PATH

只需键入 source ~/.bash_profile(由 jbass 建议)或注销用户并再次登录,即可重新加载您的 .bash_profile.

Reload your .bash_profile by simply typing source ~/.bash_profile (suggested by jbass) or Log-out user and log-in again.

现在您已准备好使用 SQL*Plus 并连接您的服务器.输入:

Now you're ready to use SQL*Plus and connect your server. Type in :

sqlplus "username/pass@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.1)(PORT=1521))(CONNECT_DATA=(SID=YOURSID)))"

这篇关于如何在 Linux 中安装 SQL * PLUS 客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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