標籤:
centos 7上安裝
cat /etc/redhat-release
http://s3.amazonaws.com/public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.3.4.0/HDP-2.3.4.0-centos7-rpm.tar.gz
http://s3.amazonaws.com/public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.0.0/ambari-2.2.0.0-centos7.tar.gz
1.配置/etc/hosts
vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.0.33 hadoop192.168.0.34 hadoop1192.168.0.35 hadoop2
註:3台機器都要配。
2.配置ssh認證
1 ssh-keygen -t rsa
註:3台機器都產生秘鑰,直接Enter就行。
1 ssh-copy-id hadoop2 ssh-copy-id hadoop13 ssh-copy-id hadoop2
註:我一般主節點機器都配,其他機器配如下,能ping通主節點就行。
1 ssh-copy-id hadoop
註:配完之後,互相ping一下主機,一定要能ping通。
ping hadoopping hadoop1ping hadoop2
註:子節點能ping通主節點就行。
3.先安裝httpd服務
yum -y install httpdsystemctl start httpd.service
4.將下載的包解壓後放到如下目錄
cd /var/www/html/HDP/centos7/
註:我把ambari解壓之後直接放到centos7目錄下了。
5.配置yum源
[[email protected] ~]# vi /etc/yum.repos.d/ambari.repo[Hadoop]name=hadoopbaseurl=http://192.168.0.33/HDP/centos7/2.2.0.0-1310/gpgcheck=0enabled=1
註:本機ip為192.168.0.33
[[email protected] yum.repos.d]# yum clean all[[email protected] yum.repos.d]# yum search ambari-server[[email protected] yum.repos.d]# yum install ambari-server[[email protected] yum.repos.d]# ambari-server setup
如果還沒有關閉SELinux,執行這個命令的過程中會提示,選擇y。然後會配置PostgreSQL,選擇要安裝的oracle jdk版本。之後設定資料庫,選n使用預設資料庫使用者名稱ambari-server和密碼bigdata,選y自己建立使用者名稱密碼。
[[email protected] yum.repos.d]# ambari-server start
6.訪問Ambari首頁
主機ip:8080
使用者名稱:admin 密碼:admin
進入介面後註冊主機,添加服務等後續步驟就不寫了。提示裡面需要主節點私密金鑰和所有節點主機名稱。
私密金鑰擷取:
1 cat ~/.ssh/id_rsa
把檔案中的內容粘到相應位置。其中組件可以根據自己的需要添加。
7.安裝完之後查看hadoop版本:
hadoop version
centos 7上安裝HDP