Support Questions

Find answers, ask questions, and share your expertise

Ambari Installation on CentOS 7

avatar
Hello Manager
 
We are in the process of implementing a data lake solution for different systems for data ingestion, reporting and analytics purpose.
 
I tried implementing Hortonworks Ambari 2.7.4 on CentOS 7, on single node. There were quite a few technical challenges faced during several installation attempts.
I would like to know if your company offers Ambari installation plans, including pricing details.
 
Please provide the details about same, so we can analyse it and proceed further accordingly.
 
Thanks & Regards
Harpreet Singh
7 ACCEPTED SOLUTIONS

avatar
Master Mentor

@Harpreet_Singh 

Of course, you have bought support Cloudera Engineers are ready to help you Cloudera Support at your service.

There is a dedicated team of Cloudera professionals that could help you in all aspects from architecting to the deployment of your environment implementing the best practices let alone help you manage and eventually do knowledge transfer if you plan to manage your clusters internally having said that the Cloudera community is there to help you acquire some technical knowledge to sort out technical problems in you Dev or  environments  without critical data.

Can you share the issues you encountered during your single node installation? It should be easy and straight forward. 

happy hadooping

View solution in original post

avatar
Master Mentor

@Harpreet_Singh 

You are talking of hosts yet you are installing a single node cluster? If you have more than one node all the same nos issues to avoid the tricky setup of passwordless ssh run the following on all host including the Ambari server

My assumptions

You have successfully installed Ambari and it's running on port 8080

OS=Centos7/RHEL7                                    [Same steps and procedure]
Database= MySQL                                            [Already installed and running]
root password= welcome1                      [Replace with your current MySQL root password]
Ambari_host=tokyo.com                           [please replace with the output of $ hostname -f ]

 

Execute the below as root on all the hosts, first ensure that your /etc/host entry is the same on all host with the format if you have 4 hosts all the /etc/host entries should look like below

IP                                            FQDN                        ALIAS
192.168.0.10               host1.com               host1
192.168.0.13              host2.com                host2
192.168.0.14             host3.com                 host3
192.168.0.16              host4.com               host4


Install the Ambari-agent on all the hosts

# yum repolist
# yum install ambari-agent

Edit the /etc/ambari-agent/conf/ambari-agent.ini on all hosts edit the server entry and replace the hostname with the FQDN of the Ambari server save and exit

[server]
hostname= tokyo.com [Your Ambari host]

url_port=8440
secured_url_port=8441
connect_retry_delay=10
max_reconnect_retry_delay=30

Start the agent

# ambari-agent start

Validate the Ambari-agent status

# ambari-agent status

It should be running, do that above on all hosts

 

The components that are failing to install all need a database to hold the objects like Hive Metastore. It's very simple and here we go. I am assuming you have installed the MySQL database if you already as you have Ambari running.

 

Make sure you enable MySQL to startup at boot

# systemctl enable mysqld
# systemctl start mysqld

 

The below script can be used to create hive, oozie, ranger and rangerkms database plus users. You can simply use a notepad to replace for example all occurrences of hive with ranger then after with oozie etc.

You will notice for simplicity I have used the same name for the database, user and password just copy and paste every time as this is the first installation you can harden the security when you become familiar with the process
##################################
# As root user ...... Hive,,oozie,ranger and rangerkms
###################################

mysql -u root -pwelcome1
CREATE database hive;
CREATE USER 'hive'@'localhost' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'localhost';
CREATE USER 'hive'@'%' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'%';
CREATE USER 'hive'@'tokyo.com' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'tokyo.com';
FLUSH PRIVILEGES;
quit;

############################################################
# Create the database for the Druid and Superset metastore
###########################################################
mysql -u root -pwelcome1
CREATE DATABASE druid DEFAULT CHARACTER SET utf8;
CREATE DATABASE superset DEFAULT CHARACTER SET utf8;
CREATE USER 'druid'@'%' IDENTIFIED BY 'druid';
CREATE USER 'superset'@'%' IDENTIFIED BY 'superset';
GRANT ALL PRIVILEGES ON *.* TO 'druid'@'%' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'superset'@'%' WITH GRANT OPTION;
commit;
quit;

 

After completing the above you should be having hive, oozie, ranger and rangerkms, druid and superset databases ready.

From the Ambari UI the correct values should be picked you can test the connection they should succeed, note the password will be blanked out that's normal see attached screenshot use existing databases not NEW !!

Once all you have validated the above you can now fire up the start all components from Ambari the above components should start successfully.

Please revert
HTH

View solution in original post

avatar
Master Mentor

@Harpreet_Singh 

No you will be fine  Centos7 or RHEL  no  constraints just  follow the  official environment preparation instructions and dont overlook any point and I am sure you will be okay.

View solution in original post

avatar
Master Mentor

@Harpreet_Singh 

Yes they look fine as they a direct reference to the Hortonworks documentation. Derby databases ain't great for anything apart for development. But its a good pratice to have ONLY one type of database for easy management. And the earlier you start to practice that the better.

If your issue is resolved then close the thread by accepting the best answer

Happy hadooping 

View solution in original post

avatar
Master Mentor

@Harpreet_Singh 

 

That script should have been delivered if you run the MySQL install can you confirm?

 

 Install MySQL for Ambari set auto for Mysql server

#  yum install -y mysql-server
# chkconfig mysqld --level 345 on
# yum install -y mysql-connector-java

 

Then continue with the setup

 Setup Ambari
# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar

 

I am still online

 

View solution in original post

avatar
Master Mentor

@Harpreet_Singh 

That's a warning you should be able to continue but run the below on all the hosts in the cluster if it isn't a single node cluster

Use sudo if you don't have root access but permitted in the sudoers 

