阅读量:0
文章目录
安装地址
Flume安装包地址
链接: https://pan.baidu.com/s/1JJRK5nOqk5Z4-uUFC5l9qA?pwd=nht3
提取码: nht3
安装部署
(1)将apache-flume-1.9.0-bin.tar.gz上传到linux的/opt/software目录下
(2)解压apache-flume-1.9.0-bin.tar.gz到/opt/module/目录下
[yudan@hadoop102 software]$ tar -zxvf /opt/software/apache-flume-1.9.0-bin.tar.gz -C /opt/module/
(3)修改apache-flume-1.9.0-bin的名称为flume
[yudan@hadoop102 module]$ mv /opt/module/apache-flume-1.9.0-bin /opt/module/flume
(4)将lib文件夹下的guava-11.0.2.jar删除以兼容Hadoop 3.1.3
[yudan@hadoop102 module]$ rm /opt/module/flume/lib/guava-11.0.2.jar
注意:删除guava-11.0.2.jar的服务器节点,一定要配置hadoop环境变量。否则会报如下异常。
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Lists at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 1 more
(5)拷贝flume/conf下的flume-env.sh.template文件并更名为flume-env.sh,配置flume-env.sh文件
[yudan@hadoop102 conf]$ cp flume-env.sh.template flume-env.sh [yudan@hadoop102 conf]$ vim flume-env.sh export JAVA_HOME=/opt/module/jdk1.8.0_212
(6)配置conf目录下的log4j.properties文件
配置以下两个参数 # log日志打印的位置 flume.root.logger=INFO,LOGFILE,console # log日志的存放路径 flume.log.dir=/opt/module/flume/logs