实操

https://www.520mwx.com/view/63140

1、./configure

appops@hzabj-newsclient-test:~/tcpcopy/tcpcopy-master$ ./configure
checking for OS
 + Linux 3.16.0-4-amd64 x86_64
checking for C compiler ... not found

./configure: error: C compiler cc is not found

没有安装C语言的编译工具CC,那就先安装CC

yum -y install gcc gcc-c++ autoconf automake make

提示:-bash: yum: command not found 没有安装yum
安装yum

sudo apt-get install yum
此时提示:

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for appops:

所以申请root权限

安装yum:

Setting up python-lzma (0.5.3-2+b1) ...
Setting up python-pycurl (7.19.5-3) ...
Setting up python-sqlite (1.0.1-11) ...
Setting up python-urlgrabber (3.9.1-4.1) ...
Setting up rpm-common (4.11.3-1.1) ...
Setting up rpm2cpio (4.11.3-1.1) ...
Setting up rpm (4.11.3-1.1) ...
Setting up python-rpm (4.11.3-1.1) ...
Setting up python-sqlitecachec (1.1.4-1) ...
Setting up yum (3.4.3-3) ...
Processing triggers for libc-bin (2.19-18+deb8u9) ...
Processing triggers for python-support (1.0.15) ...

验证是否安装成功:

yum --version

root@hzabj-newsclient-ov-5:~# yum --version
3.4.3
root@hzabj-newsclient-ov-5:~# cat /proc/version
Linux version 3.16.0-4-amd64 ([email protected]) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.43-2 (2017-04-30)
root@hzabj-newsclient-ov-5:~# uname -a
Linux hzabj-newsclient-ov-5.server.163.org 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
root@hzabj-newsclient-ov-5:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.8 (jessie)
Release:    8.8
Codename:   jessie

https://www.jianshu.com/p/92016e997883

安装lrzsz

apt-get install lrzsz

安装gcc
apt-get install gcc

将下载的tcpcopy包上传,解压

然后进入到目录下

root@hzabj-newsclient-ov-5:/home/appops/tcpcopy# cd tcpcopy-master/
root@hzabj-newsclient-ov-5:/home/appops/tcpcopy/tcpcopy-master# ls
AUTHORS  auto  ChangeLog  conf  configure  COPYING  LICENSE  NEWS  README  README.md  src

执行./configure命令,进行配置

root@hzabj-newsclient-ov-5:/home/appops/tcpcopy/tcpcopy-master# ./configure 
checking for OS
 + Linux 3.16.0-4-amd64 x86_64
checking for C compiler ... found
 + using GNU C compiler
 + gcc version: 4.9.2 (Debian 4.9.2-10+deb8u2) 
checking for gcc -pipe switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for unistd.h ... found
checking for limits.h ... found
checking for inttypes.h ... found
checking for Linux specific features
checking for O_DIRECT ... found
checking for TCP_DEFER_ACCEPT ... found
checking for TCP_KEEPIDLE, TCP_KEEPINTVL, TCP_KEEPCNT ... found
checking for TCP_INFO ... found
checking for int size ... 4 bytes
checking for long size ... 8 bytes
checking for long long size ... 8 bytes
checking for void * size ... 8 bytes
checking for uint64_t ... found
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... found
checking for in_addr_t ... found
checking for in_port_t ... found
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t found
checking for size_t size ... 8 bytes
checking for off_t size ... 8 bytes
checking for time_t size ... 8 bytes
checking for pread() ... found
checking for pwrite() ... found
checking for sigaction() ... found
checking for posix_memalign() ... found
checking for memalign() ... found
checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero", MAP_SHARED) ... found
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
checking for epoll ... found
creating objs/Makefile

Configuration summary

  tcpcopy path prefix: "/usr/local/tcpcopy"
  tcpcopy binary file: "/usr/local/tcpcopy/sbin/tcpcopy"
  tcpcopy configuration prefix: "/usr/local/tcpcopy/conf"
  tcpcopy configuration file: "/usr/local/tcpcopy/conf/plugin.conf"
  tcpcopy pid file: "/usr/local/tcpcopy/logs/tcpcopy.pid"
  tcpcopy error log file: "/usr/local/tcpcopy/logs/error_tcpcopy.log"
