Apache Ambari是一種基于Web的工具,支持Apache Hadoop集群的供應(yīng)、管理和監(jiān)控。Ambari目前已支持大多數(shù)Hadoop組件,包括HDFS、MapReduce、Hive、Pig、 Hbase、Zookeper、Sqoop和Hcatalog等。
創(chuàng)新互聯(lián)專注于科爾沁企業(yè)網(wǎng)站建設(shè),響應(yīng)式網(wǎng)站建設(shè),商城網(wǎng)站定制開發(fā)??茽柷呔W(wǎng)站建設(shè)公司,為科爾沁等地區(qū)提供建站服務(wù)。全流程定制設(shè)計(jì),專業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,創(chuàng)新互聯(lián)專業(yè)和態(tài)度為您提供的服務(wù)一、前期環(huán)境準(zhǔn)備
1.安裝epel源
2.安裝pdsh
yum -y install pdsh
3.在master和slave上配置hosts
cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.40.217 ambari 192.168.40.216 slave
4.設(shè)置免密碼登錄
ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): #回車 Enter same passphrase again: #回車 Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 01:f9:c3:e6:e2:cc:46:1c:55:68:c4:2d:2b:eb:77:09 root@localhost.localdomain The key's randomart p_w_picpath is: +--[ RSA 2048]----+ | .+.+. | | ..* . | | =.o | | o *. | | . *S. | | = E | | * . . . | | * . o | | . . . | +-----------------+ [root@ambari ~]# cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys [root@ambari ~]# scp ~/.ssh/authorized_keys master:/root/.ssh/ [root@ambari ~]# scp ~/.ssh/authorized_keys slave:/root/.ssh/
5.關(guān)閉selinux 和防火墻
二、安裝ambari
1.配置yum源
[root@ambari ~]# wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.0.1/ambari.repo [root@ambari ~]# mv ambari.repo /etc/yum.repos.d/
2.安裝ambari-server
[root@ambari ~]# yum -y install ambari-server #過(guò)程比較慢,ambari-server包有80M大小
3.本地配置
[root@ambari ~]# ambari-server setup Using python /usr/bin/python2.6 Setup ambari-server Checking SELinux... SELinux status is 'disabled' Customize user account for ambari-server daemon [y/n] (n)? y Enter user account for ambari-server daemon (root): Adjusting ambari-server permissions and ownership... Checking iptables... Checking JDK... [1] Oracle JDK 1.7 [2] Oracle JDK 1.6 [3] - Custom JDK ============================================================================== Enter choice (1): 1 JDK already exists, using /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz Installing JDK to /usr/jdk64/ Successfully installed JDK to /usr/jdk64/ Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip UnlimitedJCEPolicyJDK7.zip... 100% Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip Installing JCE policy... Completing setup... Configuring database... Enter advanced database configuration [y/n] (n)? y Configuring database... ============================================================================== Choose one of the following options: [1] - PostgreSQL (Embedded) [2] - Oracle [3] - MySQL [4] - PostgreSQL ============================================================================== Enter choice (1): Database name (ambari): Postgres schema (ambari): Username (ambari): Enter Database Password (bigdata): Default properties detected. Using built-in database. Configuring ambari database... Checking PostgreSQL... Running initdb: This may take upto a minute. Initializing database: [ OK ] About to start PostgreSQL Configuring local database... Connecting to local database...done. Configuring PostgreSQL... Restarting PostgreSQL Extracting system views... ..ambari-admin-2.0.1.45.jar . Adjusting ambari-server permissions and ownership... Ambari Server 'setup' completed successfully. ###這里由于下載jdk速度過(guò)慢。我提前把jdk下載下來(lái)放到了/var/lib/ambari-server/resources/目錄 [root@ambari ~]# cd /var/lib/ambari-server/resources/ [root@ambari resources]# mv /root/jdk-7u67-linux-x64.tar.gz .
4.啟動(dòng)服務(wù)
[root@ambari ~]# ambari-server start Using python /usr/bin/python2.6 Starting ambari-server WARNING: The hostname was not found in the reverse DNS lookup. This may result in incorrect behavior. Please check the DNS setup and fix the issue. Ambari Server running with administrator privileges. Organizing resource files at /var/lib/ambari-server/resources... Server PID at: /var/run/ambari-server/ambari-server.pid Server out at: /var/log/ambari-server/ambari-server.out Server log at: /var/log/ambari-server/ambari-server.log
啟動(dòng)ambari報(bào)錯(cuò)
WARNING: The hostname was not found in the reverse DNS lookup. This may result in incorrect behavior. Please check the DNS setup and fix the issue. ‘ 這個(gè)問(wèn)題是由于沒有把主機(jī)名已經(jīng)對(duì)應(yīng)的ip加到/etc/hosts 導(dǎo)致的。
5.訪問(wèn)web
http://ip:8080 默認(rèn)用戶是admin,密碼admin
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。