Ubuntu16.04安装CDH
官方参考文档:
https://www.cloudera.com/documentation/enterprise/5-15-x/topics/configure_cm_repo.html
安装cdh前如果安装过其他版本的,记得删除各种目录残留文件,比如/run下面的
如果误删了log4j/properties文件,文件内容在这
cmf.root.logger=INFO,CONSOLE
cmf.log.dir=.
cmf.log.file=cmf-server.log # Define the root logger to the system property "cmf.root.logger".
log4j.rootLogger=${cmf.root.logger} # Logging Threshold
log4j.threshhold=ALL # Disable most JDBC tracing by default.
log4j.logger.org.jdbcdslog=FATAL # Disable overly loud Avro IPC logging
log4j.logger.org.apache.avro.ipc.NettyTransceiver=FATAL # Disable overly loud Flume config validation logging
log4j.logger.org.apache.flume.conf.FlumeConfiguration=ERROR log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.target=System.err
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} %5p [%t:%c{2}@%L] %m%n log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender
log4j.appender.LOGFILE.MaxFileSize=10MB
log4j.appender.LOGFILE.MaxBackupIndex=10
log4j.appender.LOGFILE.File=${cmf.log.dir}/${cmf.log.file}
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d{ISO8601} %5p [%t:%c{2}@%L] %m%n
1.配置源
wget https://archive.cloudera.com/cm5/ubuntu/xenial/amd64/cm/archive.key
sudo apt-key add archive.key cd /etc/apt/sources.list.d/
wget https://archive.cloudera.com/cm5/ubuntu/xenial/amd64/cm/cloudera.list
curl -s https://archive.cloudera.com/cm5/ubuntu/trusty/amd64/cm/archive.key| sudo apt-key add -
sudo apt-get update
2.安装Java
3.关防火墙
参考
https://wenku.baidu.com/view/5462a2132f3f5727a5e9856a561252d380eb20e5.html
sudo service ufw stop
4.安装CDH server
sudo apt-get install cloudera-manager-daemons cloudera-manager-server
或者通过下载的deb包来进行安装
sudo dpkg -i ./cloudera-manager-daemons_5.16.2-1.cm5162.p0.7~xenial-cm5_all.deb
sudo dpkg -i ./cloudera-manager-server_5.16.2-1.cm5162.p0.7~xenial-cm5_all.deb
sudo dpkg -i ./cloudera-manager-agent_5.16.2-1.cm5162.p0.7~xenial-cm5_amd64.deb
期间如果依赖不满足的话
sudo apt-get install -f
4.安装MySQL JDBC Driver
sudo apt-get install libmysql-java
5.按照官方教程配置数据库等
CREATE DATABASE scm DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE amon DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE rman DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE hue DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE metastore DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE sentry DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE nav DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE navms DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE oozie DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE USER 'scm';
CREATE USER 'amon';
CREATE USER 'rman';
CREATE USER 'hue';
CREATE USER 'hive';
CREATE USER 'sentry';
CREATE USER 'nav';
CREATE USER 'navms';
CREATE USER 'oozie';
GRANT ALL ON scm.* TO 'scm'@'%' IDENTIFIED BY 'scm';
GRANT ALL ON amon.* TO 'amon'@'%' IDENTIFIED BY 'amon';
GRANT ALL ON rman.* TO 'rman'@'%' IDENTIFIED BY 'rman';
GRANT ALL ON hue.* TO 'hue'@'%' IDENTIFIED BY 'hue';
GRANT ALL ON metastore.* TO 'hive'@'%' IDENTIFIED BY 'hive';
GRANT ALL ON sentry.* TO 'sentry'@'%' IDENTIFIED BY 'sentry';
GRANT ALL ON nav.* TO 'nav'@'%' IDENTIFIED BY 'nav';
GRANT ALL ON navms.* TO 'navms'@'%' IDENTIFIED BY 'navms';
GRANT ALL ON oozie.* TO 'oozie'@'%' IDENTIFIED BY 'oozie';
7.初始化数据库,每执行完要输入密码
sudo /usr/share/cmf/schema/scm_prepare_database.sh mysql scm scm
8.启动
systemctl start cloudera-scm-server
systemctl start cloudera-scm-agent
1.如果启动的时候,/var/log/cloudera-scm-server/cloudera-scm-server.out出现
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactoryBean': FactoryBean threw exception on object creation; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection
可以参考
https://blog.csdn.net/qq_41623990/article/details/83008860
在/usr/share/cmf/schema执行
bash scm_prepare_database.sh mysql -uroot -p --scm-host localhost scm scm scm
2.如果启动的时候,/var/log/cloudera-scm-server/cloudera-scm-server.out出现,但是cloudera-scm-server.log和cmf-server-perf.log日志都没有
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.cloudera.server.cmf.log.components.ServerLogFetcherImpl]: Constructor threw exception; nested exception is java.io.FileNotFoundException: Unable to locate the Cloudera Manager log file in the log4j settings Caused by: java.io.FileNotFoundException: Unable to locate the Cloudera Manager log file in the log4j settings
查看/etc/cloudera-scm-server/log4j.properties是否为空
为空的话,加入内容,启动cloudera-scm-server,然后cloudera-scm-server.log和cmf-server-perf.log日志都成功出现
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# !!!!! IMPORTANT !!!!!
# The Cloudera Manager server finds its log file by querying log4j. It
# assumes that the first file appender in this file is the server log.
# See LogUtil.getServerLogFile() for more details.
#
# Define some default values that can be overridden by system properties
cmf.root.logger=INFO,CONSOLE
cmf.log.dir=.
cmf.log.file=cmf-server.log
cmf.perf.log.file=cmf-server-perf.log # Define the root logger to the system property "cmf.root.logger".
log4j.rootLogger=${cmf.root.logger} # Logging Threshold
log4j.threshhold=ALL # Disable most JDBC tracing by default.
log4j.logger.org.jdbcdslog=FATAL # Disable overly loud Avro IPC logging
log4j.logger.org.apache.avro.ipc.NettyTransceiver=FATAL # Disable overly loud Flume config validation logging
log4j.logger.org.apache.flume.conf.FlumeConfiguration=ERROR # Disable overly loud CXF logging
log4j.logger.org.apache.cxf.phase.PhaseInterceptorChain=ERROR # Disable "Mapped URL path" messages from Spring
log4j.logger.org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping=WARN log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.target=System.err
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} %p %t:%c: %m%n log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender
log4j.appender.LOGFILE.MaxFileSize=10MB
log4j.appender.LOGFILE.MaxBackupIndex=10
log4j.appender.LOGFILE.File=${cmf.log.dir}/${cmf.log.file}
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d{ISO8601} %p %t:%c: %m%n log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender
log4j.appender.LOGFILE.MaxFileSize=10MB
log4j.appender.LOGFILE.MaxBackupIndex=10
log4j.appender.LOGFILE.File=${cmf.log.dir}/${cmf.log.file}
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d{ISO8601} %p %t:%c: %m%n log4j.additivity.com.cloudera.server.cmf.debug.components.PerfLogger=false
log4j.logger.com.cloudera.server.cmf.debug.components.PerfLogger=INFO,PERFLOGFILE
log4j.appender.PERFLOGFILE=org.apache.log4j.RollingFileAppender
log4j.appender.PERFLOGFILE.MaxFileSize=10MB
log4j.appender.PERFLOGFILE.MaxBackupIndex=10
log4j.appender.PERFLOGFILE.File=${cmf.log.dir}/${cmf.perf.log.file}
log4j.appender.PERFLOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.PERFLOGFILE.layout.ConversionPattern=%d{ISO8601} %p %t:%c: %m%n
之后访问 http://localhost:7180/cmf/login
向集群添加主机
填master的host
继续
继续
9.安装的时候提供 SSH 登录凭据使用root和密码
或者使用私钥,要保证root用户可以用私钥ssh过去
如果安装的时候报
sed: can't read /etc/cloudera-scm-agent/config.ini: No such file or directory
拷贝一个正确的文件,把文件的内容补上
如果遇到 安装失败。 无法接收 Agent 发出的检测信号。
将/etc/cloudera-scm-agent/config.ini中security的注释掉,并将设置use_tls=0,就能安装成功
安装parcel,等待即可
完成
继续安装组件
分配角色
配置集群数据库
继续
全部启动成功
9.安装Manager Service,否则会包host monitor连不上
需要在这一步输入report manager的数据库账号密码,如果连不上可能是防火墙没关,
mysql的host填localhost
10.查看parcels的下载情况,如果要离线安装的,将parcels下载后拷贝到/opt/cloudera/parcel-repo目录,注意修改权限一起重启server和agent
/opt/cloudera/parcel-repo$ ls -alh
总用量 2.4G
drwxr-xr-x 2 cloudera-scm cloudera-scm 4.0K 12月 15 11:31 .
drwxr-xr-x 6 cloudera-scm cloudera-scm 4.0K 12月 15 00:03 ..
-rwxr-xr-x 1 cloudera-scm cloudera-scm 1.9G 12月 15 11:12 CDH-5.16.2-1.cdh5.16.2.p0.8-xenial.parcel
-rwxr-xr-x 1 cloudera-scm cloudera-scm 41 12月 15 11:12 CDH-5.16.2-1.cdh5.16.2.p0.8-xenial.parcel.sha
-rw-r----- 1 cloudera-scm cloudera-scm 75K 12月 15 11:31 CDH-5.16.2-1.cdh5.16.2.p0.8-xenial.parcel.torrent
-rw-r----- 1 cloudera-scm cloudera-scm 84M 12月 15 02:55 KAFKA-4.1.0-1.4.1.0.p0.4-xenial.parcel
-rw-r----- 1 cloudera-scm cloudera-scm 41 12月 15 02:55 KAFKA-4.1.0-1.4.1.0.p0.4-xenial.parcel.sha
-rw-r----- 1 cloudera-scm cloudera-scm 3.5K 12月 15 02:55 KAFKA-4.1.0-1.4.1.0.p0.4-xenial.parcel.torrent
-rw-r----- 1 cloudera-scm cloudera-scm 453M 12月 15 04:29 KUDU-1.4.0-1.cdh5.12.2.p0.8-xenial.parcel
-rw-r----- 1 cloudera-scm cloudera-scm 41 12月 15 04:29 KUDU-1.4.0-1.cdh5.12.2.p0.8-xenial.parcel.sha
-rw-r----- 1 cloudera-scm cloudera-scm 18K 12月 15 04:29 KUDU-1.4.0-1.cdh5.12.2.p0.8-xenial.parcel.torrent
-rw-r--r-- 1 cloudera-scm cloudera-scm 66K 6月 18 21:21 manifest.json
安装kafka,分配并激活
然后点击添加服务,选择kafka进行安装
失败,查看stderr日志
发现
+ exec /opt/cloudera/parcels/KAFKA-4.1.0-1.4.1.0.p0.4/lib/kafka/bin/kafka-server-start.sh /run/cloudera-scm-agent/process/106-kafka-KAFKA_BROKER/kafka.properties
三月 08, 2020 2:29:36 下午 org.glassfish.jersey.internal.inject.Providers checkProviderRuntime
警告: A provider nl.techop.kafka.KafkaTopicsResource registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider nl.techop.kafka.KafkaTopicsResource will be ignored.
三月 08, 2020 2:29:36 下午 org.glassfish.jersey.internal.inject.Providers checkProviderRuntime
警告: A provider nl.techop.kafka.TopicMetricNameResource registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider nl.techop.kafka.TopicMetricNameResource will be ignored.
Redaction rules file doesn't exist, not redacting logs. file: redaction-rules.json, directory: /run/cloudera-scm-agent/process/106-kafka-KAFKA_BROKER
所以执行命令
/opt/cloudera/parcels/KAFKA-4.1.0-1.4.1.0.p0.4/lib/kafka/bin/kafka-server-start.sh /run/cloudera-scm-agent/process/106-kafka-KAFKA_BROKER/kafka.properties
发现是没有log4j.peoperties文件
/opt/cloudera/parcels/KAFKA-4.1.0-1.4.1.0.p0.4/lib/kafka/bin/kafka-server-start.sh /run/cloudera-scm-agent/process/106-kafka-KAFKA_BROKER/kafka.properties
log4j:ERROR Could not read configuration file from URL [file:/opt/cloudera/parcels/KAFKA-4.1.0-1.4.1.0.p0.4/lib/kafka/bin/../config/log4j.properties].
java.io.FileNotFoundException: /opt/cloudera/parcels/KAFKA-4.1.0-1.4.1.0.p0.4/lib/kafka/bin/../config/log4j.properties (没有那个文件或目录)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:557)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:66)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
at com.typesafe.scalalogging.Logger$.apply(Logger.scala:48)
at kafka.utils.Log4jControllerRegistration$.<init>(Logging.scala:25)
at kafka.utils.Log4jControllerRegistration$.<clinit>(Logging.scala)
at kafka.utils.Logging$class.$init$(Logging.scala:47)
# Change the two lines below to adjust the general broker logging level (output to server.log and stdout)
at com.cloudera.kafka.wrap.Kafka$.<init>(Kafka.scala:30)
at com.cloudera.kafka.wrap.Kafka$.<clinit>(Kafka.scala)
at com.cloudera.kafka.wrap.Kafka.main(Kafka.scala)
log4j:ERROR Ignoring configuration file [file:/opt/cloudera/parcels/KAFKA-4.1.0-1.4.1.0.p0.4/lib/kafka/bin/../config/log4j.properties].
添加该文件,再执行,发现
kafka.common.InconsistentBrokerIdException: Configured broker.id 72 doesn't match stored broker.id 94 in meta.properties. If you moved your data, make sure your configured broker.id matches. If you intend to create a new broker, you should remove all data in your data directories (log.dirs).
去kafka的配置里面将broke.id从72修改成94
启动成功
Ubuntu16.04安装CDH的更多相关文章
- ubuntu16.04安装jdk,tomcat
ubuntu16.04安装jdk,tomcat 最近装了一下tomcat,网上的教程很多,我也试了很多次,但是有一些教程关于tomcat配置是错误的,让我走上了歧途.差点重装系统,还好王总及时出手帮助 ...
- Ubuntu16.04 安装openjdk-7-jdk
Ubuntu16.04 安装openjdk-7-jdk sudo apt-get install openjdk-7-jre 或者sudo apt-get install openjdk-7-jdk ...
- Ubuntu16.04安装GTK3主题:OSX-Arc
Ubuntu16.04安装GTK3主题:OSX-Arc GTK3主题:OSX-Arc描述: 前几个月,Gnome3.20升3.22的时候,出现了大量主题崩溃的现象,其中包括Arc.Flatabulou ...
- Ubuntu16.04安装opencv for python/c++
Ubuntu16.04安装opencv for python/c++ 网上关于opencv的安装已经有了不少资料,但是没有一篇资料能让我一次性安装成功,因此花费了大量时间去解决各种意外,希望这篇能给一 ...
- ubuntu16.04安装不上有道词典的解决办法
转自:http://www.linuxdiyf.com/linux/21143.html ubuntu16.04安装不上有道词典,提示: le@hu-pc:~/下载$ sudo dpkg -i you ...
- Ubuntu16.04安装mongodb
Ubuntu16.04安装mongodb copy from: http://blog.csdn.net/zhushh/article/details/52451441 1.导入软件源的公钥 sudo ...
- 【Tools】ubuntu16.04安装搜狗输入法
Ubuntu16,04 安装搜狗输入法 1.下载搜狗输入法的安装包 下载地址为:http://pinyin.sogou.com/linux/ 2.按键Ctr+Alt+T打开终端,输入以下命令切换到下载 ...
- Ubuntu16.04安装cuda9.0+cudnn7.0
Ubuntu16.04安装cuda9.0+cudnn7.0 这篇记录拖了好久,估计是去年6月份就已经安装过几遍,然后一方面因为俺比较懒,一方面后面没有经常在自己电脑上跑算法,比较少装cuda和cudn ...
- Ubuntu16.04安装TensorFlow及Mnist训练
版权声明:本文为博主原创文章,欢迎转载,并请注明出处.联系方式:460356155@qq.com TensorFlow是Google开发的开源的深度学习框架,也是当前使用最广泛的深度学习框架. 一.安 ...
随机推荐
- httprunner学习16-locust性能测试
前言 HttpRunner 的 yaml 脚本文件,可以结合locust做性能测试 locust环境准备 安装完成 HttpRunner 后,系统中会新增locusts命令,但不会同时安装 Locus ...
- Beta冲刺(7/7)——2019.5.28
所属课程 软件工程1916|W(福州大学) 作业要求 Beta冲刺(7/7)--2019.5.28 团队名称 待就业六人组 1.团队信息 团队名称:待就业六人组 团队描述:同舟共济扬帆起,乘风破浪万里 ...
- linux定时任务(转)
转自:https://www.cnblogs.com/intval/p/5763929.html linux 系统则是由 cron (crond) 这个系统服务来控制的.Linux 系统上面原本就有非 ...
- c#接口interface学习
好久没学习C#了,上次已经学习到了接口这块,感觉有点不太好理解,因此重新学习,在vs上面运行了,本来不想写博客的,但是正好看到网上有人说,写博客可以加深印象,因此,写吧. 下面是菜鸟教程的实例 usi ...
- kuma 学习三 组件说明
当前官方已经提供了两种可选的运行模式 通用模式 kubernetes 模式 kuma 组件说明 kuma-cp kuma 的控制面板 kuma-dp kuma 的数据面板 enovy 提供sideca ...
- C# 其它模拟延迟
System.Threading.Thread.Sleep(3000);//模拟延迟 如模拟上传图片等
- 【JZOJ6213】【20190613】String
题目 \(n \le 10^{18} \ , \ |T| \le 10^5\) 题解 显然,最少的操作次数一定是贪心地能匹配就匹配 我们可以建出\(T\)的SAM,把SAM不能走的边补到根的后继节点 ...
- nginx 日志之 error_log
Nginx错误日志平时不用太关注,但是一旦出了问题,就需要借助错误日志来判断问题所在. 配置参数格式:error_log /path/to/log level; Nginx错误日志级别 常见的错误日志 ...
- Linux常用命令简述--dirname与basename
dirname 获取父目录 basename 显示最后的目录名或文件名 .dirname [root@liang ~]# dirname /etc/httpd/ /etc [root@liang ~] ...
- js字符串连接
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> </head> ...