当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
速刷正则表达式一周目(上)
基本比例尺标准分幅编号流程
用Pytorch从0到1实现逻辑回归
error in ./node_modules/cesium/Source/ThirdParty/zip.js
转载fstream,ifstream的详细用法
【格式转换】将JPEG图片批量处理为jpg格式
redis常见的面试题
关于cfar检测的学习及仿真
第十天作业
几种绘制时间线图的方法
win12 修改dns脚本
链读|最新最全的数字藏品发售日历-07.29
知识蒸馏论文学习
多表查询 笔记
连接 Nacos 报超时错误
操作表 函数的使用
Qiskit 学习笔记2
el-cascader级联选择器的子菜单双击两次才显示被选中的内容
PCL点云滤波
tinymce富文本编辑器