在centos7環(huán)境
安裝nc工具
yum install nmap-ncat.x86_64
##服務(wù)器端啟動服務(wù)
nc -l -k 9999 -c 'echo -e "HTTP/1.1 200 OK\n\n $(date)"' &
客戶端訪問測試
curl http://10.210.74.183:9999/
客戶端可以無限訪問服務(wù)來驗(yàn)證網(wǎng)絡(luò)連通和穩(wěn)定性

image.png
yum install nmap-ncat.x86_64
##服務(wù)器端啟動服務(wù)
nc -l -k 9999 -c 'echo -e "HTTP/1.1 200 OK\n\n $(date)"' &
curl http://10.210.74.183:9999/
客戶端可以無限訪問服務(wù)來驗(yàn)證網(wǎng)絡(luò)連通和穩(wěn)定性