Install rlwrap on Linux

Source: Internet
Author: User

1. The original intention of installing rlwrap;
2. Install the rlwrap tool and problems encountered;
3. Use the rlwrap tool;

1. The original intention of installing rlwrap:
In Windows, SQLPLUS can be used to flip the front and right sides of the up and down arrow keys, and each command can also be modified forward or backward, but not in Linux. SQLPLUS is always used, this is a bit uncomfortable. You can use rlwrap to solve this problem after querying the Internet. Some problems encountered during installation are recorded as follows for future reference;

2. Install the rlwrap tool and problems:
2.1 To rlwrap official website (http://utopia.knoware.nl /~ Hlub/uck/rlwrap) download the rlwrap tool. The current version is 0.4.1;
2.2 decompress the rlwrap Toolkit:

[root@wusuyuan ~]#tar -zxvf rlwrap-0.41.tar.gz 
 
[root@wusuyuan ~]#cd rlwrap-0.41
 
[root@wusuyuan rlwrap-0.41]# ./configure 
If the last prompt is You need the GNU readline library (ftp://ftp.gnu.org/gnu/readline/) to build this program!
You also need to install: readline
[root@wusuyuan rlwrap-0.41]# yum -y install readline*
Associated package:
Ncurses-devel-5.7-3.20090208.el6.x86_64
Readline-devel-6.0-4.el6.x86_64
Readline-static-6.0-4.el6.x86_64
Readline-static-6.0-4.el6.x86_64
Readline-devel-6.0-4.el6.x86_64
Ncurses-devel-5.7-3.20090208.el6.x86_64
If these packages fail to be installed, go to the official website to find these packages for independent installation. After installation is correct, try again:
[root@wusuyuan rlwrap-0.41]# ./configure 
Make
[root@wusuyuan rlwrap-0.41]# make
[root@wusuyuan rlwrap-0.41]# make install
Now the rlwrap tool is successfully installed. After you type rlwrap, you will be prompted;

3. Use the rlwrap tool:
The input rlwrap is followed by sqlplus. The parameters after sqlplus are the same as the common ones. The difference is that there are more prefixes and more companions;

[sywu@wusuyuan rlwrap-0.41]$ rlwrap sqlplus /
 
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 13 22:32:30 2014
 
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
 
OPS$SYWU@sydb>
 

3.1 subsequent handling of the rlwrap tool:
Now rlwrap can be used normally, but each time you use rlwrap on SQLPLUS, you must add a prefix. You can define an alias under. bash_profile of a Linux User to solve this problem:
Alias sqlplus = 'maid sqlplus'
Alias rman = 'rlwrap rman'
Add the above two rows to. bash_profile
[Sywu @ wusuyuan ~] $ Source. bash_profile
[Sywu @ wusuyuan ~] $ Sqlplus/as sysdba
In this way, SQLPLUS will not be used with rlwrap;
From now on, the constraint on the direction keys has been completely liberated, so you don't have to worry about making mistakes or not finding the first few commands. Please study it !!!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.