源码安装rlwrap 0.43(为了方便使用linux下的sqlplus)
为了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)的更多相关文章
- CentOS7源码安装Redis5.0.4非关系型数据库
源码安装redis-5.0.4 一. 下载redis 1. 需要连接网络 二. 案例(另一种安装方法) [root@localhost ~]# wget http://download.redis.i ...
- 源码安装 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 ...
- CentOS下源码安装vsftpd-3.0.0,并设置指定用户访问指定目录(附带完整配置文件)
1.卸载系统已经存在的ftp服务器 因为是源码安装,所以不能通过rpm -qa的方式查看是否已经安装ftp服务器,可以通过find / | grep vsftp*方式查看系统中存在哪些与vsftpd相 ...
- ubuntu16.04下源码安装onos1.0.2
由于工作需要,下载安装onos1.0.2的版本,大家看需求可以下载安装更高级的版本 参考链接:http://www.sdnlab.com/14650.html 1.系统环境 Ubuntu16.04 L ...
- Linux 6.8 源码安装MySQL8.0
搭建环境说明: 系统版本:Red Hat Enterprise Linux Server release 6.8 (Santiago) 内核版本:Linux 2.6.32-642.el6.x86_64 ...
- CentOS7.4 源码安装MySQL8.0
MySQL 8 正式版 8.0.11 已发布,官方表示 MySQL 8 要比 MySQL 5.7 快 2 倍,还带来了大量的改进和更快的性能! 以下为本人2018.4.23日安装过程的记录.整个过程大 ...
- 源码安装zabbix_agent4.0.3
1.源码包下载地址:https://www.zabbix.com/download_sources 2.下载完后上传在任意目录用root用户创建以下脚本server_ip为服务端ip然后执行. gro ...
- 简单说说Ubuntu利用bzr源码安装OpenERP7.0的操作步骤
1.修改Ubuntu国内更新源,具体方法自己baidu.google. 修改更新源后,更新系统 sudo apt-get update sudo apt-get upgrade 复制代码 2.安装Po ...
- centos7源码安装vim8.0
centos 6和7通过yum安装的vim版本仍为7.4,若想尝鲜,可获取源码包编译安装. 准备工作 1.检查vim旧版本,若已存在,将其卸载. $ vim$ yum remove vim* -y 2 ...
随机推荐
- zz京东电商推荐系统实践
挺实在 今天为大家分享下京东电商推荐系统实践方面的经验,主要包括: 简介 排序模块 实时更新 召回和首轮排序 实验平台 简介 说到推荐系统,最经典的就是协同过滤,上图是一个协同过滤的例子.协同过滤主要 ...
- C++——二维vector初始化大小方法
初始化二维vector,为r*c的vector,所有值为0.1.直接用初始化方法(刚开始没想到) vector<vector<int> > newOne(r, vector&l ...
- Jike_Time
数据分析全景图 1. 数据采集.它是我们的原材料,也是最“接地气”的部分,因为任何分析都要有数据源. 2. 数据挖掘.它可以说是最“高大上”的部分,也是整个商业价值所在.之所以要进行数据分析,就是要找 ...
- yum源加速,替换为阿里云镜像
问题 使用yum命令安装mysql时,发现下载速度很慢,于是决定换成阿里的yum源 解决方法 参考自:https://www.jianshu.com/p/b7cd2f9fb8b7 首先备份一下原先的y ...
- A1033 To Fill or Not to Fill (25 分)
一.技术总结 是贪心算法的题目,题目主要考虑的问题有几个,是否会在第一个加油站的最近距离大于0,如果是这样那么直接输出答案,因为初始油箱没有汽油: 第二个是如何选定加油站,如果在可到达距离范围类,我们 ...
- [POI2014]RAJ(最短路,拓扑排序)
对于一个点 \(x\) 如何求答案? 由于这个图是个有向无环图,可以先拓扑排序一遍,求出每个点的拓扑序,从起点到它的最长路 \(d2\),从它到终点的最长路 \(d1\).(我写代码是这么写的,注意顺 ...
- [LeetCode] 367. Valid Perfect Square 检验完全平方数
Given a positive integer num, write a function which returns True if num is a perfect square else Fa ...
- ZROI1153 【线上训练3】数个数
ZROI1153 [线上训练3]数个数 传送门 一道非常有意思的题,涵盖了各种知识点. 首先,很显然,这是个容斥.容斥可以过掉\(30pts\). 这里我们考虑容斥+DP. 我们令\(dp[i][j] ...
- Java一个简单的重试工具包
在接口调用中由于各种原因,可能会重置失败的任务,使用Guava-Retrying可以方便的实现重试功能. 首先,需要引用Guava-Retrying的包 <dependency> < ...
- 微软 Azure DevOps Server 2019 Update 1 (TFS 2019.1)
1.概述 微软在2019年5月发布Azure DevOps Server 2019后不到2个月的时间里,就快速准备好了第一个升级包(2019 Update 1),并计划在几周后发布正式版本.也许你还没 ...