root@hzabj-newsclient-ov-5:/home/appops/tcpcopy/tcpcopy-master# 

执行make指令,提示:

root@hzabj-newsclient-ov-5:/home/appops/tcpcopy/tcpcopy-master# make
-bash: make: command not found

需要先安装构建工具:

apt-get install build-essential

root@hzabj-newsclient-ov-5:~# apt-get install build-essential 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  dpkg-dev g++ g++-4.9 libdpkg-perl libstdc++-4.9-dev make
Suggested packages:
  debian-keyring g++-multilib g++-4.9-multilib gcc-4.9-doc libstdc++6-4.9-dbg libstdc++-4.9-doc make-doc
Recommended packages:
  fakeroot libalgorithm-merge-perl libfile-fcntllock-perl
The following NEW packages will be installed:
  build-essential dpkg-dev g++ g++-4.9 libdpkg-perl libstdc++-4.9-dev make
0 upgraded, 7 newly installed, 0 to remove and 153 not upgraded.
Need to get 21.7 MB of archives.
After this operation, 47.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.jaist.ac.jp/debian/ jessie/main g++ amd64 4:4.9.2-2 [1,530 B]
Get:2 http://ftp.jaist.ac.jp/debian/ jessie/main make amd64 4.0-8.1 [349 kB]
Get:3 http://ftp.jaist.ac.jp/debian/ jessie/main libdpkg-perl all 1.17.27 [1,075 kB]
Get:4 http://ftp.jaist.ac.jp/debian/ jessie/main dpkg-dev all 1.17.27 [1,548 kB]
Get:5 http://ftp.jaist.ac.jp/debian/ jessie/main build-essential amd64 11.7 [7,114 B]
Get:6 http://security.debian.org/ jessie/updates/main libstdc++-4.9-dev amd64 4.9.2-10+deb8u2 [1,118 kB]
Get:7 http://security.debian.org/ jessie/updates/main g++-4.9 amd64 4.9.2-10+deb8u2 [17.6 MB]
Fetched 21.7 MB in 0s (24.6 MB/s)    
Selecting previously unselected package libstdc++-4.9-dev:amd64.
(Reading database ... 51378 files and directories currently installed.)
Preparing to unpack .../libstdc++-4.9-dev_4.9.2-10+deb8u2_amd64.deb ...
Unpacking libstdc++-4.9-dev:amd64 (4.9.2-10+deb8u2) ...
Selecting previously unselected package g++-4.9.
Preparing to unpack .../g++-4.9_4.9.2-10+deb8u2_amd64.deb ...
Unpacking g++-4.9 (4.9.2-10+deb8u2) ...
Selecting previously unselected package g++.
Preparing to unpack .../g++_4%3a4.9.2-2_amd64.deb ...
Unpacking g++ (4:4.9.2-2) ...
Selecting previously unselected package make.
Preparing to unpack .../make_4.0-8.1_amd64.deb ...
Unpacking make (4.0-8.1) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../libdpkg-perl_1.17.27_all.deb ...
Unpacking libdpkg-perl (1.17.27) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../dpkg-dev_1.17.27_all.deb ...
Unpacking dpkg-dev (1.17.27) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../build-essential_11.7_amd64.deb ...
Unpacking build-essential (11.7) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libstdc++-4.9-dev:amd64 (4.9.2-10+deb8u2) ...
Setting up g++-4.9 (4.9.2-10+deb8u2) ...
Setting up g++ (4:4.9.2-2) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up make (4.0-8.1) ...
Setting up libdpkg-perl (1.17.27) ...
Setting up dpkg-dev (1.17.27) ...
Setting up build-essential (11.7) ...
root@hzabj-newsclient-ov-5:~# 

然后执行make指令:

