安装下rlwrap,最新版本是0.43
下载地址 https://fossies.org/linux/privat/rlwrap-0.43.tar.gz/
```
安装rlwrap
tar -zxvf rlwrap-0.43.tar.gz
[root@openguess soft]# ll
total 298864
-rw------- 1 omm dbgrp 1234 Apr 8 10:30 cluster_config_opendb.xml
drwx------. 15 root root 4096 Apr 8 10:32 lib
drwxr-xr-x. 4 omm dbgrp 30 Apr 8 10:32 openGauss
-r--------. 1 root root 101382908 Apr 7 15:39 openGauss-2.0.0-CentOS-64bit-all.tar.gz
-r--------. 1 root root 65 Mar 31 21:16 openGauss-2.0.0-CentOS-64bit-om.sha256
-r--------. 1 root root 12646330 Mar 31 21:16 openGauss-2.0.0-CentOS-64bit-om.tar.gz
-r--------. 1 root root 65 Mar 31 21:16 openGauss-2.0.0-CentOS-64bit.sha256
-r--------. 1 root root 89573052 Mar 31 21:16 openGauss-2.0.0-CentOS-64bit.tar.bz2
-r-------- 1 root root 101944654 Apr 8 10:32 openGauss-Package-bak_78689da9.tar.gz
drwxrwxr-x 8 asas asas 323 Mar 3 2017 rlwrap-0.43
-rw-r--r-- 1 root root 313139 Jul 24 2020 rlwrap-0.43.tar.gz
drwx------. 6 root root 4096 Mar 31 21:16 script
drwxr-xr-x. 2 root root 4096 Mar 31 21:16 simpleInstall
-r--------. 1 root root 65 Mar 31 21:15 upgrade_sql.sha256
-r--------. 1 root root 133704 Mar 31 21:15 upgrade_sql.tar.gz
-r-------- 1 root root 32 Mar 31 21:14 version.cfg
[root@openguess soft]# mv rlwrap-0.43 /usr/local/rlwrap
[root@openguess soft]# cd /usr/local/rlwrap/
[root@openguess rlwrap]# ll
total 448
-rw-rw-r-- 1 asas asas 42141 Mar 3 2017 aclocal.m4
-rw-rw-r-- 1 asas asas 910 Mar 2 2017 AUTHORS
-rw-rw-r-- 1 asas asas 2965 Aug 30 2016 BUGS
-rw-rw-r-- 1 asas asas 105 Aug 30 2016 ChangeLog
drwxrwxr-x 2 asas asas 38 Mar 3 2017 completions
-rw-rw-r-- 1 asas asas 8682 Mar 3 2017 config.h.in
-rwxrwxr-x 1 asas asas 250121 Mar 3 2017 configure
-rw-rw-r-- 1 asas asas 18451 Mar 3 2017 configure.ac
-rw-rw-r-- 1 asas asas 17992 Aug 30 2016 COPYING
drwxrwxr-x 2 asas asas 65 Mar 3 2017 doc
drwxrwxr-x 2 asas asas 4096 Mar 3 2017 filters
-rw-rw-r-- 1 asas asas 4083 Feb 13 2017 INSTALL
-rw-rw-r-- 1 asas asas 1838 Feb 26 2017 Makefile.am
-rw-rw-r-- 1 asas asas 41793 Mar 3 2017 Makefile.in
-rw-rw-r-- 1 asas asas 22209 Mar 2 2017 NEWS
-rw-rw-r-- 1 asas asas 1398 Feb 12 2017 PLEA
-rw-rw-r-- 1 asas asas 3113 Jan 30 2017 README
drwxrwxr-x 2 asas asas 308 Mar 3 2017 src
drwxrwxr-x 2 asas asas 38 Mar 3 2017 test
-rw-rw-r-- 1 asas asas 236 Sep 4 2016 TODO
drwxrwxr-x 2 asas asas 126 Mar 3 2017 tools

[root@openguess rlwrap]# ./configure -q
Will rlwrap find command's working directory under /proc/<commands pid>/cwd? let's see...

Now do:
make (or gmake) to build rlwrap
make check for instructions how to test it
make install to install it

```
注意linux7 最小安装会报
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 -y 就可以

