前言
生产环境中常常需要对关键信息进行备份
交换机的配置信息十分关键,如果可以对这类信息进行自动备份并且进行版本控制就可以有效降低生产风险
代码语言:javascript复制Switch#copy running-config ?
flash2: Copy to flash2: file system
flash: Copy to flash: file system
ftp: Copy to ftp: file system
http: Copy to http: file system
https: Copy to https: file system
null: Copy to null: file system
nvram: Copy to nvram: file system
rcp: Copy to rcp: file system
running-config Update (merge with) current system configuration
scp: Copy to scp: file system
startup-config Copy to startup configuration
system: Copy to system: file system
tftp: Copy to tftp: file system
vb: Copy to vb: file system
Switch#copy running-config
然而也许是出于安全的考虑,思科设备 (这里指3750) 只允许进行认证之后,从设备里面将信息往外拷贝,而不提供直接从外部抽取数据的接口 (比如认证后的 scp 和 rsync )
这样就多出了很多人肉操作的成本
这里使用 perl 的 expect 模块结合 git 和 crontab 构建一套对思科设备配置信息的自动备份方案
概要
系统环境
代码语言:javascript复制[root@h102 ~]# cat /etc/issue
CentOS release 6.6 (Final)
Kernel r on an m
[root@h102 ~]# uname -a
Linux h102.temp 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@h102 ~]#
安装 (perl)Expect
代码语言:javascript复制[root@h102 ~]# cpan
Sorry, we have to rerun the configuration dialog for CPAN.pm due to
some missing parameters...
The following questions are intended to help you with the
configuration. The CPAN module needs a directory of its own to cache
important index files and maybe keep a temporary mirror of CPAN files.
This may be a site-wide or a personal directory.
I see you already have a directory
/root/.cpan
Shall we use it as the general CPAN build and cache directory?
<cpan_home>
CPAN build and cache directory? [/root/.cpan]
Unless you are accessing the CPAN on your filesystem via a file: URL,
CPAN.pm needs to keep the source files it downloads somewhere. Please
supply a directory where the downloaded files are to be kept.
<keep_source_where>
Download target directory? [/root/.cpan/sources]
<build_dir>
Directory where the build process takes place? [/root/.cpan/build]
Normally CPAN.pm keeps config variables in memory and changes need to
be saved in a separate 'o conf commit' command to make them permanent
between sessions. If you set the 'auto_commit' option to true, changes
to a config variable are always automatically committed to disk.
<auto_commit>
Always commit changes to config variables to disk? [no]
CPAN.pm can limit the size of the disk area for keeping the build
directories with all the intermediate files.
<build_cache>
Cache size for build directory (in MB)? [100]
The CPAN indexes are usually rebuilt once or twice per hour, but the
typical CPAN mirror mirrors only once or twice per day. Depending on
the quality of your mirror and your desire to be on the bleeding edge,
you may want to set the following value to more or less than one day
(which is the default). It determines after how many days CPAN.pm
downloads new indexes.
<index_expire>
Let the index expire after how many days? [1]
By default, each time the CPAN module is started, cache scanning is
performed to keep the cache size in sync. To prevent this, answer
'never'.
<scan_cache>
Perform cache scanning (atstart or never)? [atstart]
To considerably speed up the initial CPAN shell startup, it is
possible to use Storable to create a cache of metadata. If Storable is
not available, the normal index mechanism will be used.
Note: this mechanism is not used when use_sqlite is on and SQLLite is
running.
<cache_metadata>
Cache metadata (yes/no)? [yes]
The CPAN module can detect when a module which you are trying to build
depends on prerequisites. If this happens, it can build the
prerequisites for you automatically ('follow'), ask you for
confirmation ('ask'), or just ignore them ('ignore'). Please set your
policy to one of the three values.
<prerequisites_policy>
Policy on building prerequisites (follow, ask or ignore)? [ask]
Every Makefile.PL is run by perl in a separate process. Likewise we
run 'make' and 'make install' in separate processes. If you have
any parameters (e.g. PREFIX, UNINST or the like) you want to
pass to the calls, please specify them here.
If you don't understand this question, just press ENTER.
Typical frequently used settings:
PREFIX=~/perl # non-root users (please see manual for more hints)
<makepl_arg>
Parameters for the 'perl Makefile.PL' command? [INSTALLDIRS=site]
Parameters for the 'make' command? Typical frequently used setting:
-j3 # dual processor system (on GNU make)
<make_arg>
Your choice: []
Parameters for the 'make install' command?
Typical frequently used setting:
UNINST=1 # to always uninstall potentially conflicting files
<make_install_arg>
Your choice: []
A Build.PL is run by perl in a separate process. Likewise we run
'./Build' and './Build install' in separate processes. If you have any
parameters you want to pass to the calls, please specify them here.
Typical frequently used settings:
--install_base /home/xxx # different installation directory
<mbuildpl_arg>
Parameters for the 'perl Build.PL' command? [--installdirs site]
Parameters for the './Build' command? Setting might be:
--extra_linker_flags -L/usr/foo/lib # non-standard library location
<mbuild_arg>
Your choice: []
Do you want to use a different command for './Build install'? Sudo
users will probably prefer:
su root -c ./Build
or
sudo ./Build
or
/path1/to/sudo -u admin_account ./Build
<mbuild_install_build_command>
or some such. Your choice: [./Build]
Parameters for the './Build install' command? Typical frequently used
setting:
--uninst 1 # uninstall conflicting files
<mbuild_install_arg>
Your choice: []
If you're accessing the net via proxies, you can specify them in the
CPAN configuration or via environment variables. The variable in
the $CPAN::Config takes precedence.
<ftp_proxy>
Your ftp_proxy? []
<http_proxy>
Your http_proxy? []
<no_proxy>
Your no_proxy? []
CPAN needs access to at least one CPAN mirror.
As you did not allow me to connect to the internet you need to supply
a valid CPAN URL now.
Please enter the URL of your CPAN mirror http://mirrors.163.com/cpan/
Configuration does not allow connecting to the internet.
Current set of CPAN URLs:
http://mirrors.163.com/cpan/
Enter another URL or RETURN to quit: [] http://mirrors.sohu.com/CPAN/
Enter another URL or RETURN to quit: [] http://mirrors.hust.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] ftp://mirrors.ustc.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] http://mirrors.ustc.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] rsync://mirrors.ustc.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] ftp://mirrors.xmu.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] http://mirrors.xmu.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] rsync://mirrors.xmu.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] http://mirror.lzu.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] http://mirrors.neusoft.edu.cn/cpan/
Enter another URL or RETURN to quit: [] http://mirrors.zju.edu.cn/CPAN/
Enter another URL or RETURN to quit: []
New urllist
http://mirrors.163.com/cpan/
http://mirrors.sohu.com/CPAN/
http://mirrors.hust.edu.cn/CPAN/
ftp://mirrors.ustc.edu.cn/CPAN/
http://mirrors.ustc.edu.cn/CPAN/
rsync://mirrors.ustc.edu.cn/CPAN/
ftp://mirrors.xmu.edu.cn/CPAN/
http://mirrors.xmu.edu.cn/CPAN/
rsync://mirrors.xmu.edu.cn/CPAN/
http://mirror.lzu.edu.cn/CPAN/
http://mirrors.neusoft.edu.cn/cpan/
http://mirrors.zju.edu.cn/CPAN/
Please remember to call 'o conf commit' to make the config permanent!
cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.
cpan[1]> install Expect
CPAN: Storable loaded ok (v2.20)
CPAN: LWP::UserAgent loaded ok (v5.833)
CPAN: Time::HiRes loaded ok (v1.9721)
Fetching with LWP:
http://mirrors.163.com/cpan/authors/01mailrc.txt.gz
Going to read '/root/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with LWP:
http://mirrors.163.com/cpan/modules/02packages.details.txt.gz
Going to read '/root/.cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Mon, 15 May 2017 01:53:49 GMT
.............
New CPAN.pm version (v2.16) available.
[Currently running version is v1.9402]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
...............................................................DONE
Fetching with LWP:
http://mirrors.163.com/cpan/modules/03modlist.data.gz
Going to read '/root/.cpan/sources/modules/03modlist.data.gz'
DONE
Going to write /root/.cpan/Metadata
Running install for module 'Expect'
CPAN: Data::Dumper loaded ok (v2.124)
'YAML' not installed, falling back to Data::Dumper and Storable to read prefs '/root/.cpan/prefs'
Running make for J/JA/JACOBY/Expect-1.33.tar.gz
Fetching with LWP:
http://mirrors.163.com/cpan/authors/id/J/JA/JACOBY/Expect-1.33.tar.gz
CPAN: Digest::SHA loaded ok (v5.47)
Fetching with LWP:
http://mirrors.163.com/cpan/authors/id/J/JA/JACOBY/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/J/JA/JACOBY/Expect-1.33.tar.gz ok
Scanning cache /root/.cpan/build for sizes
DONE
CPAN: Archive::Tar loaded ok (v1.58)
expect.pm-Expect-1.33/
expect.pm-Expect-1.33/.gitignore
expect.pm-Expect-1.33/.perltidyrc
expect.pm-Expect-1.33/.travis.yml
expect.pm-Expect-1.33/Changes
expect.pm-Expect-1.33/LICENSE
expect.pm-Expect-1.33/MANIFEST.SKIP
expect.pm-Expect-1.33/Makefile.PL
expect.pm-Expect-1.33/README.md
expect.pm-Expect-1.33/examples/
expect.pm-Expect-1.33/examples/calc.pl
expect.pm-Expect-1.33/examples/expect_calc.pl
expect.pm-Expect-1.33/examples/kibitz/
expect.pm-Expect-1.33/examples/kibitz/Changelog
expect.pm-Expect-1.33/examples/kibitz/README
expect.pm-Expect-1.33/examples/kibitz/kibitz
expect.pm-Expect-1.33/examples/kibitz/kibitz.man
expect.pm-Expect-1.33/examples/ssh.pl
expect.pm-Expect-1.33/lib/
expect.pm-Expect-1.33/lib/Expect.pm
expect.pm-Expect-1.33/t/
expect.pm-Expect-1.33/t/01-test.t
expect.pm-Expect-1.33/t/02-bc.t
expect.pm-Expect-1.33/t/03-log.t
expect.pm-Expect-1.33/t/04-multiline.t
expect.pm-Expect-1.33/t/10-internal.t
expect.pm-Expect-1.33/t/11-calc.t
expect.pm-Expect-1.33/tutorial/
expect.pm-Expect-1.33/tutorial/1.A.Intro
expect.pm-Expect-1.33/tutorial/2.A.ftp
expect.pm-Expect-1.33/tutorial/2.B.rlogin
expect.pm-Expect-1.33/tutorial/3.A.debugging
expect.pm-Expect-1.33/tutorial/4.A.top
expect.pm-Expect-1.33/tutorial/5.A.top
expect.pm-Expect-1.33/tutorial/5.B.top
expect.pm-Expect-1.33/tutorial/6.A.smtp-verify
expect.pm-Expect-1.33/tutorial/6.B.modem-init
expect.pm-Expect-1.33/tutorial/README
CPAN: File::Temp loaded ok (v0.22)
CPAN.pm: Going to build J/JA/JACOBY/Expect-1.33.tar.gz
Warning: prerequisite IO::Pty 1.11 not found.
Warning: prerequisite IO::Tty 1.11 not found.
Warning: prerequisite Test::More 1.00 not found. We have 0.92.
Writing Makefile for Expect
---- Unsatisfied dependencies detected during ----
---- JACOBY/Expect-1.33.tar.gz ----
IO::Tty [requires]
Test::More [requires]
IO::Pty [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes] yes
Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module 'IO::Tty'
'YAML' not installed, falling back to Data::Dumper and Storable to read prefs '/root/.cpan/prefs'
Running make for T/TO/TODDR/IO-Tty-1.12.tar.gz
Fetching with LWP:
http://mirrors.163.com/cpan/authors/id/T/TO/TODDR/IO-Tty-1.12.tar.gz
Fetching with LWP:
http://mirrors.163.com/cpan/authors/id/T/TO/TODDR/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/T/TO/TODDR/IO-Tty-1.12.tar.gz ok
IO-Tty-1.12/
IO-Tty-1.12/ChangeLog
IO-Tty-1.12/Makefile.PL
IO-Tty-1.12/MANIFEST
IO-Tty-1.12/META.json
IO-Tty-1.12/META.yml
IO-Tty-1.12/Pty.pm
IO-Tty-1.12/README
IO-Tty-1.12/t/
IO-Tty-1.12/try
IO-Tty-1.12/Tty.pm
IO-Tty-1.12/Tty.xs
IO-Tty-1.12/t/test.t
CPAN.pm: Going to build T/TO/TODDR/IO-Tty-1.12.tar.gz
Now let's see what we can find out about your system
(logfiles of failing tests are available in the conf/ dir)...
Looking for _getpty()...... not found.
Looking for getpt()........ FOUND.
Looking for grantpt()...... FOUND.
Looking for openpty()...... FOUND.
Looking for posix_openpt(). FOUND.
Looking for ptsname()...... FOUND.
Looking for ptsname_r().... FOUND.
Looking for sigaction().... FOUND.
Looking for strlcpy()...... not found.
Looking for ttyname()...... FOUND.
Looking for unlockpt()..... FOUND.
Looking for libutil.h...... not found.
Looking for pty.h.......... FOUND.
Looking for sys/pty.h...... not found.
Looking for sys/ptyio.h.... not found.
Looking for sys/stropts.h.. not found.
Looking for termio.h....... FOUND.
Looking for termios.h...... FOUND.
Looking for util.h......... not found.
Checking which symbols compile OK...
(sorry for the tedious check, but some systems have not too clean
header files, to say the least; ' ' means OK, '-' means not defined
and '*' has compile problems...)
B0 B110 B115200 B1200 B134 B150 -B153600 B1800 B19200 B200 B230400 B2400 B300 -B307200 B38400 B460800 B4800 B50 B57600 B600 B75 -B76800 B9600 BRKINT BS0 BS1 BSDLY CBAUD -CBAUDEXT CBRK -CCTS_OFLOW -CDEL CDSUSP CEOF CEOL -CEOL2 CEOT CERASE -CESC CFLUSH CIBAUD -CIBAUDEXT CINTR CKILL CLNEXT CLOCAL -CNSWTCH -CNUL CQUIT CR0 CR1 CR2 CR3 CRDLY CREAD CRPRNT CRTSCTS -CRTSXOFF -CRTS_IFLOW CS5 CS6 CS7 CS8 CSIZE CSTART CSTOP CSTOPB CSUSP -CSWTCH CWERASE -DEFECHO -DIOC -DIOCGETP -DIOCSETP -DOSMODE ECHO ECHOCTL ECHOE ECHOK ECHOKE ECHONL ECHOPRT EXTA EXTB FF0 FF1 FFDLY -FIORDCHK FLUSHO HUPCL ICANON ICRNL IEXTEN IGNBRK IGNCR IGNPAR IMAXBEL INLCR INPCK ISIG ISTRIP IUCLC IXANY IXOFF IXON -KBENABLED -LDCHG -LDCLOSE -LDDMAP -LDEMAP -LDGETT -LDGMAP -LDIOC -LDNMAP -LDOPEN -LDSETT -LDSMAP -LOBLK NCCS NL0 NL1 NLDLY NOFLSH OCRNL OFDEL OFILL OLCUC ONLCR ONLRET ONOCR OPOST -PAGEOUT PARENB -PAREXT PARMRK PARODD PENDIN -RCV1EN -RTS_TOG TAB0 TAB1 TAB2 TAB3 TABDLY -TCDSET TCFLSH TCGETA TCGETS TCIFLUSH TCIOFF TCIOFLUSH TCION TCOFLUSH TCOOFF TCOON TCSADRAIN TCSAFLUSH TCSANOW TCSBRK TCSETA TCSETAF TCSETAW -TCSETCTTY TCSETS TCSETSF TCSETSW TCXONC -TERM_D40 -TERM_D42 -TERM_H45 -TERM_NONE -TERM_TEC -TERM_TEX -TERM_V10 -TERM_V61 TIOCCBRK -TIOCCDTR TIOCCONS TIOCEXCL -TIOCFLUSH -TIOCGETC TIOCGETD -TIOCGETP -TIOCGLTC TIOCGPGRP TIOCGSID TIOCGSOFTCAR TIOCGWINSZ -TIOCHPCL -TIOCKBOF -TIOCKBON -TIOCLBIC -TIOCLBIS -TIOCLGET -TIOCLSET TIOCMBIC TIOCMBIS TIOCMGET TIOCMSET TIOCM_CAR TIOCM_CD TIOCM_CTS TIOCM_DSR TIOCM_DTR TIOCM_LE TIOCM_RI TIOCM_RNG TIOCM_RTS TIOCM_SR TIOCM_ST TIOCNOTTY TIOCNXCL TIOCOUTQ -TIOCREMOTE TIOCSBRK TIOCSCTTY -TIOCSDTR -TIOCSETC TIOCSETD -TIOCSETN -TIOCSETP -TIOCSIGNAL -TIOCSLTC TIOCSPGRP -TIOCSSID TIOCSSOFTCAR -TIOCSTART TIOCSTI -TIOCSTOP TIOCSWINSZ -TM_ANL -TM_CECHO -TM_CINVIS -TM_LCF -TM_NONE -TM_SET -TM_SNL TOSTOP -VCEOF -VCEOL VDISCARD -VDSUSP VEOF VEOL VEOL2 VERASE VINTR VKILL VLNEXT VMIN VQUIT VREPRINT VSTART VSTOP VSUSP -VSWTCH VT0 VT1 VTDLY VTIME VWERASE -WRAP XCASE -XCLUDE -XMT1EN XTABS
>>> Configuration looks good! <<<
Writing IO::Tty::Constant.pm...
DEFINE = -DHAVE_DEV_PTMX -DHAVE_GETPT -DHAVE_GRANTPT -DHAVE_OPENPTY -DHAVE_POSIX_OPENPT -DHAVE_PTSNAME -DHAVE_PTSNAME_R -DHAVE_PTY_H -DHAVE_SIGACTION -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAVE_UNLOCKPT
Checking if your kit is complete...
Looks good
Writing Makefile for IO::Tty
Could not read '/root/.cpan/build/IO-Tty-1.12-xRYZKq/META.yml'. Falling back to other methods to determine prerequisites
cp Tty.pm blib/lib/IO/Tty.pm
cp Tty/Constant.pm blib/lib/IO/Tty/Constant.pm
cp Pty.pm blib/lib/IO/Pty.pm
/usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp -typemap /usr/share/perl5/ExtUtils/typemap Tty.xs > Tty.xsc && mv Tty.xsc Tty.c
gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION="1.12" -DXS_VERSION="1.12" -fPIC "-I/usr/lib64/perl5/CORE" -DHAVE_DEV_PTMX -DHAVE_GETPT -DHAVE_GRANTPT -DHAVE_OPENPTY -DHAVE_POSIX_OPENPT -DHAVE_PTSNAME -DHAVE_PTSNAME_R -DHAVE_PTY_H -DHAVE_SIGACTION -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAVE_UNLOCKPT Tty.c
Running Mkbootstrap for IO::Tty ()
chmod 644 Tty.bs
rm -f blib/arch/auto/IO/Tty/Tty.so
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic Tty.o -o blib/arch/auto/IO/Tty/Tty.so
-lutil
chmod 755 blib/arch/auto/IO/Tty/Tty.so
cp Tty.bs blib/arch/auto/IO/Tty/Tty.bs
chmod 644 blib/arch/auto/IO/Tty/Tty.bs
Manifying blib/man3/IO::Tty::Constant.3pm
Manifying blib/man3/IO::Tty.3pm
Manifying blib/man3/IO::Pty.3pm
TODDR/IO-Tty-1.12.tar.gz
make -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/test.t .. # Configuration: -DHAVE_DEV_PTMX -DHAVE_GETPT -DHAVE_GRANTPT -DHAVE_OPENPTY -DHAVE_POSIX_OPENPT -DHAVE_PTSNAME -DHAVE_PTSNAME_R -DHAVE_PTY_H -DHAVE_SIGACTION -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAVE_UNLOCKPT
# Checking for appropriate ioctls:
# TIOCNOTTY
# TIOCSCTTY
trying posix_openpt()...
trying grantpt()...
trying unlockpt()...
trying ptsname_r()...
trying to open /dev/pts/4...
t/test.t .. 1/5 # === Checking if child gets pty as controlling terminal
trying posix_openpt()...
trying grantpt()...
trying unlockpt()...
trying ptsname_r()...
trying to open /dev/pts/4...
t/test.t .. 3/5
WARNING: when the client closes the slave pty, the master gets an error
(undef return value and $! eq "Input/output error")
instead of EOF (0 return value). Please be sure to handle this
in your application (Expect already does).
# Checking basic functionality and how your ptys handle large strings...
# This test may hang on certain systems, even though it is protected
# by alarm(). If the counter stops, try Ctrl-C, the test should continue.
trying posix_openpt()...
trying grantpt()...
trying unlockpt()...
trying ptsname_r()...
trying to open /dev/pts/4...
# isatty($master): YES
# isatty($slave): YES
# Child PID = 37649
# Good, your raw ptys can handle at least 530 bytes at once.
t/test.t .. 5/5 sysread(): Input/output error at t/test.t line 151.
Slave got EOF at line 530, byte 0.
t/test.t .. ok
All tests successful.
Files=1, Tests=5, 5 wallclock secs ( 0.21 usr 0.18 sys 0.29 cusr 0.56 csys = 1.24 CPU)
Result: PASS
TODDR/IO-Tty-1.12.tar.gz
make test -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running make install
Prepending /root/.cpan/build/IO-Tty-1.12-xRYZKq/blib/arch /root/.cpan/build/IO-Tty-1.12-xRYZKq/blib/lib to PERL5LIB for 'install'
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/local/lib64/perl5/auto/IO/Tty/Tty.bs
Installing /usr/local/lib64/perl5/auto/IO/Tty/Tty.so
Installing /usr/local/lib64/perl5/IO/Pty.pm
Installing /usr/local/lib64/perl5/IO/Tty.pm
Installing /usr/local/lib64/perl5/IO/Tty/Constant.pm
Installing /usr/local/share/man/man3/IO::Pty.3pm
Installing /usr/local/share/man/man3/IO::Tty::Constant.3pm
Installing /usr/local/share/man/man3/IO::Tty.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
TODDR/IO-Tty-1.12.tar.gz
make install -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running install for module 'Test::More'
'YAML' not installed, falling back to Data::Dumper and Storable to read prefs '/root/.cpan/prefs'
Running make for E/EX/EXODIST/Test-Simple-1.302085.tar.gz
Fetching with LWP:
http://mirrors.163.com/cpan/authors/id/E/EX/EXODIST/Test-Simple-1.302085.tar.gz
Fetching with LWP:
http://mirrors.163.com/cpan/authors/id/E/EX/EXODIST/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/E/EX/EXODIST/Test-Simple-1.302085.tar.gz ok
Test-Simple-1.302085
Test-Simple-1.302085/README
Test-Simple-1.302085/LICENSE
Test-Simple-1.302085/Changes
Test-Simple-1.302085/MANIFEST
Test-Simple-1.302085/dist.ini
Test-Simple-1.302085/cpanfile
Test-Simple-1.302085/META.yml
Test-Simple-1.302085/lib
Test-Simple-1.302085/lib/ok.pm
Test-Simple-1.302085/META.json
Test-Simple-1.302085/README.md
Test-Simple-1.302085/Makefile.PL
Test-Simple-1.302085/appveyor.yml
Test-Simple-1.302085/lib/Test2.pm
Test-Simple-1.302085/t
Test-Simple-1.302085/t/00-report.t
Test-Simple-1.302085/t/00compile.t
Test-Simple-1.302085/t/lib
Test-Simple-1.302085/t/lib/Dummy.pm
Test-Simple-1.302085/t/lib/SigDie.pm
Test-Simple-1.302085/t/lib/TieOut.pm
Test-Simple-1.302085/t/lib/MyTest.pm
Test-Simple-1.302085/t/Legacy
Test-Simple-1.302085/t/Legacy/died.t
Test-Simple-1.302085/t/Legacy/utf8.t
Test-Simple-1.302085/t/Legacy/note.t
Test-Simple-1.302085/t/Legacy/skip.t
Test-Simple-1.302085/t/Legacy/plan.t
Test-Simple-1.302085/t/Legacy/diag.t
Test-Simple-1.302085/t/Legacy/fork.t
Test-Simple-1.302085/t/Legacy/exit.t
Test-Simple-1.302085/t/Legacy/fail.t
Test-Simple-1.302085/t/Legacy/todo.t
Test-Simple-1.302085/t/Legacy/More.t
Test-Simple-1.302085/t/Legacy/auto.t
Test-Simple-1.302085/lib/Test
Test-Simple-1.302085/lib/Test/More.pm
Test-Simple-1.302085/lib/Test2
Test-Simple-1.302085/lib/Test2/API.pm
Test-Simple-1.302085/lib/Test2/Hub.pm
Test-Simple-1.302085/lib/Test2/IPC.pm
Test-Simple-1.302085/examples
Test-Simple-1.302085/examples/tools.t
Test-Simple-1.302085/t/lib/SkipAll.pm
Test-Simple-1.302085/t/Legacy/depth.t
Test-Simple-1.302085/t/Legacy/undef.t
Test-Simple-1.302085/t/Legacy/extra.t
Test-Simple-1.302085/lib/Test2/Util.pm
Test-Simple-1.302085/examples/tools.pl
Test-Simple-1.302085/t/lib/Dev
Test-Simple-1.302085/t/lib/Dev/Null.pm
Test-Simple-1.302085/t/Legacy/simple.t
Test-Simple-1.302085/t/Legacy/use_ok.t
Test-Simple-1.302085/t/Legacy/import.t
Test-Simple-1.302085/t/Legacy/c_flag.t
Test-Simple-1.302085/t/Legacy/cmp_ok.t
Test-Simple-1.302085/t/Legacy/useing.t
Test-Simple-1.302085/t/Legacy/buffer.t
Test-Simple-1.302085/t/Legacy/new_ok.t
Test-Simple-1.302085/t/Legacy/eq_set.t
Test-Simple-1.302085/t/Legacy/strays.t
Test-Simple-1.302085/lib/Test/Tester.pm
Test-Simple-1.302085/lib/Test/Simple.pm
Test-Simple-1.302085/lib/Test/use
Test-Simple-1.302085/lib/Test/use/ok.pm
Test-Simple-1.302085/lib/Test2/Event.pm
Test-Simple-1.302085/examples/subtest.t
Test-Simple-1.302085/examples/indent.pl
Test-Simple-1.302085/t/lib/SmallTest.pm
Test-Simple-1.302085/t/Legacy/explain.t
Test-Simple-1.302085/t/Legacy/missing.t
Test-Simple-1.302085/t/Legacy/capture.t
Test-Simple-1.302085/t/Legacy/threads.t
Test-Simple-1.302085/t/Legacy/skipall.t
Test-Simple-1.302085/t/Legacy/no_plan.t
Test-Simple-1.302085/lib/Test/Builder.pm
Test-Simple-1.302085/t/lib/MyOverload.pm
Test-Simple-1.302085/t/lib/NoExporter.pm
Test-Simple-1.302085/t/Legacy/no_tests.t
Test-Simple-1.302085/t/Legacy/bad_plan.t
Test-Simple-1.302085/t/Legacy/01-basic.t
Test-Simple-1.302085/t/Legacy/fail_one.t
Test-Simple-1.302085/t/Legacy/bail_out.t
Test-Simple-1.302085/t/Legacy/overload.t
Test-Simple-1.302085/t/Legacy/plan_bad.t
Test-Simple-1.302085/t/Legacy/run_test.t
Test-Simple-1.302085/t/Legacy/versions.t
Test-Simple-1.302085/t/Legacy/Bugs
Test-Simple-1.302085/t/Legacy/Bugs/600.t
Test-Simple-1.302085/t/Legacy/Bugs/629.t
Test-Simple-1.302085/t/zzz-check-breaks.t
Test-Simple-1.302085/t/Legacy/fail-more.t
Test-Simple-1.302085/t/Legacy/fail-like.t
Test-Simple-1.302085/t/Legacy/extra_one.t
Test-Simple-1.302085/t/Test2/legacy
Test-Simple-1.302085/t/Test2/legacy/TAP.t
Test-Simple-1.302085/lib/Test/Tutorial.pod
Test-Simple-1.302085/lib/Test2/Event
Test-Simple-1.302085/lib/Test2/Event/Ok.pm
Test-Simple-1.302085/t/Legacy/require_ok.t
Test-Simple-1.302085/t/Legacy/subtest
Test-Simple-1.302085/t/Legacy/subtest/do.t
Test-Simple-1.302085/t/Test2/modules
Test-Simple-1.302085/t/Test2/modules/IPC.t
Test-Simple-1.302085/t/Test2/modules/API.t
Test-Simple-1.302085/t/Test2/modules/Hub.t
Test-Simple-1.302085/xt/author
Test-Simple-1.302085/xt/author/pod-spell.t
Test-Simple-1.302085/lib/Test2/Formatter.pm
Test-Simple-1.302085/lib/Test2/API
Test-Simple-1.302085/lib/Test2/API/Stack.pm
Test-Simple-1.302085/t/Legacy/filehandles.t
Test-Simple-1.302085/t/Legacy/check_tests.t
Test-Simple-1.302085/t/Legacy/Builder
Test-Simple-1.302085/t/Legacy/Builder/try.t
Test-Simple-1.302085/t/Legacy/subtest/die.t
Test-Simple-1.302085/t/Legacy/Simple
Test-Simple-1.302085/t/Legacy/Simple/load.t
Test-Simple-1.302085/t/Test2/modules/Util.t
Test-Simple-1.302085/xt/author/pod-syntax.t
Test-Simple-1.302085/lib/Test2/Event/Note.pm
Test-Simple-1.302085/lib/Test2/Event/Skip.pm
Test-Simple-1.302085/lib/Test2/Event/Diag.pm
Test-Simple-1.302085/lib/Test2/Event/Bail.pm
Test-Simple-1.302085/lib/Test2/Event/Plan.pm
Test-Simple-1.302085/lib/Test2/Util
Test-Simple-1.302085/lib/Test2/Util/Trace.pm
Test-Simple-1.302085/lib/Test2/IPC
Test-Simple-1.302085/lib/Test2/IPC/Driver.pm
Test-Simple-1.302085/lib/Test2/Tools
Test-Simple-1.302085/lib/Test2/Tools/Tiny.pm
Test-Simple-1.302085/t/Legacy/BEGIN_use_ok.t
Test-Simple-1.302085/t/Legacy/thread_taint.t
Test-Simple-1.302085/t/Legacy/plan_no_plan.t
Test-Simple-1.302085/t/Legacy/Builder/carp.t
Test-Simple-1.302085/t/Legacy/subtest/args.t
Test-Simple-1.302085/t/Legacy/subtest/plan.t
Test-Simple-1.302085/t/Legacy/subtest/fork.t
Test-Simple-1.302085/t/Legacy/subtest/todo.t
Test-Simple-1.302085/t/Test2/modules/Event.t
Test-Simple-1.302085/lib/Test2/Transition.pod
Test-Simple-1.302085/lib/Test2/Hub
Test-Simple-1.302085/lib/Test2/Hub/Subtest.pm
Test-Simple-1.302085/lib/Test2/API/Context.pm
Test-Simple-1.302085/t/Legacy/circular_data.t
Test-Simple-1.302085/t/Legacy/plan_skip_all.t
Test-Simple-1.302085/t/Legacy/Builder/reset.t
Test-Simple-1.302085/t/Legacy/Builder/is_fh.t
Test-Simple-1.302085/t/Legacy/subtest/wstat.t
Test-Simple-1.302085/t/Legacy/subtest/basic.t
Test-Simple-1.302085/t/Legacy/Test2
Test-Simple-1.302085/t/Legacy/Test2/Subtest.t
Test-Simple-1.302085/t/Test2/behavior
Test-Simple-1.302085/t/Test2/behavior/Taint.t
Test-Simple-1.302085/lib/Test2/API/Instance.pm
Test-Simple-1.302085/lib/Test2/API/Breakage.pm
Test-Simple-1.302085/t/Legacy/harness_active.t
Test-Simple-1.302085/t/Legacy/plan_is_noplan.t
Test-Simple-1.302085/t/Legacy/is_deeply_fail.t
Test-Simple-1.302085/t/Legacy/Builder/ok_obj.t
Test-Simple-1.302085/t/Legacy/Builder/create.t
Test-Simple-1.302085/t/Legacy/Builder/output.t
Test-Simple-1.302085/t/Legacy/subtest/events.t
Test-Simple-1.302085/t/Legacy/Regression
Test-Simple-1.302085/t/Legacy/Regression/637.t
Test-Simple-1.302085/lib/Test/Tester
Test-Simple-1.302085/lib/Test/Tester/Capture.pm
Test-Simple-1.302085/lib/Test/Builder
Test-Simple-1.302085/lib/Test/Builder/Tester.pm
Test-Simple-1.302085/lib/Test/Builder/Module.pm
Test-Simple-1.302085/lib/Test2/Event/Waiting.pm
Test-Simple-1.302085/lib/Test2/Event/Generic.pm
Test-Simple-1.302085/lib/Test2/Event/Subtest.pm
Test-Simple-1.302085/lib/Test2/Formatter
Test-Simple-1.302085/lib/Test2/Formatter/TAP.pm
Test-Simple-1.302085/lib/Test2/Util/HashBase.pm
Test-Simple-1.302085/t/lib/Test/Simple
Test-Simple-1.302085/t/lib/Test/Simple/Catch.pm
Test-Simple-1.302085/t/Legacy/478-cmp_ok_hash.t
Test-Simple-1.302085/t/Legacy/Tester
Test-Simple-1.302085/t/Legacy/Tester/tbt_09do.t
Test-Simple-1.302085/t/Legacy/Builder/details.t
Test-Simple-1.302085/t/Legacy/Builder/Builder.t
Test-Simple-1.302085/t/Legacy/Builder/no_diag.t
Test-Simple-1.302085/t/Legacy/subtest/threads.t
Test-Simple-1.302085/t/Test2/modules/Event
Test-Simple-1.302085/t/Test2/modules/Event/Ok.t
Test-Simple-1.302085/t/Test2/regression
Test-Simple-1.302085/t/Test2/regression/gh_16.t
Test-Simple-1.302085/t/Test2/behavior/err_var.t
Test-Simple-1.302085/lib/Test/Tester/Delegate.pm
Test-Simple-1.302085/lib/Test2/Event/Encoding.pm
Test-Simple-1.302085/t/Legacy/BEGIN_require_ok.t
Test-Simple-1.302085/t/Legacy/overload_threads.t
Test-Simple-1.302085/t/Legacy/explain_err_vars.t
Test-Simple-1.302085/t/Legacy/Tester/tbt_03die.t
Test-Simple-1.302085/t/Legacy/Builder/has_plan.t
Test-Simple-1.302085/t/Legacy/subtest/bail_out.t
Test-Simple-1.302085/t/Test2/modules/API
Test-Simple-1.302085/t/Test2/modules/API/Stack.t
Test-Simple-1.302085/lib/Test/Builder/TodoDiag.pm
Test-Simple-1.302085/lib/Test2/Event/Exception.pm
Test-Simple-1.302085/lib/Test2/Hub/Interceptor.pm
Test-Simple-1.302085/t/Legacy/is_deeply_dne_bug.t
Test-Simple-1.302085/t/Legacy/Tester/tbt_07args.t
Test-Simple-1.302085/t/Legacy/Builder/has_plan2.t
Test-Simple-1.302085/t/Legacy/Builder/no_ending.t
Test-Simple-1.302085/t/Legacy/Builder/no_header.t
Test-Simple-1.302085/t/Legacy/subtest/predicate.t
Test-Simple-1.302085/t/Legacy/subtest/singleton.t
Test-Simple-1.302085/t/Test2/modules/Event/Plan.t
Test-Simple-1.302085/t/Test2/modules/Event/Bail.t
Test-Simple-1.302085/t/Test2/modules/Event/Diag.t
Test-Simple-1.302085/t/Test2/modules/Event/Skip.t
Test-Simple-1.302085/t/Test2/modules/Event/Note.t
Test-Simple-1.302085/t/Test2/modules/Util
Test-Simple-1.302085/t/Test2/modules/Util/Trace.t
Test-Simple-1.302085/t/Test2/modules/IPC
Test-Simple-1.302085/t/Test2/modules/IPC/Driver.t
Test-Simple-1.302085/t/Test2/modules/Tools
Test-Simple-1.302085/t/Test2/modules/Tools/Tiny.t
Test-Simple-1.302085/t/Test2/behavior/Formatter.t
Test-Simple-1.302085/lib/Test/Builder/Formatter.pm
Test-Simple-1.302085/lib/Test/Builder/IO
Test-Simple-1.302085/lib/Test/Builder/IO/Scalar.pm
Test-Simple-1.302085/lib/Test2/IPC/Driver
Test-Simple-1.302085/lib/Test2/IPC/Driver/Files.pm
Test-Simple-1.302085/t/Legacy/Tester/tbt_01basic.t
Test-Simple-1.302085/t/Legacy/Builder/is_passing.t
Test-Simple-1.302085/t/Test2/modules/Hub
Test-Simple-1.302085/t/Test2/modules/Hub/Subtest.t
Test-Simple-1.302085/t/Test2/modules/API/Context.t
Test-Simple-1.302085/t/Test2/behavior/init_croak.t
Test-Simple-1.302085/lib/Test2/Event/TAP
Test-Simple-1.302085/lib/Test2/Event/TAP/Version.pm
Test-Simple-1.302085/lib/Test2/Util/ExternalMeta.pm
Test-Simple-1.302085/t/lib/Test/Builder
Test-Simple-1.302085/t/lib/Test/Builder/NoOutput.pm
Test-Simple-1.302085/t/Legacy/Builder/maybe_regex.t
Test-Simple-1.302085/t/Legacy/subtest/for_do_t.test
Test-Simple-1.302085/t/Legacy/Regression/6_cmp_ok.t
Test-Simple-1.302085/t/regression
Test-Simple-1.302085/t/regression/662-tbt-no-plan.t
Test-Simple-1.302085/t/Test2/modules/API/Breakage.t
Test-Simple-1.302085/t/Test2/modules/API/Instance.t
Test-Simple-1.302085/t/Test2/behavior/no_load_api.t
Test-Simple-1.302085/t/Legacy/00test_harness_check.t
Test-Simple-1.302085/t/Legacy/plan_shouldnt_import.t
Test-Simple-1.302085/t/Legacy/Tester/tbt_08subtest.t
Test-Simple-1.302085/t/Legacy/Builder/done_testing.t
Test-Simple-1.302085/t/Legacy/Builder/current_test.t
Test-Simple-1.302085/t/Legacy/subtest/line_numbers.t
Test-Simple-1.302085/t/Test2/modules/Event/Waiting.t
Test-Simple-1.302085/t/Test2/modules/Event/Subtest.t
Test-Simple-1.302085/t/Test2/modules/Event/Generic.t
Test-Simple-1.302085/t/Test2/modules/Formatter
Test-Simple-1.302085/t/Test2/modules/Formatter/TAP.t
Test-Simple-1.302085/t/Test2/modules/Util/HashBase.t
Test-Simple-1.302085/t/Test2/behavior/Subtest_todo.t
Test-Simple-1.302085/t/Test2/behavior/Subtest_plan.t
Test-Simple-1.302085/lib/Test/Tester/CaptureRunner.pm
Test-Simple-1.302085/lib/Test/Builder/Tester
Test-Simple-1.302085/lib/Test/Builder/Tester/Color.pm
Test-Simple-1.302085/t/Legacy/Tester/tbt_04line_num.t
Test-Simple-1.302085/t/Legacy/Tester/tbt_05faildiag.t
Test-Simple-1.302085/t/Legacy/Builder/reset_outputs.t
Test-Simple-1.302085/t/Legacy/subtest/implicit_done.t
Test-Simple-1.302085/t/Legacy/Regression/736_use_ok.t
Test-Simple-1.302085/t/Test2/acceptance
Test-Simple-1.302085/t/Test2/acceptance/try_it_fork.t
Test-Simple-1.302085/t/Test2/acceptance/try_it_plan.t
Test-Simple-1.302085/t/Test2/acceptance/try_it_skip.t
Test-Simple-1.302085/t/Test2/acceptance/try_it_todo.t
Test-Simple-1.302085/t/Test2/behavior/special_names.t
Test-Simple-1.302085/t/Legacy/is_deeply_with_threads.t
Test-Simple-1.302085/t/Legacy/Tester/tbt_06errormess.t
Test-Simple-1.302085/t/Legacy/Tester/tbt_02fhrestore.t
Test-Simple-1.302085/t/Legacy/Builder/no_plan_at_all.t
Test-Simple-1.302085/t/regression/no_name_in_subtest.t
Test-Simple-1.302085/t/regression/642_persistent_end.t
Test-Simple-1.302085/t/Test2/modules/Event/Exception.t
Test-Simple-1.302085/t/Test2/modules/Hub/Interceptor.t
Test-Simple-1.302085/t/Test2/behavior/Subtest_events.t
Test-Simple-1.302085/t/Legacy/Tester/tbt_09do_script.pl
Test-Simple-1.302085/t/Test2/modules/IPC/Driver
Test-Simple-1.302085/t/Test2/modules/IPC/Driver/Files.t
Test-Simple-1.302085/t/Test2/behavior/trace_signature.t
Test-Simple-1.302085/t/Test2/behavior/subtest_bailout.t
Test-Simple-1.302085/t/regression/757-reset_in_subtest.t
Test-Simple-1.302085/t/regression/684-nested_todo_diag.t
Test-Simple-1.302085/t/Test2/modules/Util/ExternalMeta.t
Test-Simple-1.302085/t/Test2/acceptance/try_it_threads.t
Warning (usually harmless): 'YAML' not installed, will not store persistent state
cpan[2]>
Tip: perl CPAN 的镜像地址可以参考 CPAN