準備工作:(系統centos6) (推薦java1.7以上版本)
1.準備至少3台機器, 依次配置每台機器的主機名,第一台機器同時作為yum本地源
【
配置主機名3步
1.#hostname hdp1
2.# vim /etc/sysconfig/network
HOSTNAME=hdp1
3.# vim /etc/hosts
192.168.144.63 hdp1
192.168.144.64 hdp2
192.168.144.70 hdp3
】
2.設定hdp1免密碼登陸hdp2,hdp3
【
hdp1上執行:
#ssh-keygen -t rsa (3次回車)
# scp ~/.ssh/id_rsa.pub [email protected]:~/
# scp ~/.ssh/id_rsa.pub [email protected]:~/
# scp ~/.ssh/id_rsa.pub [email protected]:~/
每台機器上執行:
#vim /etc/ssh/sshd_config (打開下面3行的注釋)
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
# cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
】
下載下傳 HDP 和 HDP-UTILS :
#wget -nv http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.2.0/hdp.repo -O /etc/yum.repos.d/hdp.repo
#同步
#Yum repolist
#reposync -r HDP-2.3.2.0
#reposync -r HDP-UTILS-1.1.0.20
下載下傳 Amabri :
# wget -nv http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.1.2.1/ambari.repo -O /etc/yum.repos.d/ambari.repo
#同步
#yum repolist
# reposync -r Updates-ambari-2.1.2.1
每台機器安裝:
#yum install -y mesa-libGL.i686
#yum install openssl
[安裝時遇到openssl問題# rpm -qa|grep openssl
# rpm -e openssl-1.0.1e-15.el6.x86_64
# rpm -Uvh openssl-devel-1.0.0-27.z.2.ec1.gf.el6.x86_64.rpm]
#yum install nc
#yum install redhat-lsb
#yum install gcc
#yum install python-devel
#yum install python-libs
關閉 Linux 的 THP 服務(#centos6)
# echo transparent_hugepage=never >> /etc/grub.conf
#echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
#yum install ntp
# chkconfig ntpd on && service ntpd start
(失敗vim /etc/ntp.conf 添加ntpd_enable="YES")
關閉 SELinux 服務,關閉防火牆,
#chkconfig iptables off && service iptables stop && setenforce 0
修改/etc/selinux/config檔案中的SELINUX="" 為 disabled。
# mkdir -p /var/lib/ambari-agent/data
#date -s "2015-12-05 15:02:00"校準時間
#/etc/init.d/sshd restart
第一台機器安裝:
#yum install createrepo (安裝 createrepo ,用于制作本地源)
在/etc/yum.repo.d檔案夾中添加一個 ambari.repo檔案,内容如下:
[Updates-ambari-2.1.2.1]
name=ambari-2.1.2.1 - Updates
baseurl=http://192.168.116.129/ambari/Updates-ambari-2.1.2.1/
gpgcheck=0
enabled=1
[HDP-2.3.2.0]
name=HDP Version - HDP-2.3.2.0
baseurl=http://192.168.116.129/ambari/HDP-2.3.2.0/
gpgcheck=0
enabled=1
[HDP-UTILS-1.1.0.20]
name=HDP Utils Version - HDP-UTILS-1.1.0.20
baseurl=http://192.168.116.129/ambari/HDP-UTILS-1.1.0.20/
gpgcheck=0
enabled=1
# mkdir /var/www/html/ambari
把上面下載下傳的檔案夾移動到abmari下
#createrepo /var/www/html/ambari
#createrepo HDP-2.3.2.0/
#createrepo HDP-UTILS-1.1.0.20/
#createrepo Updates-ambari-2.1.2.1/
配置環境:httpd 服務
#vi /etc/httpd/conf/httpd.conf
把 #ServerName www.example.com :80 修改為 ServerName hostname:80
修改通路權限:
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
啟動 httpd 服務
#chkconfig httpd on && service httpd start
#yum clean all && yum makecache
# yum install ambari-server
#ambari-server setup
# ambari-server start
3.通路hdp1:8080安裝
注意:
Select Stack> Advanced Repository Options指定本地源
安裝ambari-agent選擇的sshkey是id_rsa
#mkdir /var/lib/ambari-agent/data
安裝agent報錯
vi /etc/ambari-agent/conf/ambari-agent.ini
[server]
hostname=<your.ambari.server.hostname>
url_port=8440
secured_url_port=8441
使用hiveview報錯
修改hdfs》df.permision =false