Mrfei 发表于 2018-7-15 06:11:13

Cisco备份服务器建制(TFTP SERVER ON LINUX)

  1、备份服务器地址10.55.1.100,OS位RHEL 6.4
  2、yum本地仓库安装tftp服务
  # yum repolist
  Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit, security,
  : subscription-manager, tmprepo, verify, versionlock
  This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
  Loading support for Red Hat kernel ABI
  localrepo                                                                                 | 3.9 kB   00:00 ...
  localrepo/primary_db                                                                        | 3.1 MB   00:00 ...

  repo>  localrepo                                             localrepo                                              3,648
  repolist: 3,648
  # yum info tftp
  Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit, security,
  : subscription-manager, tmprepo, verify, versionlock
  This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
  Loading support for Red Hat kernel ABI
  Available Packages
  Name      : tftp
  Arch      : x86_64
  Version   : 0.49
  Release   : 7.el6
  Size      : 32 k
  Repo      : localrepo
  Summary   : The client for the Trivial File Transfer Protocol (TFTP)
  URL         : http://www.kernel.org/pub/software/network/tftp/
  License   : BSD
  Description : The Trivial File Transfer Protocol (TFTP) is normally used only for
  : booting diskless workstations.The tftp package provides the user
  : interface for TFTP, which allows users to transfer files to and from a
  : remote machine.This program and TFTP provide very little security,
  : and should not be enabled unless it is expressly needed.
  yum -y install tftp xinetd tftp-server
  3、配置tftp server
  关闭selinux和iptables
  ~]# vim /etc/xinetd.d/tftp
  # default: off
  # description: The tftp server serves files using the trivial file transfer \
  #    protocol.The tftp protocol is often used to boot diskless \
  #    workstations, download configuration files to network-aware printers, \
  #    and to start the installation process for some operating systems.
  service tftp
  {
  socket_type      = dgram
  protocol      = udp
  wait            = yes
  user            = root
  server            = /usr/sbin/in.tftpd
  server_args      = -s /networkbackup -c   设定TFTP传输的文件保存的路径 -c锁定目录
  disable            = no   disable修改为no进行开启
  per_source      = 11
  cps            = 100 2
  flags            = IPv4
  }
  chmod 777 -R /networkbackup   给备份文件夹授予权限
  重启xientd.d,是进程是tftp服务的父进程
  # service xinetd restart
  Stopping xinetd:                                          
  Starting xinetd:                                          
  查看tftp是否启动正常
  netstat -a | grep tftp
  udp      0      0 *:tftp                      *:*
  添加开机自启动
  chkconfig --add tftp
  4、cisco设备进行tftp备份
  User Access Verification
  Username:
  Username:
  Username: 1080054
  Password:
  Aging1#copy
  Aging1#copy ru
  Aging1#copy running-config tf
  Aging1#copy running-config tftp:
  Address or name of remote host []? 10.55.1.100
  Destination filename ?
  !!!
  8850 bytes copied in 2.184 secs (4052 bytes/sec)
  5、备份完成
  # ll
  total 412
  -rw-rw-rw- 1 nobody nobody7742 Jan 19 12:34 172.16.1.2-tfn-confg
  -rw-rw-rw- 1 nobody nobody8065 Jan 19 12:35 172.16.1.3-dyx-confg
  -rw-rw-rw- 1 nobody nobody8850 Jan 19 11:20 aging1-confg
  -rw-rw-rw- 1 nobody nobody8781 Jan 19 11:20 aging2-confg
  -rw-rw-rw- 1 nobody nobody8894 Jan 19 11:19 aging3-confg
  -rw-rw-rw- 1 nobody nobody1663 Jan 19 11:21 ap-warehouse2-confg
  -rw-rw-rw- 1 nobody nobody1647 Jan 19 11:22 ap-warehouse4-confg
  -rw-rw-rw- 1 nobody nobody8672 Jan 19 11:19 caigou-confg
  -rw-rw-rw- 1 nobody nobody4725 Jan 19 11:18 caiwu-confg
  -rw-rw-rw- 1 nobody nobody5410 Jan 19 11:16 chanxiao-confg
  -rw-rw-rw- 1 nobody nobody 13745 Jan 19 12:36 core3750-confg
  -rw-rw-rw- 1 nobody nobody 38573 Jan 19 12:08 cptw_4507r_lcm1-confg
  -rw-rw-rw- 1 nobody nobody 26937 Jan 19 11:24 cptw_4507r_lcm2-confg
  -rw-rw-rw- 1 nobody nobody 50960 Jan 19 11:13 cptw_4507r_lcm3-confg
  -rw-rw-rw- 1 nobody nobody8992 Jan 19 11:16 cr1-confg
  -rw-rw-rw- 1 nobody nobody5217 Jan 19 11:15 cr2-confg
  -rw-rw-rw- 1 nobody nobody3426 Jan 19 11:14 cr3-confg
  -rw-rw-rw- 1 nobody nobody5158 Jan 19 11:14 cr4-confg
  -rw-rw-rw- 1 nobody nobody1789 Jan 19 12:18 dmz-confg
  -rw-rw-rw- 1 nobody nobody4565 Jan 19 12:17 dongli-confg
  -rw-rw-rw- 1 nobody nobody3020 Jan 19 12:17 gaswitch-confg
  -rw-r--r-- 1 root   root    5224 Jan 19 12:40 GAYBSWITCH-confg
  -rw-rw-rw- 1 nobody nobody4293 Jan 19 12:37 gbyg-confg
  -rw-rw-rw- 1 nobody nobody3766 Jan 19 11:14 hp-e-confg
  -rw-rw-rw- 1 nobody nobody4462 Jan 19 12:07 lcm1-fa-confg
  -rw-rw-rw- 1 nobody nobody5048 Jan 19 12:07 lcm1-oa-confg
  -rw-rw-rw- 1 nobody nobody2860 Jan 19 12:06 lcm1-rac-3750-confg
  -rw-rw-rw- 1 nobody nobody2877 Jan 19 11:12 lcm3jiexi24k-confg
  -rw-rw-rw- 1 nobody nobody 13519 Jan 19 11:28 p52-confg
  -rw-rw-rw- 1 nobody nobody1637 Jan 19 11:22 pc-warehouse1-confg
  -rw-rw-rw- 1 nobody nobody1495 Jan 19 11:22 pc-warehouse6-confg
  -rw-rw-rw- 1 nobody nobody5119 Jan 19 11:27 phonerouter-confg
  -rw-rw-rw- 1 nobody nobody1961 Jan 19 11:23 pur-confg
  -rw-rw-rw- 1 nobody nobody4960 Jan 19 11:11 system1-confg
  -rw-rw-rw- 1 nobody nobody9560 Jan 19 11:10 system2-confg
  -rw-rw-rw- 1 nobody nobody1899 Jan 19 11:23 vipap-confg
  -rw-rw-rw- 1 nobody nobody6159 Jan 19 11:09 warehouse-confg
  -rw-rw-rw- 1 nobody nobody3098 Jan 19 11:09 xuniji-confg
  -rw-rw-rw- 1 nobody nobody9190 Jan 19 11:08 yewu-confg
  -rw-rw-rw- 1 nobody nobody2990 Jan 19 12:19 yiwushi-1-confg
  -rw-rw-rw- 1 nobody nobody3691 Jan 19 12:34 yiwushi-2-confg
  -rw-rw-rw- 1 nobody nobody3682 Jan 19 11:26 yiwushi-3-confg
页: [1]
查看完整版本: Cisco备份服务器建制(TFTP SERVER ON LINUX)