[root@localhost vagrant]# cd rlwrap-0.37/
[root@localhost rlwrap-0.37]# ll
total 384
-rw-rw-r-- 1 500 500 35029 Apr 30 2010 aclocal.m4
-rw-r--r-- 1 500 500 638 Aug 15 2006 AUTHORS
-rw-r--r-- 1 500 500 4267 May 5 2010 BUGS
-rw-r--r-- 1 500 500 105 Aug 9 2003 ChangeLog
drwxrwxr-x 2 500 500 38 May 5 2010 completions
-rw-rw-r-- 1 500 500 7042 Apr 30 2010 config.h.in
-rwxr-xr-x 1 500 500 222847 Apr 30 2010 configure
-rw-r--r-- 1 500 500 11521 Apr 30 2010 configure.ac
[root@localhost rlwrap-0.37]# ./configure && make && make install
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
##若出现报错终止:
1)
[root@s10 cacti]# ./configure
checking build system type... Invalid configuration `x86_64-unknown-linux-': machine `x86_64-unknown-linux' not recognized
configure: error: /bin/sh config/config.sub x86_64-unknown-linux- failed
解决:安装yum
yum install -y libtool*
然后将
/usr/share/libtool/config.sub
/usr/share/libtool/config.gues
复制到你当前要configure目录下
(比如你要装 mysql,进入解压后的文件夹进行如下操作:
cp /usr/share/libtool/config.sub .
cp /usr/share/libtool/config.guess . )
然后./configure --enable-shared --enable-static
2)
##若出现报错终止:
checking for getpt... yes
checking for pty/tty type... checking pty.h usability... yes
checking pty.h presence... yes
checking for pty.h... yes
OPENPTY
configure: checking for pty ranges...
checking for tgetent... no
checking for tgetent in -lcurses... no
checking for tgetent in -lncurses... no
checking for tgetent in -ltermcap... no
configure: WARNING: No termcap nor curses library found
checking for readline in -lreadline... no
configure: error:
You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build
this program!
解决:::
yum install readline-devel readline
再次进行安装:
[root@localhost rlwrap-0.37]# ./configure && make && make install
3.安装完成验证:
环境变量添加:
vi ~/.bash_profile
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias dgmgrl='rlwrap dgmgrl'
alias asmcmd='rlwrap asmcmd'
source ~/.bash_profile
[root@localhost rlwrap-0.37]# su - oracle
Last login: Fri Aug 18 02:13:54 UTC 2023 on pts/1
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Aug 18 02:20:19 2023
Version 19.16.1.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.16.1.0.0
SQL> show parameter name;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cdb_cluster_name string