1. 程式人生 > >Ambari安裝Presto服務(無網接入)

Ambari安裝Presto服務(無網接入)

環境:

CentOS 7.2JDK 1.8

提前準備:

所有機器禁用requiretty,編輯/etc/sudoers檔案,註釋掉Defaults requiretty

 

確保每個節點已經安裝wget

 

確保Ambari已安裝好HDP2.6,在ambari-server執行的伺服器上建立如下目錄/var/lib/ambari-server/resources/stacks/HDP/2.6/services/PRESTO

# mkdir /var/lib/ambari-server/resources/stacks/HDP/2.6/services/PRESTO

# cd /var/lib/ambari-server/resources/stacks/HDP/2.6/services/PRESTO

將下載整合檔案

ambari-presto-1.2.tar.gz放於/var/lib/ambari-server/resources/stacks/HDP/2.6/services/PRESTO目錄下

tar -xzvf ambari-presto-1.2.tar.gz -C  /var/lib/ambari-server/resources/stacks/HDP/2.6/services/PRESTO

 

最後,將所有整合檔案新增可執行許可權,

# chmod -R +x /var/lib/ambari-server/resources/stacks/HDP/2.6/services/PRESTO/*

下載對應的rpmcli

presto-cli-0.161-executable.jar

presto-server-rpm-0.161.rpm

新建目錄:/var/www/html/repo/local,將這兩個檔案拷貝此目錄下

 使用createrepo建立索引

# yum install createrepo

# createrepo /var/www/html/repo/local

將這兩個安裝包設定為本地倉庫進行安裝(無網路環境)

 

在/etc/yum.repos.d/目錄下新增local.repo檔案,內容如下:

 

#修改下載包的對應版本

# cd /var/lib/ambari-server/resources/stacks/HDP/2.6/services/PRESTO/package/scripts修改

download.ini

 

# yum clean all (清除快取)

# yum makecache (建立新快取)

# ambari-server restart

重啟Ambari server後,在瀏覽器UI介面,點選Add Service,根據指示安裝Presto

分散式模式執行,在一個節點上安裝Presto coordinator,在其他若干節點(非coordinator節點)上安裝Presto worker不要將worker放置在與coordinator相同的節點上

如果嘗試將失敗安裝,請解除安裝每臺機器上的rpm  -e presto-server-rpm-0.161包再重新安裝

可在安裝服務presto 服務元件成功後,再配置Connectors引數:

 

參考內容(目前配了hivekafka):

{'hive': ['connector.name=hive-hadoop2', 'hive.metastore.uri=thrift://c2bde55:9083'],'kafka': ['connector.name=kafka', 'kafka.table-names=ATLAS_ENTITIES,ATLAS_HOOK,ambari_kafka_service_check,testTopic', 'kafka.nodes=c2bde02:2181,c2bde03:2181,c2bde55:2181']}