转载:Static Version of rlwrap for sqlplus
Quick Summary
If you don’t have root access to a machine, it can be challenging to compile rlwrap (a nice companion to sqlplus). You can compile it on another machine / VM, then use a utility calledstatifier to produce one binary that includes all of the required dependencies. If you want to just cut to the chase, you can download the version I compiled for OEL 5.6 x64 here.
How to Compile
If you don’t trust what I’ve compiled (and you probably shouldn’t if you care about security), here are the steps to compile your own version.
On a machine or VM that you control running a comparable Linux distribution:
- Download and compile rlwrap.
- Download and compile statifier.
- Compile your static version of rlwrap:
# statifier /usr/local/bin/rlwrap /tmp/rlwrap_static_x64
Copy the file to your locked-down server (where you don’t have root), then:
- Put it in some logical directory such as ~/local/bin
-
chmod +x ~/local/bin/*
- I create a symlink for it (but you could just rename it if you want):
ln -s ~/local/bin/rlwrap_static_x64 ~/local/bin/rlwrap
- Edit ~/.bashrc and add it to your path:
export PATH=$PATH:~/local/bin alias sqlplus='rlwrap sqlplus'
-
source ~/.bashrc
作者:wait4friend
Weibo:@wait4friend
Twitter:@wait4friend
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
posted on 2012-09-25 20:41 wait4friend 阅读(221) 评论(0) 编辑 收藏 举报