安装 telnet 服务端
![]()

安装 xinetd
![]()

安装 telnet 客户端(选装,安装上可以方便自测 telnet 服务是否正常启动):
![]()

设置开机自启动并开启服务
设置开机自启动(为了防止服务器意外重启):
开机启动 xinetd 服务
开机启动 telnet 服务
开启服务:



从网络端口接收数据,下沉到logger
采集配置文件,netcat-logger.conf


启动命令:
$ bin/flume-ng agent --conf conf --conf-file conf/netcat-logger.conf --name a1 -Dflume.root.logger=INFO,console

传入数据:
$ telnet localhost 44444
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Hello world! <ENTER>
OK


本文介绍了如何安装和配置telnet服务端和客户端,通过Flume进行网络数据采集。启动Flume agent并使用netcat-logger.conf配置文件,然后通过telnet连接本地44444端口输入数据,如'Helloworld!',实现数据的采集和传输。
361

被折叠的 条评论
为什么被折叠?