root@hzabj-newsclient-ov-5:/home/appops/tcpcopy/tcpcopy-master# make
make -f objs/Makefile
make[1]: Entering directory '/home/appops/tcpcopy/tcpcopy-master'
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/core/tc_alloc.o \
    src/core/tc_alloc.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/core/tc_log.o \
    src/core/tc_log.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/core/tc_palloc.o \
    src/core/tc_palloc.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/core/tc_array.o \
    src/core/tc_array.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/core/tc_link_list.o \
    src/core/tc_link_list.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/core/tc_hash.o \
    src/core/tc_hash.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/core/tc_signal.o \
    src/core/tc_signal.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/core/tc_time.o \
    src/core/tc_time.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/core/tc_conf_file.o \
    src/core/tc_conf_file.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/core/tc_rbtree.o \
    src/core/tc_rbtree.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/core/tc_daemon.o \
    src/core/tc_daemon.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/digest/tc_evp.o \
    src/digest/tc_evp.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/event/tc_event.o \
    src/event/tc_event.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/event/tc_event_timer.o \
    src/event/tc_event_timer.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/event/tc_epoll_module.o \
    src/event/tc_epoll_module.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/communication/tc_socket.o \
    src/communication/tc_socket.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/util/tc_util.o \
    src/util/tc_util.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/tcpcopy/tc_manager.o \
    src/tcpcopy/tc_manager.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/tcpcopy/tc_packets_module.o \
    src/tcpcopy/tc_packets_module.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/tcpcopy/tc_message_module.o \
    src/tcpcopy/tc_message_module.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/tcpcopy/tc_session.o \
    src/tcpcopy/tc_session.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/src/tcpcopy/main.o \
    src/tcpcopy/main.c
cc -c -pipe  -std=gnu99 -D_FILE_OFFSET_BITS=64 -O3 -Wno-unused-parameter -W -Wall -Wunused-function -pedantic -g  -I src/core -I src/digest -I src/event -I src/communication -I src/util -I src/tcpcopy -I objs \
    -o objs/tc_modules.o \
    objs/tc_modules.c
cc -o objs/tcpcopy \
objs/src/core/tc_alloc.o \
objs/src/core/tc_log.o \
objs/src/core/tc_palloc.o \
objs/src/core/tc_array.o \
objs/src/core/tc_link_list.o \
objs/src/core/tc_hash.o \
objs/src/core/tc_signal.o \
objs/src/core/tc_time.o \
objs/src/core/tc_conf_file.o \
objs/src/core/tc_rbtree.o \
objs/src/core/tc_daemon.o \
objs/src/digest/tc_evp.o \
objs/src/event/tc_event.o \
objs/src/event/tc_event_timer.o \
objs/src/event/tc_epoll_module.o \
objs/src/communication/tc_socket.o \
objs/src/util/tc_util.o \
objs/src/tcpcopy/tc_manager.o \
objs/src/tcpcopy/tc_packets_module.o \
objs/src/tcpcopy/tc_message_module.o \
objs/src/tcpcopy/tc_session.o \
objs/src/tcpcopy/main.o \
objs/tc_modules.o
make[1]: Leaving directory '/home/appops/tcpcopy/tcpcopy-master'
root@hzabj-newsclient-ov-5:/home/appops/tcpcopy/tcpcopy-master# 

再执行make install

root@hzabj-newsclient-ov-5:/home/appops/tcpcopy/tcpcopy-master# make install 
make -f objs/Makefile install
make[1]: Entering directory '/home/appops/tcpcopy/tcpcopy-master'
test -d '/usr/local/tcpcopy' || mkdir -p '/usr/local/tcpcopy'
test -d '/usr/local/tcpcopy/sbin'       || mkdir -p '/usr/local/tcpcopy/sbin'
test ! -f '/usr/local/tcpcopy/sbin/tcpcopy'         || mv '/usr/local/tcpcopy/sbin/tcpcopy'               '/usr/local/tcpcopy/sbin/tcpcopy.old'
cp objs/tcpcopy '/usr/local/tcpcopy/sbin/tcpcopy'
test -d '/usr/local/tcpcopy/conf'       || mkdir -p '/usr/local/tcpcopy/conf'
test -f '/usr/local/tcpcopy/conf/plugin.conf'       || cp conf/plugin.conf '/usr/local/tcpcopy/conf/plugin.conf'
cp conf/plugin.conf '/usr/local/tcpcopy/conf/plugin.conf.default'
test -d '/usr/local/tcpcopy/logs'       || mkdir -p '/usr/local/tcpcopy/logs'
test -d '/usr/local/tcpcopy/logs' ||        mkdir -p '/usr/local/tcpcopy/logs'
make[1]: Leaving directory '/home/appops/tcpcopy/tcpcopy-master'
root@hzabj-newsclient-ov-5:/home/appops/tcpcopy/tcpcopy-master# 

