为了linux下的sqlplus方便调用历史命令和退格,安装下rlwrap,最新版本是0.43,貌似作者已经不更新了

下载地址 https://fossies.org/linux/privat/rlwrap-0.43.tar.gz/

下载后winscp传入到linux上,然后安装

[root@localhost db]#ll|grep rlwrap
-rw-r--r--. 1 root root 313139 Jul 30 08:50 rlwrap-0.43.tar.gz
[root@localhost db]#tar -xzf rlwrap-0.43.tar.gz
[root@localhost db]#mv rlwrap-0.43 /usr/local/rlwrap
[root@localhost db]#cd /usr/local/rlwrap/
[root@localhost rlwrap]#./configure -q
configure: WARNING: No termcap nor curses library found
configure: error:
You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build
this program! [root@localhost rlwrap]#yum -yq install readline*
Loaded plugins: langpacks, ulninfo
Ignored option -q, -v, -d or -e (probably due to merging: -yq != -y -q)
Package readline-6.2-10.el7.x86_64 already installed and latest version
Resolving Dependencies (many more lines suppressed) Installed:
readline-devel.x86_64 0:6.2-10.el7 Dependency Installed:
ncurses-devel.x86_64 0:5.9-14.20130511.el7_4 Complete!
[root@localhost 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 [root@localhost 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@localhost rlwrap]#

添加一条别名sql到oracle用户的环境变量中并使之生效,测试后上下左右键在sqlplus中均良好使用,提升了一大截sqlplus中的代码体验

[oracle@localhost ~]$ cat .bashrc|grep sql
alias sql='rlwrap sqlplus / as sysdba'
[oracle@localhost ~]$ . .bashrc
[oracle@localhost ~]$ sql SQL*Plus: Release 11.2.0.1.0 Production on Tue Jul 30 09:41:05 2019 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 09:41:05 SYS@study> select 1 from dual; 1
----------
1 Elapsed: 00:00:00.00
09:41:11 SYS@study> select 1 from dual;

源码安装rlwrap 0.43(为了方便使用linux下的sqlplus)的更多相关文章

  1. CentOS7源码安装Redis5.0.4非关系型数据库

    源码安装redis-5.0.4 一. 下载redis 1. 需要连接网络 二. 案例(另一种安装方法) [root@localhost ~]# wget http://download.redis.i ...

  2. 源码安装 qemu-2.0.0 及其依赖 glib-2.12.12

    源码安装qemu-2.0.0 下载源代码并解压 http://wiki.qemu-project.org/download/qemu-2.0.0.tar.bz2 .tar.gz 编译及安装: cd q ...

  3. CentOS下源码安装vsftpd-3.0.0,并设置指定用户访问指定目录(附带完整配置文件)

    1.卸载系统已经存在的ftp服务器 因为是源码安装,所以不能通过rpm -qa的方式查看是否已经安装ftp服务器,可以通过find / | grep vsftp*方式查看系统中存在哪些与vsftpd相 ...

  4. ubuntu16.04下源码安装onos1.0.2

    由于工作需要,下载安装onos1.0.2的版本,大家看需求可以下载安装更高级的版本 参考链接:http://www.sdnlab.com/14650.html 1.系统环境 Ubuntu16.04 L ...

  5. Linux 6.8 源码安装MySQL8.0

    搭建环境说明: 系统版本:Red Hat Enterprise Linux Server release 6.8 (Santiago) 内核版本:Linux 2.6.32-642.el6.x86_64 ...

  6. CentOS7.4 源码安装MySQL8.0

    MySQL 8 正式版 8.0.11 已发布,官方表示 MySQL 8 要比 MySQL 5.7 快 2 倍,还带来了大量的改进和更快的性能! 以下为本人2018.4.23日安装过程的记录.整个过程大 ...

  7. 源码安装zabbix_agent4.0.3

    1.源码包下载地址:https://www.zabbix.com/download_sources 2.下载完后上传在任意目录用root用户创建以下脚本server_ip为服务端ip然后执行. gro ...

  8. 简单说说Ubuntu利用bzr源码安装OpenERP7.0的操作步骤

    1.修改Ubuntu国内更新源,具体方法自己baidu.google. 修改更新源后,更新系统 sudo apt-get update sudo apt-get upgrade 复制代码 2.安装Po ...

  9. centos7源码安装vim8.0

    centos 6和7通过yum安装的vim版本仍为7.4,若想尝鲜,可获取源码包编译安装. 准备工作 1.检查vim旧版本,若已存在,将其卸载. $ vim$ yum remove vim* -y 2 ...

随机推荐

  1. SQL Server 迁移数据库 (二)分离和附加

    分离和附加其实比导入和导出,步骤要少一些,但是数据量大的话,跨服务器拷贝数据文件可能要慢一些 1. 分离数据库 这里最好选择断开链接,断开之前要确保你记得数据库的路径,一般默认都是C:\Program ...

  2. 数据结构——链栈(link stack)

    /* linkStack.c */ /* 链栈 */ #include <stdio.h> #include <stdlib.h> #include <stdbool.h ...

  3. springcloud2.x之management.security.enabled=false报错处理

    1. springcloud1.5.x的消息总线配置是 # RabbitMq的地址.端口,用户名.密码 spring.rabbitmq.host=localhost spring.rabbitmq.p ...

  4. CSP-S 2019 简要题解

    从这里开始 又考炸了,sad.....明年应该在准备高考了,考完把坑填了好了. 一半题都被卡常,qswl.[我汤姆要报警.jpg] dfs 怎么这么慢呀,sad..... i7 牛逼! 写的比较混乱, ...

  5. leetcode 903. DI序列的有效排列

    题目描述: 我们给出 S,一个源于 {'D', 'I'} 的长度为 n 的字符串 .(这些字母代表 “减少” 和 “增加”.)有效排列 是对整数 {0, 1, ..., n} 的一个排列 P[0], ...

  6. HTML连载27-层叠性&优先级&!important用法

    一.层叠性 1.定义:CSS处理冲突的一种能力 2.注意点:层叠性只有在多个选择器中“同一标签”,然后又设置了“相同的属性”,才会发生层叠性 3.CSS缩写:Cascading StyleSheet ...

  7. C++:const

    const const是C++提供的一个强大的关键字,const的用法非常多,但总的来说,const的作用只有一个:保证被修饰的内容不会被程序所修改. const基本用法 对一个类型的对象使用cons ...

  8. pytorch tutorial 2

    这里使用pytorch进行一个简单的二分类模型 导入所有我们需要的库 import torch import matplotlib.pyplot as plt import torch.nn.func ...

  9. for循环居然还可以这样写

    公司代码有点坑,查找问题,发现for循环的写法不是固定条件在中间,写反了也是可以运行的.比如:下面一个简单的for循环 int m=0; for(int i=0;i>3;i++){ m=m+i; ...

  10. linux下c++如何输入不回显

    #include <stdio.h> #include <termios.h> #include <unistd.h> #include <iostream& ...