CDH Installation Documentation

1. Installation environment

CentOS 6.8 Virtual Machine Three
1G per memory
50G per hard disk

2. Installation packages required

CDH5.9.0 Installation Package
Files included:

Parcel contains files:

Files included in rpms:

Before you start the installation below, make sure the number of files is correct

3. Installation steps

First, move the installation package in the second part under each node, where I am the three hosts, divided into one master node and two slave nodes.The following actions are recommended for root users
1 Modify hostName
Set the hostname to modify the hostname of the server so that the hostname takes effect immediately

vi /etc/sysconfig/network

Modify the original hostname to newname, reboot.
After booting up, check hostname:

uname -a

2 Add host name
First, use ifconfig to view the ip address of each machine, then:

vi /etc/hosts

Add the host name and ip address for each machine in the hosts file, for example:

192.168.109.128 master
192.168.109.129 slave1
192.168.109.130 slave2

After the modification is complete, test with the ping command:

ping master
ping slave1
ping slave2

If both ping s succeed, there is no problem with the configuration
3 Set up key-free login

Step 1: Use ssh-keygen on the local machine to generate a public-key private-key pair

ssh-keygen

Step 2: Copy the public key to the remote machine using ssh-copy-id

ssh-copy-id -i ~/.ssh/id_rsa.pub [User name@](mailto:hucom@192.168.xx.xx)192.168.x.xx

Step 3: Log on to the remote machine without entering a password

ssh username@192.168.x.x x x

If we can enter without entering a password using master@master, we have successfully configured it

4 Turn off SELinux

vi /etc/selinux/config

Modify SELinux=disabled

5 Turn off the firewall and set it to turn off after power on

service iptables stop

chkconfig iptables off

Query firewall status:

service iptables status

6. Install ntp service

yum -y install ntp

chkconfig ntpd on

7. Restart

reboot

8. Services that need to be checked after restart:

service ntpd status

/usr/sbin/sestatus -v

service iptables status

9. Copy cdh's software source to/etc/yum.repos.d/folder (all nodes)

cp cloudera-manager.repo /etc/yum.repos.d/

10. Clean up the cache and list available rpm packages. If the version does not match your own installation, you need to be aware (all nodes)

yum clean all 

yum list | grep cloudera

11. Enter the rpm folder and install the rpm files (all nodes)

yum install *.rpm

12. Copy three Parcel files to/opt/cloudera/parcel-repo (all nodes)

CDH-5.9.0-1.cdh5.9.0.p0.23-el6.parcel

CDH-5.9.0-1.cdh5.9.0.p0.23-el6.parcel.sha

manifest.json

13 Install cloudera-manager-installer.bin (primary node)

Give permission:

chmod +x ./cloudera-manager-installer.bin

Execution:

./cloudera-manager-installer.bin

Installation will prompt for the existence of a / etc/cloudera-scm-server/db.properties file, find the corresponding path to modify the file name db.properties.bak (make a backup), and execute again.

You can use this command to see how the server started:

tail -f /var/log/cloudera-scm-server/cloudera-scm-server.log

This indicates that the startup was successful:

Started Jetty server

7. After installing cloudera-manager-installer.bin, visit
http://master:7180
User/Password:

admin/admin

14 Install mysql database (only for primary node)

http://blog.csdn.net/jeffleo/article/details/53559712

Error at startup, try mysql_install_db and service mysqld restart

15 Modify database password

use mysql;

update user set password=password('root') where user='root';

update mysql.user set authentication_string=password('root') where user='root';

flush privileges;

16 Give permissions to the database:

create database hue DEFAULT CHARACTER SET utf8;

grant all on hue.* TO 'root'@'%' IDENTIFIED BY 'root';

flush privileges;

create database hive DEFAULT CHARACTER SET utf8;

grant all on hive.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;

flush privileges;

create database oozie DEFAULT CHARACTER SET utf8;

grant all on oozie.* TO 'root'@'%' IDENTIFIED BY 'root';

flush privileges;

17 Place the database driver for mysql in the / usr/share/java directory

Keywords: Database yum ssh iptables

Added by robman2100 on Wed, 15 May 2019 09:27:31 +0300