当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
图片批量添加水印批量缩放图片到指定大小
GtkD开发之路
AWR1843型号毫米波雷达使用
Minio分布式存储系统
pytest测试框架
网络安全6
反转链表中的第m至第n个节点---leetcode
el-dropdown下拉菜单样式修改,去掉小三角
Ten years of sharpening a sword!The digital collection market software, Link Reading APP is officially open for internal testing!
清览题库--C语言程序设计第五版编程题解析(1)
最新最全的数字藏品发售日历-07.26
PCL点云配准--ICP or keypoints+features
redis集群模式
图片批量添加水印批量加背景缩放批量合并工具picUnionV4.0
在yolov5的网络结构中添加注意力机制模块
CSDN Markdown 之我见代码块 | CSDN编辑器测评
基于Qiskit——《量子计算编程实战》读书笔记(一)
训练集Loss收敛,但是测试集Loss震荡的厉害?
WSTP初体验
私有化搭建个人网盘 NextCloud









