RANCID完全安装

前几天,有个要求要安装RANCID软件。RANCID是采用CVS的方式,来存储各种网络路由器,交换机等设备配置的软件。它可以方便的实现网络设备配置文件的存储与管理。可以实时查看任意时间使用过的网络配置。同时还可以对一些更改进行跟踪。 
但是RANCID安装起来比较复杂,因为在安装RANCID之前,需要先安装和配置好3个软件,一个是TCL,一个是EXPETC,一个是CVS。在他们都安装好了以后,才可以安装RANCID。 
我在这里总结了一下安装RANCID的步骤,希望对大家有所帮助。 
首先,我们需要配置编译安装TCL,我这里使用的是tcl的源文件包tcl8.4.14-src.tar.gz。 
[email protected] # cd /opt/ ailf/ 
[email protected] # 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的源文件的压缩包 
[email protected] # gunzip tcl8.4.14-src.tar.gz  
[email protected] # tar xvf tcl8.4.14-src.tar

进入tcl的源文件目录: 
[email protected] # cd tcl8.4.14 
[email protected] # ls 
ChangeLog       ChangeLog.2001  compat          library         macosx          unix 
ChangeLog.1999  README          doc             license.terms   tests           win 
ChangeLog.2000  changes         generic         mac             tools 
*/ 
查看安装文档 
[email protected] # 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目录 
[email protected] # cd unix 
查看相应的安装内容 
[email protected] # 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 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
查看一下有哪些安装的选项 
[email protected] # ./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 
[email protected] # ./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软件 
[email protected] # 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 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
下面就可以对对编译好的软件进行安装 
[email protected] # 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 
改动配置文件,启动新的配置文件 
[email protected] # vi .profile 
进入刚安装好的tclsh8.4,看看是否安装成功 
[email protected] # tclsh8.4  
% exit 
可以使用,安装tcl成功

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



[原创]RANCID完全安装实录(续)[/align]在正确的安装了TCL之后,我们就可以EXPECT了,我这里是用的expect的源文件包是expect-5.43 
[email protected] # cd /opt/ailf/tmp 
[email protected] # ls 
expect.tar          rancid-2.3.2a6.tar  tcl8.4.14           tcl8.4.14-src.tar 
释放expect的源文件压缩包 
[email protected] # 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磁带块 
………………………………………………………………………………………………. 
查看是否解压成功 
[email protected] # ls 
expect-5.43         expect.tar          rancid-2.3.2a6.tar  tcl8.4.14           tcl8.4.14-src.tar
进入源文件目录 
[email protected] # cd expect-5.43 
[email protected] # 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 
查看配置选项有哪些 
[email protected] # ./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] 
………………………………………………………………………………………………. 
查看软件的安装说明 
[email protected] # 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 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
查看都有哪些安装配置文件: 
[email protected] # ./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] 
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin] 
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec] 
  --datadir=DIR           read-only architecture-independent data in DIR 
                          [PREFIX/share] 
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc] 
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR 
                          [PREFIX/com] 
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var] 
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib] 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
配置编译源文件,指定安装的路径是/opt/lf/expect,并且激活gcc软件 
[email protected] # ./configure --prefix=/opt/lf/expect --with-tcl=/opt/ailf/tmp/tcl8.4.14/unix/ --enable-gcc  
指定expect的安装路径是/opt/lf/expect,指定tcl的配置文件的路径是/opt/ailf/tmp/tcl8.4.14/unix,激活gcc的功能 
[email protected] # ./configure --prefix=/opt/lf/expect --with-tcl=/opt/ailf/tmp/tcl8.4.14/unix --enable-gcc  
configuring Expect 5.43.0 
checking for autoconf... no 
checking configure up to date... yes 
checking host system type... sparc-sun-solaris2.9 
checking target system type... sparc-sun-solaris2.9 
checking build system type... sparc-sun-solaris2.9 
checking shell to use within Make...  
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 for building with threads... no (default) 
checking for Tcl configuration... found /opt/ailf/tmp/tcl8.4.14/unix/tclConfig.sh 
checking Tcl build library... -L/opt/ailf/tmp/tcl8.4.14/unix -ltcl8.4 -ldl  -lsocket -lnsl -lm 
checking for Tcl_CreateCommand... yes 
checking if Tcl library build specification is valid... yes 
checking for Tk configuration... configure: warning: Can t find Tk configuration definitions 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
下面对expect源文件进行编译 
[email protected] # make 
gcc -pipe -c  -I. -I. -I/opt/ailf/tmp/tcl8.4.14/generic    -DEXP_VERSION=\"5.43.0\"  -DSCRIPTDIR=\"/opt/lf/expect/lib/expect5.43\"  -DEXECSCRIPTDIR=\"/opt/lf/expect/lib/expect5.43\"  -DTCL_DEBUGGER  -DUSE_NON_CONST  -DSTTY_BIN=\"/bin/stty\"  -DDFLT_STTY="\"sane\""  exp_main_exp.c 
if [ "xlibexpect5.43.a" != "xlibexpect5.43.a" ] ; then \ 
   if [ ! -d shared ] ; then \ 
        mkdir shared ; \ 
   else true; fi ; \ 
   gcc -pipe -c  -I. -I. -I/opt/ailf/tmp/tcl8.4.14/generic    -DEXP_VERSION=\"5.43.0\"  -DSCRIPTDIR=\"/opt/lf/expect/lib/expect5.43\"  -DEXECSCRIPTDIR=\"/opt/lf/expect/lib/expect5.43\"  -DTCL_DEBUGGER  -DUSE_NON_CONST  -DSTTY_BIN=\"/bin/stty\"   -DDFLT_STTY="\"sane\""  exp_main_exp.c -o shared/exp_main_exp.o ; \ 
