Brief introduction
Linux expect when doing SSH access, is very good things, then how to install NA.
There are three ways to install, yum command (with network); tar installation package (no network); RPM Package installation (no network)
Yum Installation
Yum Install expect
Yum Install Expect-devel
Yum Install Tcl
After that, you can normally use expect TCL.
Tar Installation
Expect version 5.43
Http://download.chinaunix.net/download/0003000/2845.shtml
Tcl version 8.4.19
Http://sourceforge.net/projects/tcl/files/Tcl/8.4.19/tcl8.4.19-src.tar.gz/download
Download two packages, extract separately
1. First install TCL
Into the TCL extract directory, and then into the UNIX directory
#./configure
#make
#make Install
2. Post-Installation expect
Enter expect extract directory
#./configure--with-tclinclude=/usr/src/tcl8.4.19/generic/--with-tclconfig=/usr/local/lib/
#make
#make Install
Finish, test
#expect
Expect1.1>
Expect1.1>
Everything OK
RPM Package Installation
Download expect-5.44.1.15-4.el6.x86_64.rpm and tcl-8.5.7-6.el6.x86_64.rpm packages, which are available on the Web or in:
http://download.csdn.net/detail/supingemail/8849737 download.
After that, you can use the expect Shunliu.