0

I'm a newbie to Ubuntu. Now I'm trying to install Apache Ambari Server on Ubuntu 18.04.

I've successfully completed steps like installing jdk, turning off firewall, stopping SELinux. However I came up against an error when running the command to pull Apache repo. The command is:

$ wget -O /etc/apt/sources.list.d/ambari.list http://public-repo-1.hortonworks.com/ambari/ubuntu18/2.x/updates/2.7.5.0/ambari.list

The error was some HTTP response failure with code 403: Forbidden. I also try another version for ambari (like 2.6.2.0) and even different link for the repo but still the error happened.

So anyone could tell me what is the problem and how to fix it? Thanks so much for helping me out!

MaiTruongSon
  • 97
  • 1
  • 2
  • 11

1 Answers1

1

I am trying to install ambari on CentOs. I found out that one of the providers cloudera has stopped freely offering the ambari installation starting from this year. You can take a look here. P.S. hortonworks should be under cloudera so that might be the reason why you cannot download the public image.

One of the solutions would be to follow the guide from Apache Ambari official website, which is over here. You can follow the installation guide there for your desired Ambari version on Ubuntu.

For example, if you are going to install Apache Ambari with version 2.7.5, you will find this page useful.

Below is based on my understanding and the instructions described on the documentation but I have not try it yet since my working environment is on CentOS. Take installation on Ubuntu for instance

Step 1: Install the prerequisites

According to this answer, at least you might need to install python, node and npm on your machine.

Step 2: Build the project using maven

# download ambari
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

# build ambari
mvn -B clean install jdeb:jdeb -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6"

Step 3: Install Ambari Server

apt-get install ./ambari-server*.deb

Step 4: Setup and Start Ambari Server

# setup your server
ambari-server setup

# start your server
ambari-server start

Step 5: Install and Start Ambari Agent on All Hosts

Note: This step needs to be run on all hosts that will be managed by Ambari.

apt-get install ./ambari-agent*.deb

Edit /etc/ambari-agent/ambari.ini

...
[server]
hostname=localhost
 
...

Make sure hostname under the [server] section points to the actual Ambari Server host, rather than "localhost".

# start ambari agent
ambari-agent start
Bill
  • 11
  • 2
  • Hi Bill, tks for your advice, I also found out that problem. However, while following steps in Apache Ambari website, I came up with another problem. To be specific, I don't understand what to do after running the command: `mvn -B clean install jdeb:jdeb -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6"` – MaiTruongSon Mar 02 '21 at 07:53
  • Then it would be so great if you can help me with those steps, like what should I pre-install or what steps should be taken? – MaiTruongSon Mar 02 '21 at 07:56
  • @MaiTruongSon Hi, thanks for the apply. However, since I am setting up ambari on CentOS, which is a little bit different from Ubuntu so I cannot give you concrete steps. I will modify the answer and see if it helps. – Bill Mar 02 '21 at 08:24
  • 1
    @MaiTruongSon Actually you can search for `ambari` tag on stackoverflow if you see any build errors and troubleshoot them. One of the useful thing that I found is that you can add `-X` flag to `mvn -B clean install ...` see detailed errors and search for corresponding solutions. – Bill Mar 02 '21 at 08:45
  • Thanks so much again, that's very kind of you. Stay safe! – MaiTruongSon Mar 02 '21 at 10:00
  • If you don't mind, I finished step 2. Then I ran the command: `apt-get install ./ambari-server*.deb`. Unfortunately, an error `E: Unsupported file ./ambari-server*.deb given on commandline` appeared. Of course I have looked for it in stackoverflow as well as googled it, but most of the answers were referred to the public repo, and there are seemly no solutions for the problem. Do you have any ideas for it? Thank you so much in advance! – MaiTruongSon Mar 02 '21 at 14:29
  • @MaiTruongSon Thanks! But unfortunately we are facing this issue as well. After a lot of investigation we found out that it seems Apache Ambari is depending on HDP packages, where HDP refers to Hortonworks Data Platform (under cloudera). So from our understanding Apache Ambari is no longer free. One of the solutions would be to become a customer with them and hope this answers your question. – Bill Mar 03 '21 at 08:40
  • tks so much, I have registered to be one of their customers. – MaiTruongSon Mar 04 '21 at 11:10