当前位置: 首页 > 工具软件 > rlwrap > 使用案例 >

安装rlwrap-0.37.tar.gz

微生博简
2023-12-01

rlwrap包依赖于readline-devel

yum -y install readline-devel
[root@lmm ~]# yum -y install readline-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package readline-devel.x86_64 0:6.2-10.el7 will be installed
--> Processing Dependency: ncurses-devel for package: readline-devel-6.2-10.el7.x86_64
--> Running transaction check
---> Package ncurses-devel.x86_64 0:5.9-14.20130511.el7_4 will be installed
--> Finished Dependency Resolution
................

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@lmm tmp]# tar -zxvf rlwrap-0.37.tar.gz
rlwrap-0.37/
rlwrap-0.37/completions/
rlwrap-0.37/completions/testclient
rlwrap-0.37/completions/coqtop
rlwrap-0.37/doc/
rlwrap-0.37/doc/rlwrap.man.in
rlwrap-0.37/doc/Makefile.am
rlwrap-0.37/doc/Makefile.in
rlwrap-0.37/filters/
rlwrap-0.37/filters/README
rlwrap-0.37/filters/RlwrapFilter.pm
rlwrap-0.37/filters/RlwrapFilter.3pm
rlwrap-0.37/filters/count_in_prompt
rlwrap-0.37/filters/pipeto
rlwrap-0.37/filters/logger
................

rlwrap-0.37/ChangeLog
rlwrap-0.37/INSTALL
rlwrap-0.37/NEWS
rlwrap-0.37/TODO
rlwrap-0.37/BUGS
rlwrap-0.37/PLEA

进入文件

[root@lmm tmp]# cd rlwrap-0.37

检查配置

[root@lmm rlwrap-0.37]# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking whether build environment is sane... yes
checking for style of include used by make... GNU
checking for gcc... gcc
....................

checking whether your readline knows about rl_variable_value... yes
checking whether your readline knows about rl_readline_version... yes
Will rlwrap find command's working directory under /proc/<commands pid>/cwd? let's see...
checking for /proc/89247/cwd/configure.ac... yes


configure: creating ./config.status
config.status: creating Makefile
config.status: creating filters/Makefile
config.status: creating doc/Makefile
config.status: creating src/Makefile
config.status: creating doc/rlwrap.man
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@lmm rlwrap-0.37]# make
make  all-recursive
make[1]: Entering directory `/tmp/rlwrap-0.37'
Making all in doc
make[2]: Entering directory `/tmp/rlwrap-0.37/doc'
sed -e 's#@DATADIR@#/usr/local/share#'  rlwrap.man > rlwrap.1
make[2]: Leaving directory `/tmp/rlwrap-0.37/doc'
Making all in src
make[2]: Entering directory `/tmp/rlwrap-0.37/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/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 -lcurses
make[2]: Leaving directory `/tmp/rlwrap-0.37/src'
Making all in filters
make[2]: Entering directory `/tmp/rlwrap-0.37/filters'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/rlwrap-0.37/filters'
make[2]: Entering directory `/tmp/rlwrap-0.37'
make[2]: Leaving directory `/tmp/rlwrap-0.37'
make[1]: Leaving directory `/tmp/rlwrap-0.37'

安装

[root@lmm rlwrap-0.37]# make install
Making install in doc
make[1]: Entering directory `/tmp/rlwrap-0.37/doc'
make[2]: Entering directory `/tmp/rlwrap-0.37/doc'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/share/man/man1" || /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 `/tmp/rlwrap-0.37/doc'
make[1]: Leaving directory `/tmp/rlwrap-0.37/doc'
Making install in src
...............................

/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 `/tmp/rlwrap-0.37'
chmod a+x /usr/local/share/rlwrap/filters/*
make[3]: Leaving directory `/tmp/rlwrap-0.37'
make[2]: Leaving directory `/tmp/rlwrap-0.37'
make[1]: Leaving directory `/tmp/rlwrap-0.37'

配置

[root@lmm ~]# vi .bash_profile

添加
 

alias sqlplus='rlwrap sqlplus'

生效

[oracle@lmm ~]$ source .bash_profile

 类似资料: