知乎專欄 | 多維度架構 | 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者” |
http://code.google.com/p/klish/
Klish是一個命令行補全工具,可以實現類似於CISCO路由器的命令行幫助界面。它是Clish的後續版本,Klish有一個特殊的功能,可以讓用戶僅使用指定目錄中的命令。
# cd /usr/local/src/ # wget http://klish.googlecode.com/files/klish-1.6.4.tar.bz2 # tar jxvf klish-1.6.4.tar.bz2 # cd klish-1.6.4/ # ./configure --prefix=/srv/klish-1.6.4 # make # make install # cp -r xml-examples /srv/klish-1.6.4/ # export CLISH_PATH=/srv/klish-1.6.4/xml-examples/clish
啟動clish
# /srv/klish-1.6.4/bin/clish ******************************************** * CLISH (see-lish) * * * * WARNING: Authorised Access Only * ******************************************** Welcome root it is Mon Feb 18 09:59:06 CST 2013 >
# vim /etc/passwd neo:x:1000:1000:neo,,,:/home/neo:/bin/bash
改為
neo:x:1000:1000:neo,,,:/home/neo:/srv/klish-1.6.4/bin/clish
clish/shell/shell_expat.c:36:19: fatal error: expat.h: No such file or directory compilation terminated. make[1]: *** [clish/shell/libclish_la-shell_expat.lo] Error 1 make[1]: Leaving directory `/usr/local/src/klish-1.6.4' make: *** [all] Error 2
解決方案,安裝expat開發包
# apt-get install libexpat1-dev