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 

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 

avatar
 

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

 

avatar

Single Host setup

Ambari UI >> Confirm Hosts >> Success with one warning (The following service should be up and running on 1 host - chronyd)

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

avatar

Hi Shelton

 

Installation done with issues though. In HDFS the namenode and snamenode were stopped in first place. Went through a couple of threads, snnode came up. Nnode is still down though

 

Thanks

avatar
Master Mentor

@Harpreet_Singh 

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

 

Good job 

avatar

Thanks Shelton

 

I simply rebooted the server yesterday, went home, this morning it's all gone.

13 critical issues left out of the 53 total reported yesterday. Again your solution works !!

 

Regards

avatar
Contributor

 

ambari installation full steps centos7

hostnamectl set-hostname your_hostname

systemctl get-default

systemctl set-default multi-user.target

nano(vim) /etc/hosts  ==>  add , ip_of_machine  name_of_machine

systemctl disable firewalld

vim /etc.sysconfig/network ==> HOSTNAME=machine_hostname

                                                    NETWORKING=yes

vim /etc/sysctl.conf ==> add, vm.swappiness=10

vim /etc/selinux/config ==> change ,selinux=disabled

yum install ntp

systemctl enable ntp

systemctl start ntp

 

vim /etc/rc.local==> enbale huge page :add ,

 

echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled; 

cd /etc/yum.repos.d

yum install wget

yum install ambari repo and favorite one here is 2.7.3

wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.3.0/ambari.repo -O /etc/yum.repos.d/ambari.repo

 yum repolist

yum install ambari-server ambari-agent

vim /etc/ambari-agent/conf/ambari-agent.ini ==>hostname=your_hostname

                                       in security section add ==>force_https_protocol=PROTOCOL_TLSV1_2

ambari-server setup ==> dont enter advanced setup and install jdk

ambari-server start

go to the web page enter (hostname:8080) or machine_ip:8080

enjoy .

please accept the answer after trying;

best regards.