After installing the Rlwrap package, modify the alias of the Sqlplus command
[[email protected] ~]$ vim. BASHRC
Alias sqlplus= ' Rlwrap sqlplus '
Alias sql= ' Rlwrap sqlplus '
Alias lsnrctl= ' Rlwrap lsnrctl '
Alias rman= ' Rlwrap Rman '
Login database cannot log on
[Email protected] ~]$ Sqlplus/as SYSDBA
Rlwrap:error while loading shared libraries:libreadline.so.5:cannot open Shared object file:no such file or directory
Libreadline.so.5 Library not found, need to install libreadline.so.5
Install library files
[email protected] packages]# Yum install compat-readline5-y
Log in to the database after installation
[Email protected] ~]$ Sqlplus/as SYSDBA
Rlwrap:error while loading shared libraries:libtermcap.so.2:cannot open Shared object file:no such file or directory
Missing libtermcap.so.2 Library, install COMPAT-LIBTERMCAP package:
[email protected] packages]# Yum install compat-libtermcap-y
After installation, log in again
[Email protected] packages]# su-oracle
[Email protected] ~]$ Sqlplus/as SYSDBA
Sql*plus:release 11.2.0.1.0 Production on Sun Nov 1 15:39:54 2015
Copyright (c) 1982, Oracle. All rights reserved.
Connected to an idle instance.
Sql>
Login successful
Rlwrap cannot be used after installation