大数据AMBARI2.6.2.2+HDP2.6.5.0安装实战centos7版(新)
大数据AMBARI2.6.2.2+HDP2.6.5.0安装实战centos7版(新)最近有点空,把ambari+hdp安装部署操作实战分享给大牛们,拿走不谢!1、虚拟机准备我准备的是3台:centos-hadoop1、centos-hadoop2、centos-hadoop3并且配置好对应主机的网络IP、主机名称、关闭防火墙。systemctl stop firewalld.service2、安装
大数据AMBARI2.6.2.2+HDP2.6.5.0安装实战centos7版(新)
最近有点空,把ambari+hdp安装部署操作实战分享给大牛们,拿走不谢!
1、虚拟机准备
我准备的是3台:centos-hadoop1、centos-hadoop2、centos-hadoop3
并且配置好对应主机的网络IP、主机名称、关闭防火墙。
systemctl stop firewalld.service
2、安装JDK
我这里已经安装好了—系统自带的JAVA,没有安装的小伙伴安装一下且配置好环境变量!
3、上传ambari、hdp、hdpgpl、hdputils包至centos7服务器
4、SSH免密登录设置
1)生成公钥和私钥
ssh-keygen -t rsa
输入命令按3个enter键---
然后就会生成两个文件id_rsa(私钥)、id_rsa.pub(公钥)
2)将公钥拷贝到要免密登录的目标机器上
ssh-copy-id centos7-hadoop1
ssh-copy-id centos7-hadoop2
ssh-copy-id centos7-hadoop3
5、安装ntp
我本机已经安装,此步骤不再描述,命令如下:
yum install -y ntp
chkconfig --list ntpd
chkconfig ntpd on
service ntpd start
6、安装Apache2
yum install httpd
并设置开机自动重启
systemctl enable httpd.service
7、ambari、hdp、hdpgpl、hdputils压缩包解压至var/www/html目录下面
***
解压好的目录:
8、安装本地源
yum install yum-utils createrepo yum-plugin-priorities -y
gedit /etc/yum/pluginconf.d/priorities.conf
添加gpgcheck=0
9、创建本地源
cd /var/www/html/
createrepo ./
10、下载ambari存储库文件
wget -nv http://public-repo-1.hortonworks.com/ambari/centos6
/2.x/updates/2.6.1.5/ambari.repo -O
/etc/yum.repos.d/ambari.repo
11、配置ambari、hdp本地源
1)ambari.repo,配置为本地源:
gedit /etc/yum.repos.d/ambari.repo
#VERSION_NUMBER=2.6.1.5-3
[ambari-2.6.1.5]
name=ambari Version - ambari-2.6.1.5
baseurl=http://centos7-hadoop1/ambari/centos7/2.6.2.2-1/
gpgkey=http://centos7-hadoop1/ambari/centos7/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
2)修改hdp-util.repo,配置为本地源:
gedit /var/www/html/hdp/HDP-UTILS/centos7/1.1.0.22/hdp-utils.repo
[HDP-UTILS-1.1.0.22]
name=Hortonworks Data Platform Utils Version - HDP-UTILS-1.1.0.22
baseurl=http://centos7-hadoop1/hdp/HDP-UTILS/centos7/1.1.0.22/
gpgcheck=0
enabled=1
priority=1
3)修改hdp.repo,配置为本地源
gedit /var/www/html/hdp/HDP/centos7/2.6.5.0-292/hdp.repo
#VERSION_NUMBER=2.6.5.0-292
[HDP-2.6.5.0]
name=HDP Version - HDP-2.6.5.0
baseurl=http://centos7-hadoop1/hdp/HDP/centos7/2.6.5.0-292/
gpgcheck=0
gpgkey=http://centos7-hadoop1/hdp/HDP/centos7/2.6.5.0-292/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
[HDP-UTILS-1.1.0.22]
name=HDP-UTILS Version - HDP-UTILS-1.1.0.22
baseurl=http://centos7-hadoop1/hdp/HDP-UTILS/centos7/1.1.0.22/
gpgcheck=0
gpgkey=http://centos7-hadoop1/hdp/HDP-UTILS/centos7/1.1.0.22/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
访问地址分别是:
http://centos7-hadoop1/ambari/centos7/2.6.2.2-1/
http://centos7-hadoop1/hdp/HDP-UTILS/centos7/1.1.0.22/
http://centos7-hadoop1/hdp/HDP/centos7/2.6.5.0-292/
12、安装MYSQL
1)进入 cd /usr/local/src/
2)安装
#wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
#rpm -ivh mysql57-community-release-el7-8.noarch.rpm
#yum -y install mysql-server
启动:service mysql start
3)安装成功后重启mysql
service mysqld restart
4)连接MYSQL
mysql -uroot -pXrBwJEENp2yhVe4O
5)修改user表,把Host表内容修改为%
update user set host='%' where host='localhost';
6)删除root用户的其他host
delete from user where Host='hadoop102';
delete from user where Host='127.0.0.1';
delete from user where Host='::1';
7)刷新
mysql>flush privileges;
8)退出
mysql>quit;
13、安装Ambari
1)安装ambari-server
yum install ambari-server
2) 拷贝mysql驱动
将mysql-connector-java.jar
复制到/usr/share/java目录下并改名
为mysql-connector-java.jar
将mysql-connector-java.jar复制到
/var/lib/ambari-server/resources
目录下并改名为mysql-jdbc-driver.jar
修改ambari.properties文件
gedit /etc/ambari-server/conf/ambari.properties
添加
server.jdbc.driver.path=/usr/share/java/mysql-connector-java.jar
14、在MySQL中创建ambari数据库
1)创建ambari库
2)使用Ambari自带脚本创建表
mysql >use ambari;
mysql>source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql;
3)赋予用户root权限并刷新:
mysql> grant all privileges on *.* to 'root'@'%' identified by 'bigdata';
mysql> flush privileges;
15、配置Ambari
1)执行
ambari-server setup
2)是否自定义设置 y
Customize user account for ambari-server daemon [y/n] (n)?
3)ambari-server账号设置
Enter user account for ambari-server daemon (root):
可以直接回车root为用户
4)设置JDK。输入:3
Checking JDK...
Do you want to change Oracle JDK [y/n] (n)? y
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
[3] Custom JDK
Enter choice (1): 3
找到JavaHome路径并输入
5)数据库配置。选择:y
Configuring database...
Enter advanced database configuration [y/n] (n)? y
6)选择数据库类型。输入:3
Configuring database...
Choose one of the following options:
[1] - PostgreSQL (Embedded)
[2] - Oracle
[3] - MySQL
[4] - PostgreSQL
[5] - Microsoft SQL Server (Tech Preview)
[6] - SQL Anywhere
Enter choice (3): 3
7)设置数据库的具体配置信息。
Hostname (localhost):centos7-hadoop1
Port (3306):
Database name (ambari):
Username (ambari):root
Enter Database Password (bigdata):
Re-Enter password:
16、启动Ambari
启动和停止命令为:ambari-server start,ambari-server stop
17、HDP集群部署
浏览器输入http://centos7-hadoop1:8080/
默认管理员账目密码:admin
具体组件安装就不描述了 比较简单 自己可以玩玩 谢谢!!!!
更多推荐
所有评论(0)