当前位置:网站首页>Linux database Oracle client installation, used for shell scripts to connect to the database with sqlplus
Linux database Oracle client installation, used for shell scripts to connect to the database with sqlplus
2022-08-10 05:46:00 【DOCKER007】
Linux environment: Redhat6.8 64bit
Oracle: Oracle 11.2.0.4 IP=192.168.*.208
Client Environment: Linux Redhat6.8 IP=192.168.*.186
Requirements: Now you need to use shell script on the client to monitor system process, CPU and other information, and write the monitoring information to the database, you need to connect to the database, butThe client does not have a database environment and needs to connect to the database remotely to write data
Download the installation package on oracle official website, download address:
Download and upload the installation package:
oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm (required)
oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm (required)
oracle-instantclient11.2-jdbc-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-tools-11.2.0.4.0-1.x86_64.rpm
Run the install command:
rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
Rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
Configure environment variables:
vim /etc/profile
export NLS_LANG="AMERICAN_AMERICA.UTF8"
export ORACLE_HOME=/usr/lib/oracle/11.2/client64
export TNS_ADMIN=$ORACLE_HOME
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
source /etc/profile
Check the sqlplus command:
Enter sqlplus If "command not found" appears, it is an environment variable setting problem, please confirm
Login to database: sqlplus user/[email protected]:/1521/SID
Connection succeeded
边栏推荐
猜你喜欢
链读推荐:从瓷砖到生成式 NFT
图纸怎么折?(A0,A1,A2,A3の图纸如何折成A4大小)
pytorch框架学习(1)网络的简单构建
One step ahead, don't miss it again, the chain reading APP will be launched soon!
链读好文:热加密存储与冷加密存储有什么区别?
Pony语言学习(一):环境配置(续)
ORACLE system table space SYSTEM is full and cannot expand table space problem solving process
链读精选:星巴克着眼于数字收藏品并更好地吸引客户
文章复现:超分辨率网络FSRCNN
CSDN Markdown 之我见代码块 | CSDN编辑器测评
随机推荐
视图【】【】【】【】
深度学习模型训练前的必做工作:总览模型信息
使用Google Protobuf 在 Matlab 中工作
cesium 旋转图片
小程序学习笔记:小程序组件间通信方式
opencv
scikit-learn机器学习 读书笔记(二)
网络安全5
链读好文:Jeff Garzik 推出 Web3 制作公司
最新最全的数字藏品发售日历-07.27
非会员更改有道云笔记背景
链读精选:星巴克着眼于数字收藏品并更好地吸引客户
网安超基础一周目
再肝3天,整理了90个 NumPy 例子,不能不收藏!
智能合约和去中心化应用DAPP
el-dropdown下拉菜单样式修改,去掉小三角
PCL,VS配置过程中出现:用 _sopen_s 代替 _open, 或用_CRT_SECURE_NO_WARNNINGS错误
k-近邻实现手写数字识别
基于Qiskit——《量子计算编程实战》读书笔记(五)
行盒子的盒模型