一、配置主机和节点机器之间SSH无密登录

多台外网服务器配置时,需要在/etc/hosts中把本机的IP地址设置为内网IP地址

二、为每台主机关闭iptables,SELinux,启动ntpd服务
三、安装Mysql,JDK
查看linux发行版本
cat /etc/redhat-release
从网站http://dev.mysql.com/downloads/repo/yum/下载对应版本yum资源
安装
yum -y install mysql57-community-release-el7-7.noarch.rpm
安装mysql数据库的服务器版本
yum -y install mysql-community-server
 
启动数据库
service  mysqld start
systemctl start  mysqld.service
 
获取初始密码
#######从mysql进程日志中获取root用户的初始密码:ra%yk7urCBIh
[root@typecodes ~]# grep "password" /var/log/mysqld.log

 修改root用户密码
mysql -u root -p

 ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';

 

这个其实与validate_password_policy的值有关。

validate_password_policy有以下取值:

Policy Tests Performed
0 or LOW Length
1 or MEDIUM Length; numeric, lowercase/uppercase, and special characters
2 or STRONG Length; numeric, lowercase/uppercase, and special characters; dictionary file

 
首先,修改validate_password_policy参数的值
set global validate_password_policy=0;
这样,判断密码的标准就基于密码的长度了。这个由validate_password_length参数来决定。
validate_password_length参数默认为8
set global validate_password_length=4;
 
安装JDK,配置环境变量

export JAVA_HOME=/usr/local/jdk1.8.0

export JRE_HOME=${JAVA_HOME}/jre

export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib

export PATH=${JAVA_HOME}/bin:$PATH

使环境变量立即生效
source ~/.bash_profile
四、集群服务器间配置时间同步
五、安装Ambari
 
 
yum clean all
 
yum list|grep ambari

yum安装ambari服务端 
yum install ambari-server
 
安装完后进行设置
ambari-server setup

 

 

 到这一步需要安装mysql jar包
yum install mysql-connector-java*

 启动服务

 报错:

 解决方法:
grant all privileges on *.* to ambari@'localhost' identified by 'bigdata';
flush privileges;

 

 重新启动,报错:

创建数据库
create database ambari character set utf8;

 重新启动,报错:

 如果使用自己定义的数据库,必须在启动Ambari服务之前导入Ambari的sql脚本
用Ambari用户(上面设置的用户)登录mysql
mysql -u ambari -p
use ambari
source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql

启动成功

 日志无报错
admin/admin

 登录系统操作后发现还是报错:

 21 Feb 2017 19:15:29,519  WARN [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] StatementUtils:48 - Statement close FAILED.
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
原因:Ambari默认的 mysql jdbc 驱动不支持 5.6以上版本
解决方法:下载新的 mysql jdbc驱动
ln -s mysql-connector-java-5.1.40-bin.jar mysql-connector-java.jar
ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar
 
配置主机时报错
Permanently added 'node1.hadoop' (ECDSA) to the list of known hosts
解决方法
在 master主机用户根目录的.ssh/ssh_config 文件中新增一行
UserKnownHostsFile ~/.ssh/known_hosts

 
继续报错

 解决方法:
修改主机名
vi /etc/sysconfig/network

 vim /etc/hosts

 hostname master.hadoop
 
或者直接 hostnamectl set-hostname 新主机名
 
 

 注意HOST名字要写全名
node2节点报错:
ERROR: Bootstrap of host node2.hadoop fails because previous action finished with non-zero exit code (255)
ERROR MESSAGE: tcgetattr: Invalid argument
Connection to node2.hadoop closed. STDOUT: tput: unknown terminal "unknown"
('', None)
('', None)
登录到node2上手动启动agent
wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.1.0/ambari.repo -O /etc/yum.repos.d/ambari.repo
 
yum repolist
 
yum install ambari-agent
 

vi /etc/ambari-agent/conf/ambari-agent.ini

[server]

hostname=<your.ambari.server.hostname>

url_port=8440

secured_url_port=8441

 

ambari-agent start

 

看后台日志,报错

解决方案:
pip install flask -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
 
