当前位置: 首页 > news >正文

Flume安装部署

安装部署

安装包连接:链接:https://pan.baidu.com/s/1m0d5O3Q2eH14BpWsGGfbLw?pwd=6666

(1)将apache-flume-1.10.1-bin.tar.gz上传到linux的/opt/software目录下

(2)解压apache-flume-1.10.1-bin.tar.gz到/opt/moudle/目录下

tar -zxf /opt/software/apache-flume-1.10.1-bin.tar.gz -C /opt/moudle/

(3)修改apache-flume-1.10.1-bin的名称为flume

mv apache-flume-1.10.1-bin/ flume

(4)修改conf目录下的log4j2.xml配置文件,配置日志文件路径

<?xml version="1.0" encoding="UTF-8"?>

<!--

 Licensed to the Apache Software Foundation (ASF) under one or more

 contributor license agreements.  See the NOTICE file distributed with

 this work for additional information regarding copyright ownership.

 The ASF licenses this file to You under the Apache License, Version 2.0

 (the "License"); you may not use this file except in compliance with

 the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software

 distributed under the License is distributed on an "AS IS" BASIS,

 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

 See the License for the specific language governing permissions and

 limitations under the License.

-->

<Configuration status="ERROR">

  <Properties>

    <Property name="LOG_DIR">/opt/moudle/flume/log</Property>

  </Properties>

  <Appenders>

    <Console name="Console" target="SYSTEM_ERR">

      <PatternLayout pattern="%d (%t) [%p - %l] %m%n" />

    </Console>

    <RollingFile name="LogFile" fileName="${LOG_DIR}/flume.log" filePattern="${LOG_DIR}/archive/flume.log.%d{yyyyMMdd}-%i">

      <PatternLayout pattern="%d{dd MMM yyyy HH:mm:ss,SSS} %-5p [%t] (%C.%M:%L) %equals{%x}{[]}{} - %m%n" />

      <Policies>

        <!-- Roll every night at midnight or when the file reaches 100MB -->

        <SizeBasedTriggeringPolicy size="100 MB"/>

        <CronTriggeringPolicy schedule="0 0 0 * * ?"/>

      </Policies>

      <DefaultRolloverStrategy min="1" max="20">

        <Delete basePath="${LOG_DIR}/archive">

          <!-- Nested conditions: the inner condition is only evaluated on files for which the outer conditions are true. -->

          <IfFileName glob="flume.log.*">

            <!-- Only allow 1 GB of files to accumulate -->

            <IfAccumulatedFileSize exceeds="1 GB"/>

          </IfFileName>

        </Delete>

      </DefaultRolloverStrategy>

    </RollingFile>

  </Appenders>

  <Loggers>

    <Logger name="org.apache.flume.lifecycle" level="info"/>

    <Logger name="org.jboss" level="WARN"/>

    <Logger name="org.apache.avro.ipc.netty.NettyTransceiver" level="WARN"/>

    <Logger name="org.apache.hadoop" level="INFO"/>

<Logger name="org.apache.hadoop.hive" level="ERROR"/>

# 引入控制台输出,方便学习查看日志

    <Root level="INFO">

      <AppenderRef ref="LogFile" />

      <AppenderRef ref="Console" />

    </Root>

  </Loggers>

</Configuration>

(5)分发flume(当前位置/opt/moudle/)

xsync flume/

http://www.lryc.cn/news/297527.html

相关文章:

  • 点云从入门到精通技术详解100篇-非结构化道路下无人平台路径规划与运动控制
  • 生成树技术华为ICT网络赛道
  • [HTTP协议]应用层的HTTP 协议介绍
  • Linux 命令基础
  • 【开源】JAVA+Vue+SpringBoot实现实验室耗材管理系统
  • 集成开发环境 IntelliJ IDEA的基本使用
  • 【Flink入门修炼】1-2 Mac 搭建 Flink 源码阅读环境
  • Spring IoC容器详解
  • 06 MP之自动填充+SQL执行的语句和速度分析
  • 3 scala集合-Set
  • Android应用图标微技巧,8.0系统中应用图标的适配
  • java学习(多态)
  • [UI5 常用控件] 07.SplitApp,SplitContainer
  • MyBatisPlus之分页查询及Service接口运用
  • 对象存储minio
  • 大模型学习笔记二:prompt工程
  • MATLAB实现LSTM时间序列预测
  • Kubernetes CNI Calico:Route Reflector 模式(RR) calico IPIP切换RR网络模式
  • 探索Gin框架:Golang Gin框架请求参数的获取
  • 极值图论基础
  • word导出链接
  • (delphi11最新学习资料) Object Pascal 学习笔记---第4章第2.5节(重载和模糊调用)
  • ElementUI Data:Table 表格
  • 11.2 OpenGL可编程顶点处理:细分着色器
  • 微软正在偷走你的浏览记录,Edge浏览器偷疯了
  • 什么是数据库软删除,什么场景下要用软删除?(go GORM硬删除)
  • 计算机设计大赛 深度学习+python+opencv实现动物识别 - 图像识别
  • 我主编的电子技术实验手册(02)——仪表与电源
  • C语言----内存函数
  • 【力扣】快乐数,哈希集合 + 快慢指针 + 数学