zoukankan      html  css  js  c++  java
  • linux上下键,rlwrap来解决

    需要安装两个包
    1.readline,配置好yum直接安装
    [root@test152 ~]# yum install readline*
    2.rlwrap
    这个下载连接当前有效,找了很多没找到有用的
    https://files-cdn.cnblogs.com/files/killkill/rlwrap-0.30.tar.gz.zip

    或者 

    wget http://utopia.knoware.nl/~hlub/rlwrap/rlwrap-0.37.tar.gz


    [root@test152 ~]# tar -zxvf rlwrap-0.30.tar.gz.zip
    [root@test152 ~]# cd rlwrap-0.30
    [root@test152 rlwrap-0.30]# ./configure
    ...
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating doc/Makefile
    config.status: creating src/Makefile
    config.status: creating doc/rlwrap.man
    config.status: creating distribution/rlwrap.spec
    config.status: creating config.h
    config.status: executing depfiles commands

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

    [root@test152 rlwrap-0.30]# make
    make all-recursive
    make[1]: Entering directory `/root/rlwrap-0.30'
    Making all in doc
    make[2]: Entering directory `/root/rlwrap-0.30/doc'
    sed -e 's#@DATADIR@#/usr/local/share#' rlwrap.man > rlwrap.1
    make[2]: Leaving directory `/root/rlwrap-0.30/doc'
    Making all in src
    make[2]: Entering directory `/root/rlwrap-0.30/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 -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 -lutil -lreadline -lcurses
    make[2]: Leaving directory `/root/rlwrap-0.30/src'
    make[2]: Entering directory `/root/rlwrap-0.30'
    make[2]: Leaving directory `/root/rlwrap-0.30'
    make[1]: Leaving directory `/root/rlwrap-0.30'
    [root@test152 rlwrap-0.30]# make check
    Making check in doc
    make[1]: Entering directory `/root/rlwrap-0.30/doc'
    make[1]: Nothing to be done for `check'.
    make[1]: Leaving directory `/root/rlwrap-0.30/doc'
    Making check in src
    make[1]: Entering directory `/root/rlwrap-0.30/src'
    make[1]: Nothing to be done for `check'.
    make[1]: Leaving directory `/root/rlwrap-0.30/src'
    make[1]: Entering directory `/root/rlwrap-0.30'
    make check-TESTS
    make[2]: Entering directory `/root/rlwrap-0.30'


    *****************************************************************************
    * *
    * Testing rlwrap from within "make" causes problems with signal handling *
    * therefore, you should do it by hand: *
    * $ src/rlwrap perl test/testclient *
    * *
    *****************************************************************************


    PASS: test/testit
    ==================
    All 1 tests passed
    ==================
    make[2]: Leaving directory `/root/rlwrap-0.30'
    make[1]: Leaving directory `/root/rlwrap-0.30'
    [root@test152 rlwrap-0.30]# make install
    Making install in doc
    make[1]: Entering directory `/root/rlwrap-0.30/doc'
    make[2]: Entering directory `/root/rlwrap-0.30/doc'
    make[2]: Nothing to be done for `install-exec-am'.
    test -z "/usr/local/share/man/man1" || /bin/mkdir -p "/usr/local/share/man/man1"
    /usr/bin/install -c -m 644 './rlwrap.1' '/usr/local/share/man/man1/rlwrap.1'
    make[2]: Leaving directory `/root/rlwrap-0.30/doc'
    make[1]: Leaving directory `/root/rlwrap-0.30/doc'
    Making install in src
    make[1]: Entering directory `/root/rlwrap-0.30/src'
    make[2]: Entering directory `/root/rlwrap-0.30/src'
    test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
    /usr/bin/install -c 'rlwrap' '/usr/local/bin/rlwrap'
    make[2]: Nothing to be done for `install-data-am'.
    make[2]: Leaving directory `/root/rlwrap-0.30/src'
    make[1]: Leaving directory `/root/rlwrap-0.30/src'
    make[1]: Entering directory `/root/rlwrap-0.30'
    make[2]: Entering directory `/root/rlwrap-0.30'
    make[2]: Nothing to be done for `install-exec-am'.
    test -z "/usr/local/share/rlwrap" || /bin/mkdir -p "/usr/local/share/rlwrap"
    /usr/bin/install -c -m 644 'completions/ftp' '/usr/local/share/rlwrap/ftp'
    /usr/bin/install -c -m 644 'completions/testclient' '/usr/local/share/rlwrap/testclient'
    /usr/bin/install -c -m 644 'completions/coqtop' '/usr/local/share/rlwrap/coqtop'
    make[2]: Leaving directory `/root/rlwrap-0.30'
    make[1]: Leaving directory `/root/rlwrap-0.30'

    [root@test152 ~]# su - oracle
    [oracle@test152 ~]$ vi .bash_profile
    ...
    alias sqlplus='rlwrap sqlplus'
    alias rman='rlwrap rman'

    [oracle@test152 ~]$ source .bash_profile
    然后,可以上下翻浪了

  • 相关阅读:
    #什么是spring#
    spark sql 判断一列是否包含某字符
    win10 安装微软商店
    python获取一段时间的日期
    css 网格
    css 网格属性总结
    css flex容器属性总结
    CSS Flexbox
    响应式Web设计
    css 伪类选择器
  • 原文地址:https://www.cnblogs.com/ritchy/p/10930948.html
Copyright © 2011-2022 走看看