日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Linux下安裝日志收集系統(tǒng)flume

flume是一個(gè)分布式、可靠、和高可用的海量日志采集、聚合和傳輸?shù)南到y(tǒng),在實(shí)際開發(fā)環(huán)境中被廣泛使用,本篇文章重點(diǎn)為大家講解一下Linux下部署flume具體步驟。

環(huán)境說明:

操作系統(tǒng):CentOS6.9 64位

解壓:

tar -xzvf apache-flume-1.7.0-bin.tar.gz

創(chuàng)建軟鏈接:

ln -s /opt/modules/apache-flume-1.6.0-cdh5.9.3-bin/ /opt/shortcut/flume

這里不再添加環(huán)境變量

修改flume-env.sh配置文件:

# 先修改名字
mv flume-env.sh.template flume-env.sh

vim flume-env.sh

# 添加JAVA_HOME
export JAVA_HOME=/usr/java/default

創(chuàng)建一個(gè)配置文件,這里使用官網(wǎng)給的一個(gè)例子

vim test.conf

# 內(nèi)容如下:
# example.conf: A single-node Flume configuration

# Name the components on this agent
# 定義一個(gè) agent 的元素

a1.sources = r1
a1.sinks = k1
a1.channels = c1

# Describe/configure the source
# 配置 source

a1.sources.r1.type = netcat
a1.sources.r1.bind = localhost
a1.sources.r1.port = 44444

# Describe the sink
# 配置 sink

a1.sinks.k1.type = logger

# Use a channel which buffers events in memory
# 定義 channel

a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100

# Bind the source and sink to the channel
# 用 channel 連接起來 source 和 sink

a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1

安裝telnet:

yum install telnet

yum install telnet-server

yum install xinetd

重啟telnet:

service xinetd restart

啟動(dòng)flume:

bin/flume-ng agent --conf conf --conf-file conf/test.conf --name a1 -Dflume.root.logger=INFO,console

啟動(dòng)telnet:

telnet localhost 44444

在telnet里輸入內(nèi)容:

在Flume進(jìn)而查看是否接收到:

會看到這樣的內(nèi)容,可能有時(shí)候這一行顯示的內(nèi)容比我們輸入的內(nèi)容要少,并不是沒有接收到,而是因?yàn)槌^了它能顯示的長度,給省略掉了


當(dāng)前名稱:Linux下安裝日志收集系統(tǒng)flume
網(wǎng)站路徑:http://www.5511xx.com/article/ccccdei.html