Reference from: ambari-server/src/main/resources/common-service/FLUME/1.4.0.2
test environment:
-
ambari 2.7.5
-
hdp 3.1.5
-
flume 1.9.0
rpmbuild:
- you can change version in follow files:
buildrpm/buildrpm.sh
buildrpm/rpmbuild/SPECS/flume.spec
-
install rpmbuild on your host
yum install rpm-build -y
-
copy buildrpm dir to your host
-
cd buildrpm
-
sh buildrpm.sh
install:
- use buildrpm.sh build flume rpm
- upload flume rpm to your repo
- copy FLUME to
/var/lib/ambari-server/resources/stacks/HDP/3.1/services/
ambari-server restart
- to ambari web add service ,the service will in the service list
- good luck
注意:
-
在 flume.spec 中最好将flume安装到
/usr/hdp/current/flume-server
因为当 hadoop parameters for stack supporting rolling upgrade,service_check的
flume_bin={stack_root}/current/flume-server/bin/flume-ng
如果单纯变更到其它安装目录,可能会报错如下:
resource_management.core.exceptions.ExecutionFailed: Execution of 'env JAVA_HOME=/usr/jdk64/jdk1.8.0_112 /usr/hdp/current/flume-server/bin/flume-ng version' returned 126. env: /usr/hdp/current/flume-server/bin/flume-ng: Permission denied
-
如果报错:
resource_management.core.exceptions.Fail: User 'flume' doesn't exist
检查FlumeHandlerLinux#install()添加用户操作是否成功