```
make && make install
```

[root@openguess rlwrap]# make && make install
make all-recursive
make[1]: Entering directory `/usr/local/rlwrap'
Making all in doc
make[2]: Entering directory `/usr/local/rlwrap/doc'
sed -e 's#@DATADIR@#/usr/local/share#' rlwrap.man > rlwrap.1
make[2]: Leaving directory `/usr/local/rlwrap/doc'
Making all in src
make[2]: Entering directory `/usr/local/rlwrap/src'
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT signals.o -MD -MP -MF .deps/signals.Tpo -c -o signals.o signals.c
mv -f .deps/signals.Tpo .deps/signals.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT readline.o -MD -MP -MF .deps/readline.Tpo -c -o readline.o readline.c
mv -f .deps/readline.Tpo .deps/readline.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT pty.o -MD -MP -MF .deps/pty.Tpo -c -o pty.o pty.c
mv -f .deps/pty.Tpo .deps/pty.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT completion.o -MD -MP -MF .deps/completion.Tpo -c -o completion.o completion.c
mv -f .deps/completion.Tpo .deps/completion.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT term.o -MD -MP -MF .deps/term.Tpo -c -o term.o term.c
mv -f .deps/term.Tpo .deps/term.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT ptytty.o -MD -MP -MF .deps/ptytty.Tpo -c -o ptytty.o ptytty.c
mv -f .deps/ptytty.Tpo .deps/ptytty.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c
mv -f .deps/utils.Tpo .deps/utils.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT string_utils.o -MD -MP -MF .deps/string_utils.Tpo -c -o string_utils.o string_utils.c
mv -f .deps/string_utils.Tpo .deps/string_utils.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT malloc_debug.o -MD -MP -MF .deps/malloc_debug.Tpo -c -o malloc_debug.o malloc_debug.c
mv -f .deps/malloc_debug.Tpo .deps/malloc_debug.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT filter.o -MD -MP -MF .deps/filter.Tpo -c -o filter.o filter.c
mv -f .deps/filter.Tpo .deps/filter.Po
gcc -DDATADIR=\"/usr/local/share\" -g -O2 -o rlwrap main.o signals.o readline.o pty.o completion.o term.o ptytty.o utils.o string_utils.o malloc_debug.o filter.o -lutil -lreadline -ltinfo
make[2]: Leaving directory `/usr/local/rlwrap/src'
Making all in filters
make[2]: Entering directory `/usr/local/rlwrap/filters'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/rlwrap/filters'
make[2]: Entering directory `/usr/local/rlwrap'
make[2]: Leaving directory `/usr/local/rlwrap'
make[1]: Leaving directory `/usr/local/rlwrap'
Making install in doc
make[1]: Entering directory `/usr/local/rlwrap/doc'
make[2]: Entering directory `/usr/local/rlwrap/doc'
make[2]: Nothing to be done for `install-exec-am'.
/usr/bin/mkdir -p '/usr/local/share/man/man1'
/usr/bin/install -c -m 644 rlwrap.1 '/usr/local/share/man/man1'
make[2]: Leaving directory `/usr/local/rlwrap/doc'
make[1]: Leaving directory `/usr/local/rlwrap/doc'
Making install in src
make[1]: Entering directory `/usr/local/rlwrap/src'
make[2]: Entering directory `/usr/local/rlwrap/src'
/usr/bin/mkdir -p '/usr/local/bin'
/usr/bin/install -c rlwrap '/usr/local/bin'
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/usr/local/rlwrap/src'
make[1]: Leaving directory `/usr/local/rlwrap/src'
Making install in filters
make[1]: Entering directory `/usr/local/rlwrap/filters'
make[2]: Entering directory `/usr/local/rlwrap/filters'
make[2]: Nothing to be done for `install-exec-am'.
/usr/bin/mkdir -p '/usr/local/share/man/man3'
/usr/bin/install -c -m 644 RlwrapFilter.3pm '/usr/local/share/man/man3'
make[2]: Leaving directory `/usr/local/rlwrap/filters'
make[1]: Leaving directory `/usr/local/rlwrap/filters'
make[1]: Entering directory `/usr/local/rlwrap'
make[2]: Entering directory `/usr/local/rlwrap'
make[2]: Nothing to be done for `install-exec-am'.
/usr/bin/mkdir -p '/usr/local/share/rlwrap'
/usr/bin/mkdir -p '/usr/local/share/rlwrap/filters'
/usr/bin/install -c -m 644 filters/README filters/RlwrapFilter.pm filters/RlwrapFilter.3pm filters/count_in_prompt filters/pipeto filters/logger filters/null filters/unbackspace filters/pipeline filters/ftp_filter filters/handle_hotkeys filters/history_format filters/simple_macro filters/template filters/scrub_prompt filters/paint_prompt filters/censor_passwords filters/listing filters/paint_prompt.py filters/handle_hotkeys.py filters/logger.py filters/pipeto.py filters/rlwrapfilter.py filters/null.py filters/censor_passwords.py filters/count_in_prompt.py filters/ftp_filter.py '/usr/local/share/rlwrap/filters'
/usr/bin/mkdir -p '/usr/local/share/rlwrap/completions'
/usr/bin/install -c -m 644 completions/testclient completions/coqtop '/usr/local/share/rlwrap/completions'
make install-data-hook
make[3]: Entering directory `/usr/local/rlwrap'
chmod a+x /usr/local/share/rlwrap/filters/*
make[3]: Leaving directory `/usr/local/rlwrap'
make[2]: Leaving directory `/usr/local/rlwrap'
make[1]: Leaving directory `/usr/local/rlwrap'
[root@openguess rlwrap]#
```
添加环境变量
```
su - omm
vi .bashrc
alias gsql='rlwrap gsql'

```

最新文章

  1. centos
  2. objective-c UITableview 自定义滑操(原创)
  3. Sql Server之旅——第四站 你必须知道的非聚集索引扫描
  4. [codeforces 528]A. Glass Carving
  5. 一些Linux的路径
  6. Linq to sql 实现多条件的动态查询(方法一)
  7. The first to Python
  8. 转 Linux进程状态分析
  9. 201521123023《java程序设计》第三周学习总结
  10. 01_JNI是什么,为什么使用,怎么用JNI,Cygwin环境变量配置,NDK案例(使用Java调用C代码),javah命令使用
  11. Java基础知识回顾之六 ----- IO流
  12. mysql MHA扩展haproxy搭建从库只读负载均衡
  13. CocoaLumberjack——带颜色的Log
  14. Docker安装nexus
  15. 在linux下安装并配置mysql数据库
  16. Linux Crontab及使用salt进行管理
  17. java生成txt文件,读txt文件
  18. 如何写好一篇高质量的IEEE/ACM Transaction级别的计算机科学论文?
  19. 银联卡中关于CVN/CVN2/ICVN的区别
  20. Android 6.0 7.0 8.0 一个简单的app内更新版本-okgo app版本更新

热门文章

  1. django框架(部分讲解)
  2. 使用 BenchmarkDotNet 比较指定容量的 List 的性能
  3. [python] CairoSVG使用教程
  4. 数论专项复习(一)扩展欧几里得算法(exgcd)
  5. AtCoder Regular Contest 148 A - mod M
  6. vue-echarts数据可视化实现自适应屏幕进行缩放,这个我写了两篇文章,一个用了vue-echarts,一个直接用的charts ,我可真机智 啊~~~
  7. 不止ChatGPT,谷歌云 AI 方案早已厉兵秣马!
  8. ATM+购物车功能
  9. 常见非指纹built-in函数
  10. 1月9日内容总结——linux相关知识简介、虚拟化软件vmware、远程链接工具xshell