您好,登錄后才能下訂單哦!
前幾天,有個要求要安裝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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。