# yum -y install chrony
# systemctl enable chronyd
#  systemctl start chronyd

 

That should works

View solution in original post

avatar
Master Mentor

@Harpreet_Singh 

Can you stop all through ambari and then start all.
Post any errors here 

 

Good job 

View solution in original post

18 REPLIES 18

avatar
Master Mentor

@Harpreet_Singh 

Of course, you have bought support Cloudera Engineers are ready to help you Cloudera Support at your service.

There is a dedicated team of Cloudera professionals that could help you in all aspects from architecting to the deployment of your environment implementing the best practices let alone help you manage and eventually do knowledge transfer if you plan to manage your clusters internally having said that the Cloudera community is there to help you acquire some technical knowledge to sort out technical problems in you Dev or  environments  without critical data.

Can you share the issues you encountered during your single node installation? It should be easy and straight forward. 

happy hadooping

avatar

Hi Shelton

 

Thanks for the quick response. Infact I am trying to setup Hortonworks Ambari 2.7.4 on single node on a CentOS 7 machine, following the instructions in HW tutorials for ambari installation and administration

 

However I am stuck with installing client services for some components namely hive,oozie, druid etc and ranger/rangerkms to be particular

This time there is another issue, hosts not resolving during the initial steps.

 

I am quite open to any Linux distribution/version you suggest, that works perfectly for installation and which HW ambari version is stable for it.

Also wonder if there is one page document or pdf for complete installation and services setup process?

 

Thanks & appreciate your help.

avatar
Master Mentor

@Harpreet_Singh 

You are talking of hosts yet you are installing a single node cluster? If you have more than one node all the same nos issues to avoid the tricky setup of passwordless ssh run the following on all host including the Ambari server

My assumptions

You have successfully installed Ambari and it's running on port 8080

OS=Centos7/RHEL7                                    [Same steps and procedure]
Database= MySQL                                            [Already installed and running]
root password= welcome1                      [Replace with your current MySQL root password]
Ambari_host=tokyo.com                           [please replace with the output of $ hostname -f ]

 

Execute the below as root on all the hosts, first ensure that your /etc/host entry is the same on all host with the format if you have 4 hosts all the /etc/host entries should look like below

IP                                            FQDN                        ALIAS
192.168.0.10               host1.com               host1
192.168.0.13              host2.com                host2
192.168.0.14             host3.com                 host3
192.168.0.16              host4.com               host4


Install the Ambari-agent on all the hosts

# yum repolist
# yum install ambari-agent

Edit the /etc/ambari-agent/conf/ambari-agent.ini on all hosts edit the server entry and replace the hostname with the FQDN of the Ambari server save and exit

[server]
hostname= tokyo.com [Your Ambari host]

url_port=8440
secured_url_port=8441
connect_retry_delay=10
max_reconnect_retry_delay=30

Start the agent

# ambari-agent start

Validate the Ambari-agent status

# ambari-agent status

It should be running, do that above on all hosts

 

The components that are failing to install all need a database to hold the objects like Hive Metastore. It's very simple and here we go. I am assuming you have installed the MySQL database if you already as you have Ambari running.

 

Make sure you enable MySQL to startup at boot

# systemctl enable mysqld
# systemctl start mysqld

 

The below script can be used to create hive, oozie, ranger and rangerkms database plus users. You can simply use a notepad to replace for example all occurrences of hive with ranger then after with oozie etc.

You will notice for simplicity I have used the same name for the database, user and password just copy and paste every time as this is the first installation you can harden the security when you become familiar with the process
##################################
# As root user ...... Hive,,oozie,ranger and rangerkms
###################################

mysql -u root -pwelcome1
CREATE database hive;
CREATE USER 'hive'@'localhost' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'localhost';
CREATE USER 'hive'@'%' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'%';
CREATE USER 'hive'@'tokyo.com' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'tokyo.com';
FLUSH PRIVILEGES;
quit;

############################################################
# Create the database for the Druid and Superset metastore
###########################################################
mysql -u root -pwelcome1
CREATE DATABASE druid DEFAULT CHARACTER SET utf8;
CREATE DATABASE superset DEFAULT CHARACTER SET utf8;
CREATE USER 'druid'@'%' IDENTIFIED BY 'druid';
CREATE USER 'superset'@'%' IDENTIFIED BY 'superset';
GRANT ALL PRIVILEGES ON *.* TO 'druid'@'%' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'superset'@'%' WITH GRANT OPTION;
commit;
quit;

 

After completing the above you should be having hive, oozie, ranger and rangerkms, druid and superset databases ready.

From the Ambari UI the correct values should be picked you can test the connection they should succeed, note the password will be blanked out that's normal see attached screenshot use existing databases not NEW !!

Once all you have validated the above you can now fire up the start all components from Ambari the above components should start successfully.

Please revert
HTH

avatar

Hi Shelton

 

Thanks for your instructions. Will follow and let you know results. A quick one here -

Is there any Linux or any distribution/software version constraint here, like CentOS 7, python 2.7 etc.

 

Thanks

avatar
Master Mentor

@Harpreet_Singh 

No you will be fine  Centos7 or RHEL  no  constraints just  follow the  official environment preparation instructions and dont overlook any point and I am sure you will be okay.

avatar
Master Mentor

@Harpreet_Singh 

 

Any updates do you still need help?

avatar

Hi Shelton

 

I just got a fresh install of CentOS, will try today

 

Thanks

avatar
Master Mentor

@Harpreet_Singh 

Okay sorry for that please keep me posted 

avatar

Hi Shelton

 

Installed Ambari server with PostgreSQL default and agents, up and running.

Tried installing Mysql separately for other components. Are the instructions for mysql setup on this page ok - https://community.cloudera.com/t5/Support-Questions/Ambari-Mysql-setup/td-p/116774

 

Thanks