maven倉庫
Apache Software Foundation Distribution Directory
aws
https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-bundle/1.11.375
hortonworks
軟件包
Apache官網
前期准備
yum --enablerepo=extras install epel-release
yum install npm git rpm-build -y
node -v
npm -v
修改ambari-admin的pom.xml
#修改對應的node和npm的版本號
<configuration>
<nodeVersion>v6.17.1</nodeVersion>
<npmVersion>3.10.10</npmVersion>
<workingDirectory>src/main/resources/ui/admin-web/</workingDirectory>
<npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
</configuration>
編譯前最好增加以下Apache以及其他的maven倉庫地址
Step 1: Download and build Ambari 2.7.5 source
Go to http://www.apache.org/dyn/closer.cgi/ambari/ambari-2.7.5 and find the suggested mirror for download. The process to verify the download is described is at http://www.apache.org/dyn/closer.cgi#verify
wget https://www-eu.apache.org/dist/ambari/ambari-2.7.5/apache-ambari-2.7.5-src.tar.gz (use the suggested mirror from above)
tar xfvz apache-ambari-2.7.5-src.tar.gz
cd apache-ambari-2.7.5-src
mvn versions:set -DnewVersion=2.7.5.0.0
pushd ambari-metrics
mvn versions:set -DnewVersion=2.7.5.0.0
popd
編譯RHEL (CentOS 7) & SUSE (SLES 12 SP2 & SP3):
mvn -B clean install rpm:rpm -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6"
Step 2: Install Ambari Server
Install the rpm package from ambari-server/target/rpm/ambari-server/RPMS/noarch/
- [For CentOS 7]
yum install ambari-server*.rpm #This should also pull in postgres packages as well.
Step 3: Setup and Start Ambari Server
Run the setup command to configure your Ambari Server, Database, JDK, LDAP, and other options:
ambari-server setup
Follow the on-screen instructions to proceed.
Once set up is done, start Ambari Server:
ambari-server start
Step 4: Install and Start Ambari Agent on All Hosts
Note: This step needs to be run on all hosts that will be managed by Ambari.
Copy the rpm package from ambari-agent/target/rpm/ambari-agent/RPMS/x86_64/ and run:
- [For CentOS 7]
yum install ambari-agent*.rpm
Make sure hostname under the [server] section points to the actual Ambari Server host, rather than "localhost".
ambari-agent start
Step 5: Deploy Cluster using Ambari Web UI
Open up a web browser and go to http://
Log in with username admin and password admin and follow on-screen instructions. Secure your environment by ensuring your administrator details are changed from the default values as soon as possible.
Under Install Options page, enter the hosts to add to the cluster. Do not supply any SSH key, and check "Perform manual registration on hosts and do not use SSH" and hit "Next".
Apache maven 相關下載地址
http://repo.hortonworks.com/content/groups/public/
錯誤
- 找不到 org.json.simple.JSONAware
ambari-metrics/ambari-metrics-storm-sink-legacy/pom.xml
增加json依賴包
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
- amazonaws下載HBASE相關包失敗
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (default) on project ambari-metrics-timelineservice: An Ant BuildException has occured: Can't get https://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.4.0-315/tars/hbase/hbase-2.0.2.3.1.4.0-315-bin.tar.gz to /root/apache-ambari-2.7.5-src/ambari-metrics/ambari-metrics-timelineservice/target/embedded/hbase.tar.gz
[ERROR] around Ant part ...<get usetimestamp="true" src="https://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.4.0-315/tars/hbase/hbase-2.0.2.3.1.4.0-315-bin.tar.gz" dest="/root/apache-ambari-2.7.5-src/ambari-metrics/ambari-metrics-timelineservice/target/embedded/hbase.tar.gz"/>... @ 5:273 in /root/apache-ambari-2.7.5-src/ambari-metrics/ambari-metrics-timelineservice/target/antrun/build-Download HBase.xml
apache-ambari-2.7.5-src/ambari-metrics/pom.xml defined the nortonworks HDP sources:修改pom.xml文件
<hbase.tar>https://archive.apache.org/dist/hbase/2.0.0/hbase-2.0.0-bin.tar.gz</hbase.tar>
<hbase.folder>hbase-2.0.0</hbase.folder>
<hadoop.tar>https://archive.apache.org/dist/hadoop/hadoop-2.8.0.tar.gz</hadoop.tar>
<hadoop.folder>hadoop-2.8.0</hadoop.folder>
<phoenix.tar>https://archive.apache.org/dist/phoenix/apache-phoenix-5.0.0-HBase-2.0/bin/apache-phoenix-5.0.0-HBase-2.0-bin.tar.gz</phoenix.tar>
<phoenix.folder>apache-phoenix-5.0.0-HBase-2.0</phoenix.folder>