安装 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