删除所有ambari* from /usr/lib/python2.6/site-packages,重新安装ambari-agent,杀死ambari进程,重新启动
rm -f /usr/lib/python2.6/site-packages/ambari_commons
rm -rf /usr/lib/python2.6/site-packages/resource_management
rm -rf /usr/lib/python2.6/site-packages/ambari_jinja2
rm -rf /var/lib/ambari-agent/
rm -rf /usr/lib/ambari-agent/
yum remove ambari-agent
yum install ambari-agent
 
后面又报错:
 

 

 

 Error: Cannot retrieve repository metadata (repomd.xml) for repository: HDP-2.3. Please verify its path and try again
 
解决方法1:
(此方法未验证)

Resolved: The problem was related to proxy Authentication. So, I installed and configured CNTLM to access ISA Proxy Server on Centos 6.

Look at the article :

http://wingloon.com/2014/04/11/how-to-install-and-configure-cntlm-to-access-isa-server-on-centos-6-5/

1.Install and configure cntlm

2. configure yum to use through ISA Proxy

  • vi /etc/yum.conf

add a line:

proxy=http://127.0.0.1:3128/

  • vi .bash_profile

add :

export http_proxy=http://localhost:3128/

export https_proxy=${http_proxy}

export ftp_proxy=${http_proxy}

  • logoff root and login again
  • yum clean all
  • yum install XXXX

yum update, yum repolist or yum install now works fine

解决方法2:
在对应报错服务器上的HDP.repo文件中添加一行  proxy = _none_
 

I have fixed it myself. For those who might face the same issue. This is what I did. Basically HDP.repo should be told to skip proxy server, but if you edit HDP.repo, Ambari wizard will overwrite it. So what is the workaround?. This is how you make HDP.repo skip the proxy. Just add the following lines to the yum.conf file for all the nodes. It worked for me. Hope this helps! :)

[HDP-2.4]

name=HDP-2.4

proxy = _none_

baseurl=http://item-70288/hdp/HDP/centos6/2.x/updates/2.4.0.0

enabled=1

gpgcheck=0

继续安装,报错:

 解决方法1(本人测试无效,后来用方法2到节点服务器上手工安装):
在SERVER服务器上执行
vim /etc/ambari-server/conf/ambari.properties

 把标红值改大

解决方案: 1.手动安装yarn apt-get update apt-get install hadoop-2-4-.*-yarn

2.修改配置文件 Can be solved by setting the timeout (agent.package.install.task.timeout=1800) in /etc/ambari-server/conf/ambari.properties

注意: 在安装mapreduce,spark等软件包时,也可能出现类似的问题,请将timeout设置到合适的时间。或者根据错误提示,手动安装相应的软件包。

解决方法2:
手工安装
报错:there are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
 
yum update
yum install yum-utils
yum-complete-transaction --cleanup-only
 
报错:

 版本不一致导致,可参考本文最后ambari升级部分
 
后续安装hadoop各组件一般只会是yum超时错误,可手动到服务器上运行yum命令安装,或者下载相关包,制作本地yum源
 
解决不了报错信息,就手动到节点服务器安装agent
rh7
 
wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.1.0/ambari.repo -O /etc/yum.repos.d/ambari.repo
 
yum repolist
 
vi /etc/ambari-agent/conf/ambari-agent.ini
将红框处修改为ambari-server主机名

 
ambari-agent start
 
 
ZOOKEEPER安装报错

解决方案:找到zookeeper配置文件,修改服务端配置个数,改为奇数个,
ambari上只需要删除一台节点的zookeeper服务

 

 
PS:在安装某些组件时候,会报配置参数找不到错误
如:

 
可执行如下命令来手动设置参数
/var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin set 127.0.0.1 bigdata  hive-site hive_server_host "node3.hadoop"
-u ambari系统登录名
-p ambari系统登录密码
bigdata是ambari集群名称
hive_server_host是报错的配置参数名
""内是要设置的配置参数值
 
附:
ambari升级
 