删除
重新下载1.0

root@hzabj-newsclient-ov-5:/home/appops# wget https://github.com/session-replay-tools/tcpcopy/archive/1.0.0.tar.gz -O tcpcopy-1.0.0.tar.gz
--2019-10-31 22:02:42--  https://github.com/session-replay-tools/tcpcopy/archive/1.0.0.tar.gz
Resolving github.com (github.com)... 13.250.177.223
Connecting to github.com (github.com)|13.250.177.223|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/session-replay-tools/tcpcopy/tar.gz/1.0.0 [following]
--2019-10-31 22:02:44--  https://codeload.github.com/session-replay-tools/tcpcopy/tar.gz/1.0.0
Resolving codeload.github.com (codeload.github.com)... 54.251.140.56
Connecting to codeload.github.com (codeload.github.com)|54.251.140.56|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘tcpcopy-1.0.0.tar.gz’

tcpcopy-1.0.0.tar.gz              [         <=>                                       ]  69.25K  17.9KB/s   in 3.9s   

2019-10-31 22:02:50 (17.9 KB/s) - ‘tcpcopy-1.0.0.tar.gz’ saved [70910]
root@hzabj-newsclient-ov-5:/home/appops# sudo apt-get install libpcap-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libpcap0.8 libpcap0.8-dev
The following NEW packages will be installed:
  libpcap-dev libpcap0.8-dev
The following packages will be upgraded:
  libpcap0.8
