On the Linux platform, you can use the up and down arrows on the keyboard to call up the SQL commands executed in history at the SQL * PLUS command line prompt of the Oracle database, you can consider using the rlwrap open-source tool.
Now, record the installation process (in the Red Hat Enterprise Linux as 5.4 environment ).
① First download rlwrap:
Download the composite OS version at: http://rpm.pbone.net/index.php3
② Install related packages
Libtermcap-devel-2.0.8-46.1.i386.rpm
Readline-devel-5.1-1.1.i386.rpm
[Root @ server1 ~] # Rpm-ivh libtermcap-devel-2.0.8-46.1.i386.rpm
Warning: libtermcap-devel-2.0.8-46.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ######################################## ### [100%]
1: libtermcap-devel ##################################### ###### [100%]
[Root @ server1 ~] # Rpm-ivh readline-devel-5.1-1.1.i386.rpm
Warning: readline-devel-5.1-1.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ######################################## ### [100%]
1: readline-devel ##################################### ###### [100%]
③ Install the rlwrap package
Root@www.bkjia.com ~ # Rpm-ivh rlwrap-0.37-1.el5.i386.rpm
Warning: rlwrap-0.37-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
Preparing... ######################################## ### [100%]
1: rlwrap ####################################### #### [100%]
Root@www.bkjia.com ~ #
④ Modify the configuration file of an oracle user
Root@www.bkjia.com ~ # Su-oracle
Oracle@www.bkjia.com ~ $ Vi. bash_profile
Alias sqlplus = 'maid sqlplus/nolog' -- (it is best to add this information and! Wq save and quit)
Oracle@www.bkjia.com ~ $ Source. bash_profile
⑤ This is done. You only need to use the root user to execute sqlplus to enter the SQL * PLUS command line prompt, and you can use the upper and lower keys of the keyboard to call up the previously executed historical commands.
For more information about Oracle, see Oracle topics page http://www.bkjia.com/topicnews.aspx? Tid = 12