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
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
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>