Ambari HDP集群搭建文档的更多相关文章

  1. kafka集群搭建文档

    kafka集群搭建文档 一. 下载解压 从官网下载Kafka,下载地址http://kafka.apache.org/downloads.html 注意这里最好下载scala2.10版本的kafka, ...

  2. Ambari HDP集群搭建全攻略

    世界上最快的捷径,就是脚踏实地,本文已收录[架构技术专栏]关注这个喜欢分享的地方. 最近因为工作上需要重新用Ambari搭了一套Hadoop集群,就把搭建的过程记录了下来,也希望给有同样需求的小伙伴们 ...

  3. Hadoop集群搭建文档

      环境: Win7系统装虚拟机虚拟机VMware-workstation-full-9.0.0-812388.exe Linux系统Ubuntu12.0.4 JDK                j ...

  4. redis多机集群部署文档

    redis多机集群部署文档(centos6.2) (要让集群正常工作至少需要3个主节点,在这里我们要创建6个redis节点,其中三个为主节点,三个为从节点,对应的redis节点的ip和端口对应关系如下 ...

  5. HP DL160 Gen9服务器集群部署文档

    HP DL160 Gen9服务器集群部署文档 硬件配置=======================================================Server        Memo ...

  6. Apache Hadoop 集群安装文档

    简介: Apache Hadoop 集群安装文档 软件:jdk-8u111-linux-x64.rpm.hadoop-2.8.0.tar.gz http://www.apache.org/dyn/cl ...

  7. Redis集群部署文档(Ubuntu15.10系统)

    Redis集群部署文档(Ubuntu15.10系统)(要让集群正常工作至少需要3个主节点,在这里我们要创建6个redis节点,其中三个为主节点,三个为从节点,对应的redis节点的ip和端口对应关系如 ...

  8. kafka集群部署文档(转载)

    原文链接:http://www.cnblogs.com/luotianshuai/p/5206662.html Kafka初识 1.Kafka使用背景 在我们大量使用分布式数据库.分布式计算集群的时候 ...

  9. 二进制搭建一个完整的K8S集群部署文档

    服务器规划 角色 IP 组件 k8s-master1 192.168.31.63 kube-apiserver kube-controller-manager kube-scheduler etcd ...

随机推荐

  1. Burpsuite的简单应用-y-Proxy

    打开burpsuite:Proxy功能 一.进入Proxy页面,代理设置 将浏览器的代理地址设置一样: 之前没有代理,直接添加,有的话,可以勾选就好了:不同浏览器,设置位置不一致,百度参考 二.执行: ...

  2. confluence wiki 破解安装操作流程

    准备postgres数据库安装 步骤1:命令: docker pull postgres 步骤2:安装: docker run --name postgresdb -p 5432:5432 -e PO ...

  3. nginx模块记录

    1. ngx_http_ssl_module 让Nginx可以支持HTTPS的模块 (1)ssl on | off; #是否开启ssl功能 (2)ssl_certificate file; #当前虚拟 ...

  4. Comprehensive Python Cheatsheet

    ToC = { '1. Collections': [List, Dict, Set, Range, Enumerate, Namedtuple, Iterator, Generator], '2. ...

  5. Linux命令 ls -l 输出内容含义详解

    Linux命令 ls -l s输出内容含义详解   1. ls  只显示文件名或者文件目录 2. ls -l(这个参数是字母L的小写,不是数字1) 用来查看详细的文件资料 在某个目录下键入ls -l可 ...

  6. Python中面向对象的一些关于类变量与实例变量的理解

    1. 要写出有意义的面向对象的代码,最核心的:类.对象.三大特性:继承.封装.多态 类变量与实例变量: class Student(): # 类变量 name = '张' age = 0 def __ ...

  7. SSM整合RocketMQ

    前言 RocketMQ是一个由阿里巴巴开源的消息中间件,脱胎于阿里内部使用的MetaQ,本文主要是写个小例子演示一下消息从生产到消费的过程. RocketMQ下载和安装 下载地址 http://roc ...

  8. yum的搭建

    搭建本地yum仓库的步骤 . 创建光盘目录,挂载光盘 . 进入/etc/yum/repos.d目录下,备份所有配置文件 . 利用一个含有大写M的配置文件作为配置文件的模板 . 在模板里将enabled ...

  9. 内存保护机制及绕过方法——利用Ret2Libc绕过DEP之VirtualProtect函数

    利用Ret2Libc绕过DEP之VirtualProtect函数 ⑴.  原理分析: i.相关概念: VirtualProtect()函数: BOOL WINAPI VirtualProtect( _ ...

  10. LeetCode OJ:Letter Combinations of a Phone Number(数字字母组合)

    Given a digit string, return all possible letter combinations that the number could represent. A map ...