Centos下安装nc命令工具及问题解答
2018-03-07 12:03
357 查看
netcat(nc)是一个简单而有用的工具,被誉为网络安全界的“瑞士均道”,不仅可以通过使用TCP或UDP协议的网络连接读写数据,同时还是一个功能强大的网络调试和探测工具,能够建立你需要的几乎所有类型的网络连接。在Linux终端窗口可以直接使用yum工具进行安装:
安装完毕后,在终端模式下运行nc -help查看命令是否正常安装
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
OK,安装正常。下面我们就可以使用nc -l 9999 来监听端口,并发送数据;
2
3
4
在我的CentOS 6.4(64-bit) 环境中执行 nc -l 9999 监听命令遇到protocol not available。
2
先先后后把nc卸载再安装了好几次,还是没有解决问题;最终在https://access.redhat.com/solutions/1753753 中找到了解决方法和问题原因。
解决方法如下:
2
3
4
5
6
7
8
另:本系统为64位操作系统,若读者使用的是i386 (32-bit),可以使用如下链接:
http://blog.csdn.net/nuli888/article/details/51867863
[root@master01 spark]# yum install nc.x86_641
安装完毕后,在终端模式下运行nc -help查看命令是否正常安装
[hadoop@master01 spark]$ nc -help usage: nc [-46DdhklnrStUuvzC] [-i interval] [-p source_port] [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_version] [-x proxy_address[:port]] [hostname] [port[s]] Command Summary: -4 Use IPv4 -6 Use IPv6 -D Enable the debug socket option -d Detach from stdin -h This help text -i secs Delay interval for lines sent, ports scanned fc2d -k Keep inbound sockets open for multiple connects -l Listen mode, for inbound connects -n Suppress name/port resolutions -p port Specify local port for remote connects -r Randomize remote ports -S Enable the TCP MD5 signature option -s addr Local source address -T ToS Set IP Type of Service -C Send CRLF as line-ending -t Answer TELNET negotiation -U Use UNIX domain socket -u UDP mode -v Verbose -w secs Timeout for connects and final net reads -X proto Proxy protocol: "4", "5" (SOCKS) or "connect" -x addr[:port] Specify proxy address and port -z Zero-I/O mode [used for scanning] Port numbers can be individual or ranges: lo-hi [inclusive]1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
OK,安装正常。下面我们就可以使用nc -l 9999 来监听端口,并发送数据;
[hadoop@master01 spark]$ nc -l 9999 Hello world! How are you? Goodbye!1
2
3
4
在我的CentOS 6.4(64-bit) 环境中执行 nc -l 9999 监听命令遇到protocol not available。
[hadoop@master01 spark]$ nc -l 9999 nc: Protocol not available1
2
先先后后把nc卸载再安装了好几次,还是没有解决问题;最终在https://access.redhat.com/solutions/1753753 中找到了解决方法和问题原因。
解决方法如下:
# Removes the old package yum erase nc # Manually downloads the working package from the Official Repository wget http://vault.centos.org/6.6/os/x86_64/Packages/nc-1.84-22.el6.x86_64.rpm # Installs the package rpm -iUv nc-1.84-22.el6.x86_64.rpm1
2
3
4
5
6
7
8
另:本系统为64位操作系统,若读者使用的是i386 (32-bit),可以使用如下链接:
wget http://vault.centos.org/6.6/os/i386/Packages/nc-1.84-22.el6.i686.rpm[/code]href="http://blog.csdn.net/juexin840/article/details/67635080" target=_blank>http://blog.csdn.net/juexin840/article/details/67635080
http://blog.csdn.net/nuli888/article/details/51867863
相关文章推荐
- centos最新版solr5.3.1安装和数据整理以及遇到的问题解答
- centos6.5下nagios配置工具nagiosql320的安装及中文界面的问题
- CentOS 7安装成功后缺少命令的问题
- [转]Centos6.5+CUDA6.5+caffe安装配置及可能遇到问题解答
- centos安装mail命令以及mutt命令过程及问题总结
- centos下安装tessrect-ocr及训练工具问题分析及解决办法
- 在Centos中安装sysstat,解决缺少iostat命令问题
- CentOS 7.4 安装GitLab CE 10.3.4和使用中的基本问题解答
- virtualbox centos安装增强工具和问题详解
- centos 下yum命令无法正常安装docker问题
- CentOS 6.4 安装Nagios网络监视工具并解决访问报错问题 (上)
- Centos上工具命令及对应安装方式汇总
- 安装交叉编译工具arm-linux-gcc命令未找到的问题
- 虚拟机中安装vmtools工具的命令和相关问题解析
- 阿里云centos postgresql9.4源码安装 精简步骤、问题解答
- CentOS 6.4 安装Nagios网络监视工具并解决访问报错问题 (下)
- CentOS6.6默认安装完虚机化平台和虚拟化工具后没有virt-install命令
- 由于CentOS的系统安装了epel-release-latest-7.noarch.rpm 导致在使用yum命令时出现Error: xz compression not available问题。
- Centos6.5+CUDA6.5+caffe安装配置及可能遇到问题解答
- CentOS 7安装nginx方法以及常见nginx命令和安装问题