Linux (Debian) 安装 Sqlplus 工具

  1. 下载 依赖软件 下载页链接 https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
wget https://download.oracle.com/otn_software/linux/instantclient/215000/instantclient-basiclite-linux.x64-21.5.0.0.0dbru.zip
wget https://download.oracle.com/otn_software/linux/instantclient/215000/instantclient-sqlplus-linux.x64-21.5.0.0.0dbru.zip
  1. 解压移动所有文件到目录 /usr/local/sqlplus
unzip instantclient-basiclite-linux.x64-21.5.0.0.0dbru.zip -d /usr/local
unzip instantclient-sqlplus-linux.x64-21.5.0.0.0dbru.zip -d /usr/local
mv /usr/local/instantclient_21_5 /usr/local/sqlplus
cd /usr/local/sqlplus
mkdir lib
mv *.so* lib
chmod +x sqlplus
ln -s /usr/local/sqlplus/sqlplus /usr/local/bin/sqlplus

设置环境变量

.bash_profile
加入

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/sqlplus/lib

使生效

source .bash_profile
  1. 执行测试
root@deb10:~# sqlplus /nolog

SQL*Plus: Release 21.0.0.0.0 - Production on Tue Feb 22 10:44:55 2022
Version 21.5.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.

SQL> conn system/szoscar55@10.1.1.66:1521/ora
Connected.
SQL> 
上一篇:PVE安装更新源错误


下一篇:debian版本下载指南