1 修改主节点172.7.24.40的ssh 免密
ssh-keygen
输入要存入的文件名 /root/.ssh/id_rsa.pub
输入密码 password
存入到该文件中 cat id_dsa.pub >> ~/.ssh/authorized_key
修改权限
chmod 600 authorized_keys
chmod 700 -R .ssh
将authorized_key文件拷贝到从节点的 cd /root/.ssh 下 172.25.35.139 172.25.35.140
2 主从节点 开启NTP服务 yum install ntp
chkconfig ntpd
service ntpd start
3 ambari在安装时需要配置全域名,所以需要检查DNS 修改/etc/hosts
172.24.7.40 YZ-24-7-40.h.chinabank.com.cn
172.25.35.139 YZ-25-35-139.h.chinabank.com.cn
172.25.35.140 YZ-25-35-140.h.chinabank.com.cn
5 所有关闭防火墙
chkconfig --list iptables 查看
chkconfig iptables off
/etc/init.d/iptables stop
chkconfig --list iptables 再次查看
6 所有节点关闭SELinux
查看SELinux状态 sestatus
如果是关闭状态 不处理
如果是enable状态 setenforce 0
7 在主节点上制作本地源
安装HTTP 服务器,
添加 Apache 服务到系统层使其随系统自动启动
安装本地源制作相关工具 yum install yum-utils createrepo
8 下载安装相关软件
CentOS 7 | HDP | Base URL | http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.2.0 |
CentOS 7 | HDP | Repo File | http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.2.0/hdp.repo |
CentOS 7 | HDP | Tarball md5 asc | http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.2.0/HDP-2.4.2.0-centos7-rpm.tar.gz |
CentOS 7 | HDP-UTILS | Base URL | http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos7 |
CentOS 7 | HDP-UTILS | Repo File | http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos7/HDP-UTILS-1.1.0.20-centos7.tar.gz |
在windows下载 通过sftp传到linux上
制作.repo文件,并将文件copy到/etc/yum.repos.d下
9 启动httpd服务器,services start httpd 80端口可能会被占用,因为在后续安装中必须使用到80端口,如果被占用,关闭占用的程序。
10 yum clean all
yum list update
yum makecache
yum repolist
11 安装 yum install ambari-server
12 修改/etc/profile 增加jak环境变量 ,
13 创建数据库,并添加表 创建表结构文件 /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
14 配置ambari ambari-server setup
15 配置后启动ambari server ambari-server start
16 登录http://172.24.7.40:8080/ambari ,用户名admin 密码 admin 配置HDP
17 配置过程中出现的问题
1 find / -name mysql*.jar ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java-5.1.17.jar 设置mysql驱动 (在后面配置节点时需要用到)
2 提示主节点与从节点不通,可能是hosts没配置正确,查看hosts配置
3 提示没有 python-argparse 安装 此文件
4 hive配置时要链接数据库,最好链接mysql ,
18 参考方法 http://blog.youkuaiyun.com/daiyutage/article/details/52210830