apt-get install openjdk-8-jdk
echo "export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64" > /etc/profile.d/Z99-java-env.sh
source /etc/profile.d/Z99-java-env.sh
echo "12" > /etc/debian_version
apt-get install ambari-server
ambari-server setup
openssl req -config /var/lib/ambari-server/keys/ca.config.hack -new -x509 -keyout /var/lib/ambari-server/keys/ca.key -out /var/lib/ambari-server/keys/ca.crt -days 3650
openssl pkcs12 -export -in '/var/lib/ambari-server/keys/ca.crt' -inkey '/var/lib/ambari-server/keys/ca.key' -certfile '/var/lib/ambari-server/keys/ca.crt' -out '/var/lib/ambari-server/keys/keystore.p12' -password file:'/var/lib/ambari-server/keys/pass.txt'
openssl pkcs12 -info -in '/var/lib/ambari-server/keys/keystore.p12' -password file:'/var/lib/ambari-server/keys/pass.txt'
mkdir /usr/share/ca-certificates/ambari
echo | openssl s_client -connect ec2-52-28-136-202.eu-central-1.compute.amazonaws.com:8440 2>&1 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /usr/share/ca-certificates/ambari/server.crt
dpkg-reconfigure ca-certificates # and then choose ask and select ambari/server.crt
On installation zookeeper-server fails to install. Manually install zookeeper-server.deb package on each zookeeper server because it conflicts with zookeeper.deb and we need to --force-overwrite. Then retry installation from ambari-server WEB UI.
dpkg --force-overwrite -i /var/cache/apt/archives/zookeeper-2-2-6-0-2800-server_3.4.6.2.2.6.0-2800_all.deb