Linux环境下安装tcping的两种方法以及使用实例
1、如要使用源代码编译安装,请先下载源代码包:
https://andyx.net/tcping_is_a_super-easy_tool_for_direct_port/
请在下载后自行校对MD5或者SHA1文件指纹以验证文件完整性:
文件名称:tcping-1.3.5-for-linux.tar.gz
文件大小:5889 字节
MD5 :F9DD03C730DB6999CA8BECA479F078E3
SHA1 :ECC5FE7FB2F8E86A1FC2D09651310B26FA922C7B
2、准备安装环境,需要安装gcc:
# RHEL/CentOS5-6-7版本使用yum安装gcc与make命令如下 :
yum -y install gcc make
# RHEL8/CentOS8使用dnf安装gcc与make 命令如下:
dnf -y install gcc make
3、开始解压并编译tcping-1.3.5-for-linux.tar.gz
# 解压缩tcping-1.3.5源代码 ,命令如下:
tar -xf tcping-1.3.5-for-linux.tar.gz
# 进入解压缩tcping-1.3.5的路径 ,命令如下:
cd tcping-1.3.5
# 开始编译tcping-1.3.5 ,命令如下:
make
#反馈显示 gcc -o tcping -Wall -DHAVE_HSTRERROR tcping.c 编译结束
# 将编译好的tcping放置到/usr/local/bin/下 ,命令如下:
cp tcping /usr/local/bin/
# 然后在控制台直接打tcping即可使用,想要查看tcping使用方法可以参见
tcping --help

1、这个步骤就非常简单了,无需手动下载任何文件。
准备安装环境,需要安装python-pip:
# RHEL/CentOS5-6-7使用yum安装Python-pip ,命令如下:
yum -y install python-pip
# RHEL8/CentOS8使用dnf安装Python-pip ,命令如下:
dnf -y install python-pip

2、# 使用Python-pip进一步安装 ,命令如下:
pip install tcping
# 反馈 Successfully installed click-7.0 tcping-0.1.1rc1 安装完成

1、参考命令如下:
tcping -t 20 -c 7 andyx.net -p 80
# 以上命令参数解释为:
-p : 指定端口80
-t : 限定超时时间,以秒为单位 20秒
-c : 探测多少次后结束 7次
