溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

RANCID完全安裝

發(fā)布時(shí)間:2020-07-29 00:40:05 來(lái)源:網(wǎng)絡(luò) 閱讀:1335 作者:longruivictor 欄目:系統(tǒng)運(yùn)維

前幾天,有個(gè)要求要安裝RANCID軟件。RANCID是采用CVS的方式,來(lái)存儲(chǔ)各種網(wǎng)絡(luò)路由器,交換機(jī)等設(shè)備配置的軟件。它可以方便的實(shí)現(xiàn)網(wǎng)絡(luò)設(shè)備配置文件的存儲(chǔ)與管理??梢詫?shí)時(shí)查看任意時(shí)間使用過(guò)的網(wǎng)絡(luò)配置。同時(shí)還可以對(duì)一些更改進(jìn)行跟蹤。 
但是RANCID安裝起來(lái)比較復(fù)雜,因?yàn)樵诎惭bRANCID之前,需要先安裝和配置好3個(gè)軟件,一個(gè)是TCL,一個(gè)是EXPETC,一個(gè)是CVS。在他們都安裝好了以后,才可以安裝RANCID。 
我在這里總結(jié)了一下安裝RANCID的步驟,希望對(duì)大家有所幫助。 
首先,我們需要配置編譯安裝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 

進(jìn)入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 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
因?yàn)槭窃趕unos上安裝,所以要進(jìn)入unix目錄 
root@ip2dbserver # cd unix 
查看相應(yīng)的安裝內(nèi)容 
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 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
查看一下有哪些安裝的選項(xiàng) 
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] 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
進(jìn)行軟件配置,這里設(shè)定安裝目錄是/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 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
下面就可以對(duì)對(duì)編譯好的軟件進(jìn)行安裝 
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 
改動(dòng)配置文件,啟動(dòng)新的配置文件 
root@ip2dbserver # vi .profile 
進(jìn)入剛安裝好的tclsh8.4,看看是否安裝成功 
root@ip2dbserver # tclsh8.4  
% exit 
可以使用,安裝tcl成功

[ 本帖最后由 sohu2000000 于 2007-5-17 10:59 編輯 ]




[原創(chuàng)]RANCID完全安裝實(shí)錄(續(xù))[/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
進(jìn)入源文件目錄 
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 
查看配置選項(xiàng)有哪些 
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] 
………………………………………………………………………………………………. 
查看軟件的安裝說(shuō)明 
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問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI