美文网首页
netcat(nc)搭建简易http服务测试网络

netcat(nc)搭建简易http服务测试网络

作者: CUFFS | 来源:发表于2021-11-18 02:31 被阅读0次

    在centos7环境

    安装nc工具

    yum install nmap-ncat.x86_64
    
    ##服务器端启动服务
    

    nc -l -k 9999 -c 'echo -e "HTTP/1.1 200 OK\n\n $(date)"' &

    客户端访问测试

    curl http://10.210.74.183:9999/
    

    客户端可以无限访问服务来验证网络连通和稳定性


    image.png

    相关文章

      网友评论

          本文标题:netcat(nc)搭建简易http服务测试网络

          本文链接:https://www.haomeiwen.com/subject/caxdtrtx.html