1 upgraded, 2 newly installed, 0 to remove and 152 not upgraded.
Need to get 387 kB of archives.
After this operation, 807 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://security.debian.org/ jessie/updates/main libpcap0.8 amd64 1.6.2-2+deb8u1 [134 kB]
Get:2 http://security.debian.org/ jessie/updates/main libpcap0.8-dev amd64 1.6.2-2+deb8u1 [229 kB]
Get:3 http://security.debian.org/ jessie/updates/main libpcap-dev all 1.6.2-2+deb8u1 [23.8 kB]                        
Fetched 387 kB in 37s (10.3 kB/s)                                                                                     
Reading changelogs... Done
(Reading database ... 52589 files and directories currently installed.)
Preparing to unpack .../libpcap0.8_1.6.2-2+deb8u1_amd64.deb ...
Unpacking libpcap0.8:amd64 (1.6.2-2+deb8u1) over (1.6.2-2) ...
Selecting previously unselected package libpcap0.8-dev.
Preparing to unpack .../libpcap0.8-dev_1.6.2-2+deb8u1_amd64.deb ...
Unpacking libpcap0.8-dev (1.6.2-2+deb8u1) ...
Selecting previously unselected package libpcap-dev.
Preparing to unpack .../libpcap-dev_1.6.2-2+deb8u1_all.deb ...
Unpacking libpcap-dev (1.6.2-2+deb8u1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libpcap0.8:amd64 (1.6.2-2+deb8u1) ...
Setting up libpcap0.8-dev (1.6.2-2+deb8u1) ...
Setting up libpcap-dev (1.6.2-2+deb8u1) ...
Processing triggers for libc-bin (2.19-18+deb8u9) ...
root@hzabj-newsclient-ov-5:/home/appops# 
root@hzabj-newsclient-ov-5:/home/appops# sudo ln -s /usr/include/pcap-bpf.h /usr/include/net/bpf.h
root@hzabj-newsclient-ov-5:/home/appops# sudo apt-get install tcl-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libtcl8.6 tcl tcl8.6 tcl8.6-dev zlib1g-dev
Suggested packages:
  tcl-doc tcl-tclreadline tcl8.6-doc
The following NEW packages will be installed:
  libtcl8.6 tcl tcl-dev tcl8.6 tcl8.6-dev zlib1g-dev
0 upgraded, 6 newly installed, 0 to remove and 152 not upgraded.
Need to get 2,309 kB of archives.
After this operation, 9,192 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.jaist.ac.jp/debian/ jessie/main libtcl8.6 amd64 8.6.2+dfsg-2 [978 kB]
Get:2 http://ftp.jaist.ac.jp/debian/ jessie/main tcl8.6 amd64 8.6.2+dfsg-2 [122 kB]
Get:3 http://ftp.jaist.ac.jp/debian/ jessie/main tcl amd64 8.6.0+8 [5,366 B]
Get:4 http://ftp.jaist.ac.jp/debian/ jessie/main zlib1g-dev amd64 1:1.2.8.dfsg-2+b1 [206 kB]
Get:5 http://ftp.jaist.ac.jp/debian/ jessie/main tcl8.6-dev amd64 8.6.2+dfsg-2 [990 kB]
Get:6 http://ftp.jaist.ac.jp/debian/ jessie/main tcl-dev amd64 8.6.0+8 [7,716 B]
Fetched 2,309 kB in 0s (31.9 MB/s)
Selecting previously unselected package libtcl8.6:amd64.
(Reading database ... 52688 files and directories currently installed.)
Preparing to unpack .../libtcl8.6_8.6.2+dfsg-2_amd64.deb ...
Unpacking libtcl8.6:amd64 (8.6.2+dfsg-2) ...
Selecting previously unselected package tcl8.6.
Preparing to unpack .../tcl8.6_8.6.2+dfsg-2_amd64.deb ...
Unpacking tcl8.6 (8.6.2+dfsg-2) ...
Selecting previously unselected package tcl.
Preparing to unpack .../archives/tcl_8.6.0+8_amd64.deb ...
Unpacking tcl (8.6.0+8) ...
Selecting previously unselected package zlib1g-dev:amd64.
Preparing to unpack .../zlib1g-dev_1%3a1.2.8.dfsg-2+b1_amd64.deb ...
Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2+b1) ...
Selecting previously unselected package tcl8.6-dev:amd64.
Preparing to unpack .../tcl8.6-dev_8.6.2+dfsg-2_amd64.deb ...
Unpacking tcl8.6-dev:amd64 (8.6.2+dfsg-2) ...
Selecting previously unselected package tcl-dev:amd64.
Preparing to unpack .../tcl-dev_8.6.0+8_amd64.deb ...
Unpacking tcl-dev:amd64 (8.6.0+8) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libtcl8.6:amd64 (8.6.2+dfsg-2) ...
Setting up tcl8.6 (8.6.2+dfsg-2) ...
Setting up tcl (8.6.0+8) ...
Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2+b1) ...
Setting up tcl8.6-dev:amd64 (8.6.2+dfsg-2) ...
Setting up tcl-dev:amd64 (8.6.0+8) ...
Processing triggers for libc-bin (2.19-18+deb8u9) ...
root@hzabj-newsclient-ov-5:/home/appops#

解压
root@hzabj-newsclient-ov-5:/home/appops# tar zxvf tcpcopy-1.0.0.tar.gz

root@hzabj-newsclient-ov-5:/home/appops# ls
blaster newsclient-gate sentry-javaagent tcpcopy-1.0.0 tcpcopy-1.0.0.tar.gz
./configure (默认raw socket方式抓包)

make

make install

root@hzabj-newsclient-ov-5:~# /usr/local/tcpcopy/sbin/tcpcopy -v
tcpcopy version:1.0.0
安装成功

https://cloud.tencent.com/developer/article/1363025

你可能感兴趣的:(实操)