fi 
gcc -pipe -c  -I. -I. -I/opt/ailf/tmp/tcl8.4.14/generic    -DEXP_VERSION=\"5.43.0\"  -DSCRIPTDIR=\"/opt/lf/expect/lib/expect5.43\"  -DEXECSCRIPTDIR=\"/opt/lf/expect/lib/expect5.43\"  -DTCL_DEBUGGER  -DUSE_NON_CONST  -DSTTY_BIN=\"/bin/stty\"  -DDFLT_STTY="\"sane\""  exp_command.c 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
对编译好的expect进行安装 
[email protected] # make install 
Making binaries in testsuite... 
./mkinstalldirs /opt/lf/expect/lib/expect5.43 
mkdir /opt/lf/expect 
mkdir /opt/lf/expect/lib 
mkdir /opt/lf/expect/lib/expect5.43 
if [ -s libexpect5.43.a ] ; then \ 
  ./install-sh -c -m 644 libexpect5.43.a /opt/lf/expect/lib/expect5.43/libexpect5.43.a ; \ 
  ranlib /opt/lf/expect/lib/expect5.43/libexpect5.43.a ; \ 
  ./install-sh -c -m 644 libexpect5.43.a /opt/lf/expect/lib/libexpect5.43.a ; \ 
  ranlib /opt/lf/expect/lib/libexpect5.43.a ; \ 
else true; fi 
if [ -s reconfigure_Tcl_for_shared_library ] ; then \ 
  ./install-sh -c reconfigure_Tcl_for_shared_library /opt/lf/expect/lib/reconfigure_Tcl_for_shared_library ; \ 
  ./install-sh -c pkgIndex /opt/lf/expect/lib/expect5.43/pkgIndex.tcl ; \ 
