CDH cluster installation

**

CDH installation steps

**
1, create a virtual machine
2, ping through the external network
3, editing hostname
4, disposed inside the hosts hostname ip and
5, will be put under jdk usr, and to Java
. 6, configure the environment variables
export PS1 = ' [\ @ U \ H pwd] $ '
Export the JAVA_HOME = / Home / XSS / Java / JDK
Export HADOOP_HOME is = / Home / XSS / Java / Hadoop
Export ZOOKEEPER_HOME = / Home / XSS / Java / ZooKeeper
Export the PATH = J A V A H O M E / b i n : JAVA_HOME/bin: HADOOP_HOME/bin: H A D O O P H O M E / s b i n : HADOOP_HOME/sbin: ZOOKEEPER_HOME / bin: $ the PATH
. 7, java permissions chown -R & lt set the root to the root: the root / usr / java /
. 8, the setenforce 0 off the SELINUX
. 9, turn off the firewall
10, installed third party relies
yum -y install chkconfig python bind psmisc libxslt zlib SQLite cyrus-utils-Plain-cyrus-SASL SASL-GSSAPI FUSE FUSE-libs RedHat lsb-
11, install mysql (document) to create several mysql database on that host
the create database Amon the DEFAULT CHARSET utf8 COLLATE
utf8_general_ci;
the create the DEFAULT the CHARSET UTF8 the COLLATE Hive Database utf8_general_ci;
Create Database Oozie the DEFAULT the CHARSET UTF8 the COLLATE utf8_general_ci;
Create Database Hue UTF8 the DEFAULT the CHARSET the COLLATE utf8_general_ci;

cdh cd to opt to extract the compressed discharge inside the two files (and then cloned)
Here Insert Picture Description
12, clone virtual machine
13, and memory allocation set time synchronization
14, the virtual machine ping the external network
/ etc / sysconfig / network- scripts
Vim ./ifcfg-ens33
15, adhesion between each Free
16, which is attached to view several ntp
RPM -qa | grep ntp
. 17, view the status of ntp three virtual machines simultaneously execute instructions
systemctl status ntpd.service
18 is, edit ntp file
/etc/ntp.conf

server 192.168.224.177 (main machine ip)
the restrict 192.168.224.177 nomodify notrap The NOQUERY

The first major virtual machine
Here Insert Picture Description
second virtual machine
Here Insert Picture Description
third virtual machine
Here Insert Picture Description
19 to start the ntp
systemctl Start ntpd.service
systemctl Status ntpd.service view status
Here Insert Picture Description

查看另外两台是否能同步时间
ntpdate -u 192.168.20.134
Here Insert Picture Description
永久开机启动ntp
systemctl enable ntpd.service
查看三台的机器之间的关系
ntpq -p
第一台
Here Insert Picture Description
第二台
Here Insert Picture Description
第三台
Here Insert Picture Description
重新启动虚拟机
重启完虚拟机之后再进入mysql
SHOW VARIABLES LIKE ‘validate_password%’; 查看密码格式
set global validate_password_policy=0;
set global validate_password_mixed_case_count=0;
set global validate_password_number_count=3;
set global validate_password_special_char_count=0;
set global validate_password_length=3;
查询当前user表内root的登录权限:
select host,user from mysql.user; (mysql点user)
修改权限为所有%:
update mysql.user set host = ‘%’ where user = ‘root’;
刷新缓存:
flush privileges;
退出mysql,再重新登录
三台同时执行 setenforce 0
三台同时执行 cd到opt下面(有两个有关clo的文件夹)
三台同时执行 创建cdh用户 : useradd --system --home=/opt/cm-5.12.1/run/cloudera-scm-server --no-create-home --shell=/bin/false --comment “Cloudera SCM User” cloudera-scm
三台同时执行 编辑 /opt/cm-5.12.1/etc/cloudera-scm-agent/config.ini
Here Insert Picture Description
cd /usr/share/java 将Here Insert Picture Description放进来
并进行改名 Here Insert Picture Description

cd 到opt下(在主要的那台机器上例cdh7)
执行 /opt/cm-5.12.1/share/cmf/schema/scm_prepare_database.sh mysql cm -hcdh7 -uroot -proot --scm-host cdh7 scm scm scm
报错:
Here Insert Picture Description
解决方法: 设置密码长度和格式
SHOW VARIABLES LIKE ‘validate_password%’; 查看密码格式
set global validate_password_policy=0;
set global validate_password_mixed_case_count=0;
set global validate_password_number_count=3;
set global validate_password_special_char_count=0;
set global validate_password_length=3;
查询当前user表内root的登录权限:
select host,user from mysql.user; (mysql点user)
修改权限为所有%:
update mysql.user set host = ‘%’ where user = ‘root’;
刷新缓存:
flush privileges;
退出mysql,再重新登录

Create a directory parcels after completing resolve errors
Here Insert Picture Description
permission to modify
Here Insert Picture Description
the results after the rights to modify:
Here Insert Picture Description
the installation cdh three files into / opt / cloudera / parcel-repo under

Start the server
/opt/cm-5.12.1/etc/init.d/cloudera-scm-server start
to start the client
/opt/cm-5.12.1/etc/init.d/cloudera-scm-agent start
viewing status
netstat -anp | grep 7180

Published 19 original articles · won praise 2 · Views 368

Guess you like

Origin blog.csdn.net/qq_44472134/article/details/103805199