centos6.5安装flume

时间:2024-08-13 08:07:07

这里安装flume是因为游戏业务日志搜集和分析用的

1.安装java 环境
rpm -ivh jdk-8u51-linux-x64.rpm
Preparing... ########################################### [100%]
1:jdk1.8.0_51 ########################################### [100%]
Unpacking JAR files...
rt.jar...
jsse.jar...
charsets.jar...
tools.jar...
localedata.jar...
jfxrt.jar...
plugin.jar...
javaws.jar...
deploy.jar...

2. 下载flume
wget http://www.apache.org/dist/flume/stable/apache-flume-1.6.0-bin.tar.gz
解压
tar -xf apache-flume-1.6.0-bin.tar.gz -C /usr/local/
重命名目录
mv apache-flume-1.6.0-bin flume

3.修改环境变量

export JAVA_HOME=/usr/java/jdk1.8.0_51
export JRE_HOME=/usr/java/jdk1.8.0_51/jre
exportCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:$JAVA_HOME/bin
export FLUME_HOME=/usr/local/flume
export PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:$JAVA_HOME/bin:$FLUME_HOME/bin

4.让环境变量生效

source /etc/profile

 

5.测试

flume-ng version
Flume 1.6.0
Source code repository: https://git-wip-us.apache.org/repos/asf/flume.git
Revision: 2561a23240a71ba20bf288c7c2cda88f443c2080
Compiled by hshreedharan on Mon May 11 11:15:44 PDT 2015
From source with checksum b29e416802ce9ece3269d34233baf43f