else true; fi 
gcc -pipe    -o expect_installed exp_main_exp.o -L/opt/lf/expect/lib -lexpect5.43 -L/opt/lf/tcl/lib -ltcl8.4  -ldl  -lsocket -lnsl -lm -Wl,-R,/opt/lf/expect/lib:/opt/lf/tcl/lib 
: expect_installed 
TCL_LIBRARY=/opt/ailf/tmp/tcl8.4.14/library ; \ 
export TCL_LIBRARY ; \ 
LD_LIBRARY_PATH=.:/opt/lf/tcl/lib:/opt/lf/expect/lib:$LD_LIBRARY_PATH ./expect ./fixline1 /opt/lf/expect/bin < ./example/timed-run > timed-run 
TCL_LIBRARY=/opt/ailf/tmp/tcl8.4.14/library ; \ 
export TCL_LIBRARY ; \ 
LD_LIBRARY_PATH=.:/opt/lf/tcl/lib:/opt/lf/expect/lib:$LD_LIBRARY_PATH ./expect ./fixline1 /opt/lf/expect/bin < ./example/timed-read > timed-read 
TCL_LIBRARY=/opt/ailf/tmp/tcl8.4.14/library ; \ 
export TCL_LIBRARY ; \ 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
查看刚才安装的/opt/lf/expect是否成功 
[email protected] # cd /opt/lf/ 
[email protected] # ls 
cvs     expect  tcl 
[email protected] # cd expect 
[email protected] # ls 
bin      include  lib      man 
[email protected] # pwd 
/opt/lf/expect 
添加配置文件的路径 
[email protected] # vi /.profile 
试试刚刚安装的expect的程序是否成功,可以生成script.exp 
[email protected] # expect -v 
expect version 5.43.0 
[email protected] # autopasswd  
spawn passwd  
请输入用户名: ^[email protected] #  
[email protected] # autoexpect 
autoexpect started, file is script.exp 
[email protected] # exit   
autoexpect done, file is script.exp 
[email protected] # ls 
bin         data1       data4       devices     home        lost+found  net         proc        tmp         vol 
cdrom       data2       data5       etc         kernel      mnt         opt  
[email protected] # rm script.exp 
终于安装好了EXPECT了



 sohu2000000 回复于:2007-05-17 10:58:21

