Ambari Installation Notes

Source: Internet
Author: User
Tags character set flush create database hortonworks yum repolist
Preparing Resources

JDK
Download Address
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Mysql
Download Address
https://dev.mysql.com/downloads/mysql/

Ambari HDP
You can adjust the version number according to the installed version
Ambari 2.2.2
Http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.0.0/HDP-2.4.0.0-centos7-rpm.tar.gz
HDP 2.4.2
Http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.2.0/ambari-2.2.2.0-centos7.tar.gz
Hdp-utils 1.1.0
Http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos7/HDP-UTILS-1.1.0.20-centos7.tar.gz

Reference Documentation:
https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_command-line-installation/content/ download-companion-files.html installing MySQL

Unzip the MySQL tar package

Tar xvf Mysql-5.7.21-1.el6.x86_64.rpm-bundle.tar

Installation order

RPM-IVH mysql-community-common-5.7.21-1.el6.x86_64.rpm
RPM-IVH mysql-community-libs-5.7.21-1.el6.x86_64.rpm
rpm-ivh mysql-community-client-5.7.21-1.el6.x86_64.rpm
rpm-ivh mysql-community-server-5.7.21-1.el6.x86_ 64.rpm
start, restart, and stop

Start

Service mysqld Start

Stop it

Service Mysqld Stop

Restart

Service mysqld Restart
Change Password and forgot password

Modify MySQL Password

With Mysqladmin

mysqladmin-u root Password "Newpass"

If Root has already set a password, use the following method

mysqladmin-u root password Oldpass "Newpass"

Forgot Password Change password

Mysqld_safe--skip-grant-tables
mysql-u root mysql
update mysql.user set Authentication_string=password (' New password ') where user= ' root ';
Flush privileges;

Problems encountered-1

File/usr/share/mysql/charsets/latin5.xml from install of mysql-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with File from package mysql-libs-5.1.71-1.el6.x86_64  
file/usr/share/mysql/charsets/latin7.xml from Install of mysql-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from the package mysql-libs-5.1.71-1.el6.x86_64  
file /usr/share/mysql/charsets/macce.xml from install of mysql-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file From package mysql-libs-5.1.71-1.el6.x86_64  
file/usr/share/mysql/charsets/macroman.xml from Install of mysql-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from the package mysql-libs-5.1.71-1.el6.x86_64  
file /usr/share/mysql/charsets/swe7.xml from install of mysql-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file From Package mysql-libs-5.1.71-1.el6.x86_64  

Workaround (version number is based on conflicting log analysis)

Yum-y Remove mysql-libs-5.1.71*

Problems encountered-2

You must reset your password using the ALTER USER statement before executing this statement.

Solutions

SET PASSWORD = PASSWORD (' Your new PASSWORD ');
ALTER USER ' root ' @ ' localhost ' PASSWORD EXPIRE never;
Flush privileges;
create the database on which Ambari depends

After the installation is complete, create the Ambari database and the user, log in to the root user to execute the following statement:

Create database Ambari character set UTF8; 
CREATE USER ' ambari ' @ '% ' identified by ' Ambari-123 ';
GRANT all privileges on * * to ' ambari ' @ '% ';
FLUSH privileges;

If you are installing hive, then create the hive database and the user to execute the following statement:

Create DATABASE hive character set UTF8; 
CREATE USER ' hive ' @ '% ' identified by ' Hive-123 ';
GRANT all privileges on * * to ' hive ' @ '% ';
FLUSH privileges;

If you are installing Oozie, create the Oozie database and the user then execute the following statement:

Create database Oozie character set UTF8;  
CREATE USER ' oozie ' @ '% ' identified by ' Oozie-123 ';
GRANT all privileges on * * to ' oozie ' @ '% ';
FLUSH privileges;

To install the MySQL JDBC driver:

Yum Install Mysql-connector-java
Create Ambari system users and user groups (operations only on the primary node)

Add Ambari install, run users and user groups, or do not create new users, directly using root or other system account

AddUser Ambari
passwd Ambari
Enable NTP service (all nodes on the cluster need to operate)
Yum install ntpd
chkconfig--list ntpd
chkconfig ntpd 
service ntpd start
Configuring the Yum source

Copy the repo to the Yum source directory

MV ambari.repo/etc/yum.repos.d/
MV hdp.repo/etc/yum.repos.d/

Update Yum Source

Yum Clean all
yum list update
yum makecache
Yum repolist
problems encountered

The page reported the following error:

The following hosts have Transparent hugepages (THP) enabled. THP should is disabled to avoid potential Hadoop performance 
issues.

Workaround, execute under Linux:

Echo never >/sys/kernel/mm/redhat_transparent_hugepage/defrag
Echo never >/sys/kernel/mm/redhat_ Transparent_hugepage/enabled
Echo never >/sys/kernel/mm/transparent_hugepage/enabled
Echo never >/ Sys/kernel/mm/transparent_hugepage/defrag

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.