Ambari 2.7.5 installation failure on CentOS 7


For the MojoExecutionException errors you are having above, you need to do some additional work inside of your build environment. If you follow the directions exactly, you still have to get correct versions of maven, npm, and nodejs before building the ambari packages with the ambari mvn commands. Also in ambari-admin pom.xml you need to set the versions for Node/NPM. Then it should build correctly.

My full history for Centos 7.4 is as follows:

[root@c7401 apache-ambari-2.7.5-src]# history
    1  yum install wget rsync nano maven java java-devel rpm-build gcc -y
    2  yum install ntp python python-devel rpm-build gcc-c++ java-1.7.0-openjdk java-1.7.0-openjdk-devel git -y
    3  wget
    4  sh setuptools-0.6c11-py2.7.egg
    5  wget -P /tmp
    6  tar xf /tmp/apache-maven-3.6.3-bin.tar.gz -C /opt
    7  ln -s /opt/apache-maven-3.6.3 /opt/maven
    8  nano /etc/profile.d/
    9  chmod +x /etc/profile.d/
   10  source /etc/profile.d/
   11  mvn -v
   15  wget
   16  tar xfvz apache-ambari-2.7.5-src.tar.gz
   17  cd apache-ambari-2.7.5-src
   19  cd ambari-admin
   28  yum --enablerepo=extras install epel-release
   29  yum install npm -y
   32  node -v
   33  npm -v
   34  nano pom.xml
   35  cd ..
   36  mvn versions:set -DnewVersion=
   37  pushd ambari-metrics
   38  mvn versions:set -DnewVersion=
   39  popd
   40  mvn -B clean install rpm:rpm -DnewVersion= -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.7"
   41  yum install /root/apache-ambari-2.7.5-src/ambari-server/target/rpm/ambari-server/RPMS/x86_64/ambari-server-
   42  yum install /root/apache-ambari-2.7.5-src/ambari-agent/target/rpm/ambari-agent/RPMS/x86_64/ambari-agent-

Contents of maven file:

export JAVA_HOME=/usr/lib/jvm/jre-openjdk
export M2_HOME=/opt/maven
export MAVEN_HOME=/opt/maven
export PATH=${M2_HOME}/bin:${PATH}

Change in Ambari Admin Pom File: (Make sure your versions are correct)


Leave a Comment