[size=3][align=center][font=黑体][原创]RANCID完全安装实录(续)[/font][/align][/size] 
还剩下一个比较让人头疼的软件CVS,努把力,安装上它 
安装CVS,我这里使用的源文件包是:cvs-1.12.13.tar.gz 
重命名cvs的源文件的压缩包为正确的格式 
[email protected] # mv cvs-1.12.13.tar.tar cvs-1.12.13.tar.gz  
解压cvs的源文件 
[email protected] # gunzip cvs-1.12.13.tar.gz  
[email protected] # tar xvf cvs-1.12.13.tar  
x cvs-1.12.13, 0 bytes, 0磁带块 
x cvs-1.12.13/build-aux, 0 bytes, 0磁带块 
x cvs-1.12.13/build-aux/compile, 3703 bytes, 8磁带块 
x cvs-1.12.13/build-aux/config.guess, 42037 bytes, 83磁带块 
x cvs-1.12.13/build-aux/config.rpath, 14869 bytes, 30磁带块 
x cvs-1.12.13/build-aux/config.sub, 30221 bytes, 60磁带块 
x cvs-1.12.13/build-aux/depcomp, 15868 bytes, 31磁带块 
x cvs-1.12.13/build-aux/install-sh, 9233 bytes, 19磁带块 
x cvs-1.12.13/build-aux/mdate-sh, 5225 bytes, 11磁带块 
x cvs-1.12.13/build-aux/missing, 10872 bytes, 22磁带块 
x cvs-1.12.13/build-aux/texinfo.tex, 226845 bytes, 444磁带块 
x cvs-1.12.13/build-aux/ylwrap, 6187 bytes, 13磁带块 
x cvs-1.12.13/contrib, 0 bytes, 0磁带块 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
进入源文件的解压缩目录: 
[email protected] # cd cvs-1.12.13 
[email protected] # ls 
ABOUT-NLS      ChangeLog.zoo  Makefile.am    TESTS          configure      cvsnt.dep      emx            os2 
AUTHORS        DEVEL-CVS      Makefile.in    TODO           configure.in   cvsnt.dsp      lib            src 
BUGS           FAQ            NEWS           aclocal.m4     contrib        cvsnt.dsw      m4             tools 
COPYING        HACKING        PROJECTS       build-aux      cvs-format.el  cvsnt.mak      maint-aux      vms 
COPYING.LIB    INSTALL        README         build.com      cvs.spec       diff           man            windows-NT 
ChangeLog      MINOR-BUGS     README.VMS     config.h.in    cvs.spec.in    doc            mktemp.sh      zlib 
查看配置选项有哪些 
[email protected] # ./configure --help 
/* 
`configure‘ configures Concurrent Versions System (CVS) 1.12.13 to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as 
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration: 
  -h, --help              display this help and exit 
      --help=short        display options specific to this package 
      --help=recursive    display the short help of all the included packages 
  -V, --version           display version information and exit 
  -q, --quiet, --silent   do not print `checking...‘ messages 
      --cache-file=FILE   cache test results in FILE [disabled] 
  -C, --config-cache      alias for `--cache-file=config.cache‘ 
  -n, --no-create         do not create output files 
      --srcdir=DIR        find the sources in DIR [configure dir or `..‘] 
………………………………………………………………………………………….. 
编译配置CVS 
[email protected] # ./configure --prefix=/opt/lf/cvs --enable-client  
checking for a BSD-compatible install... build-aux/install-sh -c 
checking whether build environment is sane... yes 
checking for gawk... no 
checking for mawk... no 
checking for nawk... nawk 
checking whether make sets $(MAKE)... yes 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
编译CVS 
[email protected] #  make 
make  all-recursive 
Making all in lib 
cp ./alloca_.h alloca.h-t 
mv alloca.h-t alloca.h 
cp ./getopt_.h getopt.h-t 
mv getopt.h-t getopt.h 
cp ./glob_.h glob.h-t 
mv glob.h-t glob.h 
sed -e ‘s/@‘‘HAVE_LONG_64BIT‘‘@/0/g;s/@‘‘[email protected]/1/g‘ < ./stdint_.h > stdint.h-t 
mv stdint.h-t stdint.h 
make  all-am 
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -Ino/include  -g -O2 -MT sighandle.o -MD -MP -MF ".deps/sighandle.Tpo" -c -o sighandle.o sighandle.c; \ 
then mv -f ".deps/sighandle.Tpo" ".deps/sighandle.Po"; else rm -f ".deps/sighandle.Tpo"; exit 1; fi 
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -Ino/include  -g -O2 -MT allocsa.o -MD -MP -MF ".deps/allocsa.Tpo" -c -o allocsa.o allocsa.c; \ 
then mv -f ".deps/allocsa.Tpo" ".deps/allocsa.Po"; else rm -f ".deps/allocsa.Tpo"; exit 1; fi 
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -Ino/include  -g -O2 -MT cycle-check.o -MD -MP -MF ".deps/cycle-check.Tpo" -c -o cycle-check.o cycle-check.c; \ 
then mv -f ".deps/cycle-check.Tpo" ".deps/cycle-check.Po"; else rm -f ".deps/cycle-check.Tpo"; exit 1; fi 
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -Ino/include  -g -O2 -MT basename.o -MD -MP -MF ".deps/basename.Tpo" -c -o basename.o basename.c; \ 
then mv -f ".deps/basename.Tpo" ".deps/basename.Po"; else rm -f ".deps/basename.Tpo"; exit 1; fi 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
安装编译好的文件 
[email protected] # make install 
Making install in lib 
make  install-am 
Making install in zlib 
Making install in diff 
。。。。。。。。。。。。。。。。。。。。。。。 
查看cvs是否安装成功 
[email protected] # cd /opt/lf/ 
[email protected] # ls 
cvs     expect  tcl 
[email protected] # cd cvs/ 
[email protected] # ls 
bin    info   man    share 
更改个人系统配置,是刚刚安装的CVS生效 
[email protected] # vi /.profile 
下面的一步工作比较繁琐,就是配置安装好的CVS,是它生效: 
更改系统配置文件/etc/services,加入: 
cvspserver 2401/tcp # CVS client/server operations 
cvspserver 2401/udp # CVS client/server operations 
[email protected] # vi /etc/services    
更改系统文件 
# Asiainfo liufeng CVS 
cvspserver 2401/tcp # CVS client/server operations 
cvspserver 2401/udp # CVS client/server operations 
"/etc/services" 135 行,4488 字符  
更改系统配置文件/etc/inetd.conf,加入: 
cvspserver stream tcp nowait root /opt/lf/cvs/bin/cvs cvs -f --allow-root=/opt/lf/repository  pserver 
[email protected] # vi /etc/inetd.conf    
更改系统文件 
# ASIAINFO Liufeng CVS 
#pserver        stream  tcp nowait root /opt/lf/cvs cvs --allow-root=/your/path/for/cvs/repository pserver 
"/etc/inetd.conf" 163 行,7163 字符  
添加cvs用户和用户组cvsadm 
[email protected] # useradd -u 666 -g 666 -d /opt/lf/repository -m cvsadm 
UX: useradd: ERROR: group 666 does not exist.  Choose another. 
[email protected] # useradd -u 6666 -g 6666 -d /opt/lf/repository -m cvsadm 
64 块 
[email protected] # passwd cvsadm 
新口令:  
请重新输入新口令:  
passwd:cvsadm 的口令已成功更改 
把CVS的安装目录用户和用户组更改成:cvsadm:cvsadm 
[email protected] # chown -R cvsadm:cvsadm /opt/lf/cvs 
重新启动系统的网络服务,使网络服务CVS生效 
[email protected] # ps -ef | grep inetd 
[email protected] # kill -1 174 
查看网络服务是否启动 
[email protected] # netstat -an | grep 2401 
      *.2401               *.*                0      0 49152      0 LISTEN 
可以看到服务已经启动了,2041端口正在侦听 
下面用cvsadm用户登录系统 
修改登录配置,设置CVSROOT 为 CVSROOT=:pserver:[email protected]**.**.**.**:/opt/lf/repository 
[email protected] # su - cvsadm 
Sun Microsystems Inc.   SunOS 5.9       Generic May 2002 
$ ls 
local.cshrc    local.login    local.profile 
$ bash 
bash-2.05$ vi .profile  
修改登录配置 
CVSROOT=:pserver:[email protected]:/opt/lf/repository 
".profile" 22 行,616 字符  
退出重新登录系统,是配置生效 
bash-2.05$ exit 
exit 
$ exit 
[email protected] # su - cvsadm 
Sun Microsystems Inc.   SunOS 5.9       Generic May 2002 
$ ls 
local.cshrc    local.login    local.profile 
查看配置是否生效 
bash-2.05$  set 
BASH=/usr/bin/bash 
BASH_VERSINFO=([0]="2" [1]="05" [2]="0" [3]="1" [4]="release" [5]="sparc-sun-solaris2.9") 
BASH_VERSION=$‘2.05.0(1)-release‘ 
COLUMNS=125 
CVS=/opt/lf/cvs 
CVSROOT=:pserver:[email protected]:/opt/lf/repository 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
_=/etc/inetd.conf 
可以看到配置已经生效了 
登录CVS服务器 
bash-2.05$ cvs login 
Logging in to :pserver:[email protected]:2401/opt/lf/repository 
CVS password:

登录成功,初始化cvs服务器 
bash-2.05$ ls 
local.cshrc    local.login    local.profile 
bash-2.05$ cvs init  
bash-2.05$ ls 
CVSROOT        local.cshrc    local.login    local.profile 
CVS服务器初始化成功



 sohu2000000 回复于:2007-05-17 11:00:51

[size=3][font=黑体][align=center][原创]RANCID完全安装实录(续)[/align][/font][/size] 
终于搞定了,下面就要开始正式安装RANCID了 
安装RANCID,我这里使用的源文件安装包是rancid-2.3.2a6.tar.gz 
下面是安装的步骤: 
解压源文件包 
[email protected] # tar xvf rancid-2.3.2a6.tar  
x rancid-2.3.2a6/README, 12137 bytes, 24磁带块 
x rancid-2.3.2a6/acinclude.m4, 41 bytes, 1磁带块 
x rancid-2.3.2a6/configure.in, 13019 bytes, 26磁带块 
x rancid-2.3.2a6/aclocal.m4, 32562 bytes, 64磁带块 
x rancid-2.3.2a6/Makefile.am, 1755 bytes, 4磁带块 
x rancid-2.3.2a6/Makefile.in, 20695 bytes, 41磁带块 
x rancid-2.3.2a6/configure, 255014 bytes, 499磁带块 
x rancid-2.3.2a6/COPYING, 968 bytes, 2磁带块 
x rancid-2.3.2a6/depcomp, 17574 bytes, 35磁带块 
x rancid-2.3.2a6/install-sh, 13184 bytes, 26磁带块 
x rancid-2.3.2a6/missing, 11135 bytes, 22磁带块 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
进入源文件目录 
[email protected] # cd rancid-2.3.2a6 
[email protected] # ls 
BUGS             Makefile.am      Todo             bin              depcomp          man 
CHANGES          Makefile.in      UPGRADING        cloginrc.sample  etc              missing 
COPYING          README           acinclude.m4     configure        include          mkinstalldirs 
FAQ              README.lg        aclocal.m4       configure.in     install-sh       share 
配置源文件,指定安装目录是/opt/lf/rancid 
[email protected] # ./configure  --prefix=/opt/lf/rancid 
checking for a BSD-compatible install... ./install-sh -c 
checking whether build environment is sane... yes 
checking for a thread-safe mkdir -p... ./install-sh -c -d 
checking for gawk... no 
checking for mawk... no 
checking for nawk... nawk 
checking whether make sets $(MAKE)... yes 
checking for gmake... no 
checking for make... /usr/ccs/bin/make 
checking whether /usr/ccs/bin/make sets $(MAKE)... yes 
checking for gcc... gcc 
checking for C compiler default output file name... a.out 
checking whether the C compiler works... yes 
checking whether we are cross compiling... no 
checking for suffix of executables...  
checking for suffix of object files... o 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
编译源文件 
[email protected] # make 
Making all in . 
Making all in include 
/usr/ccs/bin/make  all-am 
Making all in etc 
rm -f lg.conf.sample lg.conf.sample.tmp; \ 
sed  -e ‘s,@bindir\@,/opt/lf/rancid/bin,g‘  -e ‘s,@prefix\@,/opt/lf/rancid,g‘  -e ‘s,@localstatedir\@,/opt/lf/rancid/var,g‘  -e ‘s,@sysconfdir\@,/opt/lf/rancid/etc,g‘  -e ‘s,@EXPECT_PATH\@,/opt/lf/expect/bin/expect,g‘  -e ‘s,@PERLV_PATH\@,/usr/bin/perl,g‘  -e ‘s,@ENV_PATH\@,/usr/bin:/opt/lf/expect/bin:/usr/lib:/opt/lf:/usr/xpg4/bin:/usr/local/bin:/usr/bin,g‘  -e ‘s,@RCSSYS\@,cvs,g‘  -e ‘s,@PACKAGE\@,rancid,g‘  -e ‘s,@VERSION\@,2.3.2a6,g‘ ./lg.conf.sample.in >lg.conf.sample.tmp; \ 
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 
安装编译好的文件 
[email protected] # make install 
Making install in . 
test -z "/opt/lf/rancid/share/rancid" || ./install-sh -c -d "/opt/lf/rancid/share/rancid" 
 ./install-sh -c -m 644 ‘COPYING‘ ‘/opt/lf/rancid/share/rancid/COPYING‘ 
 ./install-sh -c -m 644 ‘CHANGES‘ ‘/opt/lf/rancid/share/rancid/CHANGES‘ 
 ./install-sh -c -m 644 ‘FAQ‘ ‘/opt/lf/rancid/share/rancid/FAQ‘ 
 ./install-sh -c -m 644 ‘README‘ ‘/opt/lf/rancid/share/rancid/README‘ 
 ./install-sh -c -m 644 ‘README.lg‘ ‘/opt/lf/rancid/share/rancid/README.lg‘ 
 ./install-sh -c -m 644 ‘UPGRADING‘ ‘/opt/lf/rancid/share/rancid/UPGRADING‘ 
 ./install-sh -c -m 644 ‘cloginrc.sample‘ ‘/opt/lf/rancid/share/rancid/cloginrc.sample‘ 
/usr/ccs/bin/make  install-data-hook 
/bin/bash ./mkinstalldirs /opt/lf/rancid /opt/lf/rancid/etc  /opt/lf/rancid/var; 
mkdir /opt/lf/rancid/etc 
。。。。。。。。。。。。。。。。。。。。 
查看安装是否成功 
[email protected] # cd /opt/lf 
[email protected] # ls 
cvs     expect  rancid  tcl 
[email protected] # cd rancid 
[email protected] # ls 
bin    etc    share  var 
可以看到安装成功了,更改登录文件,以便是安装的文件目录生效 
[email protected] # vi /.profile

时间: 2024-08-02 12:02:55

RANCID完全安装的相关文章

rancid使用

RANCID 是一个配置文件对比工具,它本身像它听起来一样无聊:你一到达公司,就打开一个维护窗口,然后输入用户名,并且抱怨已经停止工作的系统.晚上工作的技术人员正在睡觉,并且他们似乎忘记了把他们所做的事情记录进文档(坑队友).幸好,RANCID 能帮助我们,RANCID 除了可以向你展现昨晚的变更,还可以展现自从它正式使用后的所有变更.因此如果你已经使用 RANCID 三年以上,它可以向你展现从那时候起到现在的所有硬件的所有变更.把你所有的配置文件存储进 RANCID 服务器作为一个备份.它不但

安装Windows7系统时,提示:缺少所需的CD/DVD驱动器设备驱动程序

      测试机型:HP probook 430 g3       系统:Windows 7 Pro x64 现在笔记本电脑主板集成的USB口大多为3.0版本,而且一些厂商为了追求PC的轻薄,不再集成光驱,所以我们在安装系统时,一般只能通过U盘或U口外接光驱. 而当我们因为需要(安装OEM系统),在通过刻录软件(如UltraISO)将系统写入U盘或光盘的方式安装系统时,此时问题就可能悄悄出现了:因为Win7官方原版系统没有集成USB3.0驱动,所以可能的报错如下: 点击"浏览"或通过

Windows8.1-KB2999226-x64安装提示 此更新不适用你的计算机

如题 Windows8.1-KB2999226-x64.msu  双击安装 安装提示 此更新不适用你的计算机 . 解决方案: 放在D:\update\目录下 windows键+X  选择  命令提示符(管理员)  一定要是管理员 打开cmd 分别执行下面两句.红色部分就是自己的更新程序了.其他安装同理 例如Windows8.1-KB2919442-x64.msu 等 1    expand –F:* D:\update\Windows8.1-KB2999226-x64.msu D:\update

pip安装提示PermissionError: [WinError 5]错误问题解决

 问题现象 新安装python3.6版本后使用pip安装第三方模块失败,报错信息如下: C:\Users\linyfeng>pip install lxml Collecting lxml Downloading http://pypi.doubanio.com/packages/fb/41/b8d5c869d01fcb77c72d7d226a847a3946034ef19c244ac12920b71cd036/lxml-3.8.0-cp36-cp36m-win32.whl (2.9MB) 10

windows安装TortoiseGit详细使用教程【基础篇】

环境:win8.1 64bit 安装准备: 首先你得安装windows下的git msysgit1.9.5 安装版本控制器客户端tortoisegit  tortoisegit1.8.12.0 [32和64别下载错,不习惯英文的朋友,也可以下个语言包] 一.安装图解: 先安装GIT[一路默认即可] 安装好git以后,右键,会发现菜单多了几项关于GIT的选项 2.安装tortoisegit[一路默认即可] 安装好以后,右键,会发现菜单多了几项关于tortoisegit的选项 到此,安装算完成了,相

在Win10 Anaconda中安装Tensorflow

有需要的朋友可以参考一下 1.安装Anaconda 下载:https://www.continuum.io/downloads,我用的是Python 3.5 下载完以后,安装. 安装完以后,打开Anaconda Prompt,输入清华的仓库镜像,更新包更快: conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --set show_channel_url

Linux下WebSphereV8.5.5.0 安装详细过程

Linux下WebSphereV8.5.5.0 安装详细过程 自WAS8以后安装包不再区别OS,一份介质可以安装到多个平台.只针对Installation Manager 进行了操作系统的区分 ,Websphere产品介质必须通过专门的工具Install Managere安装.进入IBM的官网http://www.ibm.com/us/en/进行下载.在云盘http://yun.baidu.com/share/linkshareid=2515770728&uk=4252782771 中是Linu

Python学习1-Python和Pycharm的下载与安装

本文主要介绍Python的下载安装和Python编辑器Pycharm的下载与安装. 一.Python的下载与安装 1.下载 到Python官网上下载Python的安装文件,进入网站后显示如下图: 网速访问慢的话可直接在这里下载:python-2.7.11.amd64 在Downloads中有对应的支持的平台,这里我们是在Windows平台下运行,所以点击Windows,出现如下: 在这里显示了Python更新的所有版本,其中最上面两行分别是Python2.X和Python3.X对应的最后更新版本

oracle安装故障:完美解决xhost +报错: unable to open display “”

oracle安装 先切换到root用户,执行xhost + 然后再切换到oracle用户,执行export DISPLAY=:0.0 出现乱码执行export LANG=US_en 在这里给大家介绍下两种情况的常见问题: 一种是本地运行的命令,另一种则是远程ssh命令安装. DISPLAY科普 DISPLAY变量是用来设置将图形显示到何处.比如CENTOS,你用图形界面登录进去,DISPLAY自动设置为DISPLAY=:0.0表示显式到本地监视器,那么通过终端工具(例如:xshell)进去,运行