前几天,有个要求要安装RANCID软件。RANCID是采用CVS的方式,来存储各种网络路由器,交换机等设备配置的软件。它可以方便的实现网络设备配置文件的存储与管理。可以实时查看任意时间使用过的网络配置。同时还可以对一些更改进行跟踪。
但是RANCID安装起来比较复杂,因为在安装RANCID之前,需要先安装和配置好3个软件,一个是TCL,一个是EXPETC,一个是CVS。在他们都安装好了以后,才可以安装RANCID。
我在这里总结了一下安装RANCID的步骤,希望对大家有所帮助。
首先,我们需要配置编译安装TCL,我这里使用的是tcl的源文件包tcl8.4.14-src.tar.gz。
root@ip2dbserver # cd /opt/ ailf/
root@ip2dbserver # ls
cvs-1.11.22 patch-sunos5.9 tcl8.4.14-src.tar.gz tmp
cvs-1.11.22.zip src tk8.4.14-src.tar.gz
tcl的源文件的压缩包
root@ip2dbserver # gunzip tcl8.4.14-src.tar.gz
root@ip2dbserver # tar xvf tcl8.4.14-src.tar
进入tcl的源文件目录:
root@ip2dbserver # cd tcl8.4.14
root@ip2dbserver # ls
ChangeLog ChangeLog.2001 compat library macosx unix
ChangeLog.1999 README doc license.terms tests win
ChangeLog.2000 changes generic mac tools
*/
查看安装文档
root@ip2dbserver # more README
README: Tcl
This is the Tcl 8.4.14 source distribution.
Tcl/Tk is also available through NetCVS:
http://tcl.sourceforge.net/
You can get any source release of Tcl from the file distributions
link at the above URL.
RCS: @(#) $Id: README,v 1.49.2.17 2006/05/04 13:09:16 dgp Exp $
Contents
--------
1. Introduction
2. Documentation
3. Compiling and installing Tcl
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
因为是在sunos上安装,所以要进入unix目录
root@ip2dbserver # cd unix
查看相应的安装内容
root@ip2dbserver # more README
/*
Tcl UNIX README
---------------
RCS: @(#) $Id: README,v 1.24.2.2 2005/12/03 00:35:44 das Exp $
This is the directory where you configure, compile, test, and install
UNIX versions of Tcl. This directory also contains source files for Tcl
that are specific to UNIX. Some of the files in this directory are
used on the PC or Mac platform too, but they all depend on UNIX
(POSIX/ANSI C) interfaces and some of them only make sense under UNIX.
Updated forms of the information found in this file is available at:
http://www.tcl.tk/doc/howto/compile.html#unix
For information on platforms where Tcl is known to compile, along
with any porting notes for getting it to work on those platforms, see:
http://www.tcl.tk/software/tcltk/platforms.html
The rest of this file contains instructions on how to do this. The
release should compile and run either "out of the box" or with trivial
changes on any UNIX-like system that approximates POSIX, BSD, or System
V. We know that it runs on workstations from Sun, H-P, DEC, IBM, and
SGI, as well as PCs running Linux, BSDI, and SCO UNIX. To compile for
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
查看一下有哪些安装的选项
root@ip2dbserver # ./configure --help
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
--help print this message
--no-create do not create output files
--quiet, --silent do not print ` checking... messages
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
进行软件配置,这里设定安装目录是/opt/lf/tcl
root@ip2dbserver # ./configure --prefix=/opt/lf/tcl
creating cache ./config.cache
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
checking whether to add a package name suffix for the manpages... no
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking dirent.h... yes
checking for errno.h... yes
checking for float.h... yes
checking for values.h... yes
checking for limits.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for sys/wait.h... yes
checking for dlfcn.h... yes
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
编译tcl软件
root@ip2dbserver # make
/*
gcc -pipe -c -O -DTCL_DBGX= -Wall -Wno-implicit-int -fno-strict-aliasing -fPIC -I/opt/ailf/tmp/tcl8.4.14/unix/../generic -I/opt/ailf/tmp/tcl8.4.14/unix -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -D_REENTRANT=1 -D_POSIX_PTHREAD_SEMANTICS=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_DIRENT64=1 -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DWORDS_BIGENDIAN=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1 -DTCL_SHLIB_EXT=\".so\" /opt/ailf/tmp/tcl8.4.14/unix/../generic/regcomp.c
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
下面就可以对对编译好的软件进行安装
root@ip2dbserver # make install
Making directory /opt/lf/tcl/lib
Making directory /opt/lf/tcl/bin
Installing libtcl8.4.so to /opt/lf/tcl/lib/
Installing tclsh as /opt/lf/tcl/bin/tclsh8.4
Installing tclConfig.sh to /opt/lf/tcl/lib/
Installing libtclstub8.4.a to /opt/lf/tcl/lib/
Making directory /opt/lf/tcl/include
Making directory /opt/lf/tcl/lib/tcl8.4
Making directory /opt/lf/tcl/lib/tcl8.4/http2.5
Making directory /opt/lf/tcl/lib/tcl8.4/http1.0
Making directory /opt/lf/tcl/lib/tcl8.4/opt0.4
Making directory /opt/lf/tcl/lib/tcl8.4/encoding
Making directory /opt/lf/tcl/lib/tcl8.4/msgcat1.3
Making directory /opt/lf/tcl/lib/tcl8.4/tcltest2.2
Installing header files
Installing library files to /opt/lf/tcl/lib/tcl8.4
Installing library http1.0 directory
Installing library http2.5 directory
Installing library opt0.4 directory
Installing library msgcat1.3 directory
Installing library tcltest2.2 directory
Installing library encoding directory
Making directory /opt/lf/tcl/man
Making directory /opt/lf/tcl/man/man1
Making directory /opt/lf/tcl/man/man3
Making directory /opt/lf/tcl/man/mann
Installing and cross-linking top-level (.1) docs
Installing and cross-linking C API (.3) docs
Installing and cross-linking command (.n) docs
改动配置文件,启动新的配置文件
root@ip2dbserver # vi .profile
进入刚安装好的tclsh8.4,看看是否安装成功
root@ip2dbserver # tclsh8.4
% exit
可以使用,安装tcl成功
[ 本帖最后由 sohu2000000 于 2007-5-17 10:59 编辑 ]
[原创]RANCID完全安装实录(续)[/align]在正确的安装了TCL之后,我们就可以EXPECT了,我这里是用的expect的源文件包是expect-5.43
root@ip2dbserver # cd /opt/ailf/tmp
root@ip2dbserver # ls
expect.tar rancid-2.3.2a6.tar tcl8.4.14 tcl8.4.14-src.tar
释放expect的源文件压缩包
root@ip2dbserver # tar xvf expect.tar
x expect-5.43/ChangeLog, 21094 bytes, 42磁带块
x expect-5.43/tcldbg.h, 1681 bytes, 4磁带块
x expect-5.43/Dbg.c, 30967 bytes, 61磁带块
x expect-5.43/tcldbgcf.h.in, 399 bytes, 1磁带块
x expect-5.43/DbgMkfl.in, 8038 bytes, 16磁带块
x expect-5.43/DbgpkgInd.in, 515 bytes, 2磁带块
x expect-5.43/Dbgconfigure, 53213 bytes, 104磁带块
x expect-5.43/Dbgconfig.in, 3363 bytes, 7磁带块
x expect-5.43/FAQ, 75007 bytes, 147磁带块
x expect-5.43/HISTORY, 143501 bytes, 281磁带块
x expect-5.43/INSTALL, 10685 bytes, 21磁带块
x expect-5.43/Makefile.in, 32701 bytes, 64磁带块
x expect-5.43/NEWS, 29291 bytes, 58磁带块
x expect-5.43/README, 14567 bytes, 29磁带块
x expect-5.43/aclocal.m4, 20222 bytes, 40磁带块
x expect-5.43/config.sub, 19106 bytes, 38磁带块
x expect-5.43/config.guess, 38437 bytes, 76磁带块
x expect-5.43/configure, 203262 bytes, 397磁带块
x expect-5.43/configure.in, 36660 bytes, 72磁带块
x expect-5.43/install-sh, 4773 bytes, 10磁带块
……………………………………………………………………………………………….
查看是否解压成功
root@ip2dbserver # ls
expect-5.43 expect.tar rancid-2.3.2a6.tar tcl8.4.14 tcl8.4.14-src.tar
进入源文件目录
root@ip2dbserver # cd expect-5.43
root@ip2dbserver # ls
ChangeLog README exp_command.h exp_main_tk.c exp_simple.c expect.h pkgIndex.in
Dbg.c aclocal.m4 exp_console.c exp_memmove.c exp_strf.c expect.man pty_sgttyb.c
DbgMkfl.in config.guess exp_event.c exp_noevent.c exp_trap.c expect_cf.h.in pty_termios.c
Dbgconfig.in config.sub exp_event.h exp_poll.c exp_tstamp.h expect_comm.h pty_unicos.c
Dbgconfigure configure exp_glob.c exp_prog.h exp_tty.c expect_tcl.h tcldbg.h
DbgpkgInd.in configure.in exp_int.h exp_pty.c exp_tty.h expectk.man tcldbgcf.h.in
FAQ example exp_inter.c exp_pty.h exp_tty_comm.c fixcat tests
HISTORY exp_chan.c exp_log.c exp_regexp.c exp_tty_in.h fixline1 testsuite
INSTALL exp_clib.c exp_log.h exp_regexp.h exp_win.c install-sh vgrindefs
Makefile.in exp_closetcl.c exp_main_exp.c exp_rename.h exp_win.h libexpect.man
NEWS exp_command.c exp_main_sub.c exp_select.c expect.c mkinstalldirs
查看配置选项有哪些
root@ip2dbserver # ./configure --help
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
--help print this message
--no-create do not create output files
--quiet, --silent do not print `checking... messages
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
--bindir=DIR user executables in DIR [EPREFIX/bin]
……………………………………………………………………………………………….
查看软件的安装说明
root@ip2dbserver # more INSTALL
This file is INSTALL. It contains installation instructions for Expect.
If you do not have Tcl, get it (Expect s README explains how) and
install it. The rest of these instructions assume that you have Tcl
installed.
If you are installing Expect on a single architecture, or are just
trying it out to see whether it is worth installing, follow the
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
查看都有哪些安装配置文件:
root@ip2dbserver # ./configure --help
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
--help print this message
--no-create do not create output files
向AI问一下细节
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。