A record--Offline deployment of Big Data Platform CDH Cluster
A record--Offline deployment of Big Data Platform CDH Cluster
Tags: Cloudera-Manager CDH Hadoop Deploy Cluster
Abstract: Deployment and Management of Hadoop clusters need tools, such as Cloudera Manager. In this article, I compare the tools briefly, and then record the step of deploying CDH cluster offline in detail. Finally, I expound the theory of 'handle delicately'.
Preface
The emergence of Big Data technology led by Apache Hadoop, makes small and medium-sized enterprises also have the ability to handle the storage and processing of big data. At present, there'r lots of Hadoop distributions, such as HUAWEI Distribution, Intel Distribution, Cloudera’s Distribution Including Apache Hadoop (CDH free), and Hortonworks Data Platform (HDP free), etc. All of these are based on the Hadoop Apache Community Edition.
The deployment and management of a Hadoop cluster which has tens or more nodes needs advanced tools. Apache Ambari from Hortonworks is this kind of tools, it provided an easy-to-use RESTfull web site to manage Hadoop. Cloudera also provided a similar tool, Cloudera Manager(CM) to configure, monitor and manage CDH clusters.
The main content of this paper is a record of building a CDH cluster. Special attention is required to choose Cloudera Manager version, which depends on Operating system, el7 isn't supported by Cloudera Manager at this moment. You should follow [the official document][1], otherwise the installation will run into a stone wall.
This paper is based on CentOS 6.5, 64-bit;Cloudera Manager 5.3.6;JDK 1.7.
Deploy CDH
Configure network (All nodes)
[root@cdh-server ~]# vi /etc/sysconfig/network #修改hostname:
NETWORKING=yes
HOSTNAME=cdh-server
[root@cdh-server ~]# vi /etc/hosts #修改ip与主机名的对应关系:
192.168.180.173 cdh-server
192.168.180.175 node175
[root@cdh-server ~]# service network restart #重启网络服务生效
Install JDK (All nodes)
#卸载OpenJDK
[root@cdh-server user1]# rpm -qa | grep java
[root@cdh-server user1]# rpm -e --nodeps java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64
[root@cdh-server user1]# rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64
[root@cdh-server user1]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64
#安装JDK
[root@cdh-server user1]# chmod a+x jdk-7u79-linux-x64.rpm
[root@cdh-server user1]# rpm -ivh jdk-7u79-linux-x64.rpm
[root@cdh-server user1]# echo "JAVA_HOME=/usr/java/jdk1.7.0_79/" >>
Install MySQL (Master)
[user1@cdh-server]$ cd /home/user1
[user1@cdh-server]$ tar -zxvf mysql-5.6.26-linux-glibc2.5-x86_64.tar.gz
[user1@cdh-server]$ mv mysql-5.6.26-linux-glibc2.5-x86_64 mysql-5.6.26
[user1@cdh-server]$ cd mysql-5.6.26/
[user1@cdh-server]$ vi support-files/my.cnf #新建文件
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[mysqld]
character-set-server=utf8
default-storage-engine=INNODB
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /home/user1/mysql-5.6.26/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /home/user1/mysql-5.6.26/data
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Initialize MySQL (Master)
[user1@cdh-server]$ ./scripts/mysql_install_db --defaults-file=/home/user1/mysql-5.6.26/support-files/my.cnf --basedir=/home/user1/mysql-5.6.26 --datadir=/home/user1/mysql-5.6.26/data --user=user1
[user1@cdh-server]$ ./bin/mysqld --defaults-file=/home/user1/mysql-5.6.26/support-files/my.cnf --basedir=/home/user1/mysql-5.6.26 --datadir=/home/user1/mysql-5.6.26/data > mysql.log 2>&1 &
[user1@cdh-server]$ ./bin/mysqladmin -u root password '123456'
[user1@cdh-server mysql-5.6.26]$ ./bin/mysql -uroot -p'123456'
#hive
mysql> create database hive DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
Query OK, 1 row affected (0.00 sec)
#Activity Monitor使用
mysql> create database amon DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
Query OK, 1 row affected (0.01 sec)
#Navigator Audit Server使用
mysql> create database audit DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
Query OK, 1 row affected (0.01 sec)
#Navigator Metadata Server
mysql> create database metadata DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
Query OK, 1 row affected (0.01 sec)
mysql> grant all privileges on *.* to 'root'@'localhost' identified by '123456' with grant option;
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on *.* to 'root'@'cdh-server' identified by '123456' with grant option;
Query OK, 0 rows affected (0.00 sec)
#this user scm is for cloudera manager
mysql> grant all privileges on *.* to 'scm'@'localhost' identified by 'scm' with grant option;
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on *.* to 'scm'@'cdh-server' identified by 'scm' with grant option;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
Deploy & Start CM-Server (Master)
[user1@cdh-server ~]$ tar -zxvf cloudera-manager-el6-cm5.3.6_x86_64.tar.gz
[user1@cdh-server ~]$ cp mysql-connector-java-5.1.33-bin.jar ./cm-5.3.6/share/cmf/lib/
[user1@cdh-server ~]$ su - root
[root@cdh-server ~]# cd /home/user1/
[root@cdh-server user1]# cp -rf cloudera /opt
[root@cdh-server user1]# mv CDH-5.3.6-1.cdh5.3.6.p0.11-el6.parcel /opt/cloudera/parcel-repo/CDH-5.3.6-1.cdh5.3.6.p0.11-el6.parcel
[root@cdh-server user1]# mv CDH-5.3.6-1.cdh5.3.6.p0.11-el6.parcel.sha /opt/cloudera/parcel-repo/CDH-5.3.6-1.cdh5.3.6.p0.11-el6.parcel.sha
[root@cdh-server user1]# mv manifest.json /opt/cloudera/parcel-repo/manifest.json
[root@cdh-server user1]# ./cm-5.3.6/share/cmf/schema/scm_prepare_database.sh mysql cm -hlocalhost:3306 -uroot -p123456 --scm-host localhost scm scm scm
[root@cdh-server user1]# ./cm-5.3.6/etc/init.d/cloudera-scm-server start
Starting cloudera-scm-server: [ OK ]
[root@cdh-server user1]# tail -f ./cm-5.3.6/log/cloudera-scm-server/cloudera-scm-server.log
Stop iptables (All nodes)
#停止iptables
[root@cdh-server user1]# service iptables stop
#通过浏览器访问验证
http://192.168.180.173:7180/
Deploy & Start CM-Agent (Slaves)
[root@cdh-server user1]# tar -zxvf cloudera-manager-el6-cm5.3.6_x86_64.tar.gz
[root@cdh-server user1]# vi cm-5.3.6/etc/cloudera-scm-agent/config.ini
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Hostname of the CM server.
#server_host=localhost
server_host=cdh-server
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[root@cdh-server user1]# useradd -G sys --home=/home/user1/cm-5.3.6/run/cloudera-scm-server --no-create-home --comment "Cloudera SCM User" cloudera-scm
[root@cdh-server user1]# useradd --comment "Cloudera SCM User" cloudera-scm #若上一步执行正确,则此步省略
[root@cdh-server user1]# echo 0 > /proc/sys/vm/swappiness
[root@cdh-server user1]# ./cm-5.3.6/etc/init.d/cloudera-scm-agent start
Starting cloudera-scm-agent: [ OK ]
[root@cdh-server user1]# tail -f ./cm-5.3.6/log/cloudera-scm-agent/cloudera-scm-agent.log
Configure CDH
Load Cloudera Manager http://192.168.180.173:7180/, then create a new Cluster names Cluster_user1,Start and configure Services.
#安装配置hive出错时,在hiveServer上:
[root@hive-server user1]# cp mysql-connector-java-5.1.33-bin.jar /opt/cloudera/parcels/CDH-5.3.6-1.cdh5.3.6.p0.11/lib/hive/lib/
#同理:use this jar for Navigator Audit Server and Navigator Metadata Server or Activity Server
[root@cdh-server user1]# cp mysql-connector-java-5.1.33-bin.jar /usr/share/java/mysql-connector-java.jar
Others
Stop CDH
- Stop Cloudera Management Service & Cluster_user1
- Stop Agent (Slaves)
[root@cdh-server user1]# ./cm-5.3.6/etc/init.d/cloudera-scm-agent stop
- Stop Server (Master)
[root@cdh-server user1]# ./cm-5.3.6/etc/init.d/cloudera-scm-server stop
Start CDH
- Start MySQL (Master)
[user1@cdh-server]$ ./bin/mysqld --defaults-file=/home/user1/mysql-5.6.26/support-files/my.cnf --basedir=/home/user1/mysql-5.6.26 --datadir=/home/user1/mysql-5.6.26/data > mysql.log 2>&1 &
- Start Agent (Slaves)
[root@cdh-server user1]# ./cm-5.3.6/etc/init.d/cloudera-scm-agent start
Starting cloudera-scm-agent: [ OK ]
[root@cdh-server user1]# tail -f ./cm-5.3.6/log/cloudera-scm-agent/cloudera-scm-agent.log
- Start Server (Master)
[root@cdh-server user1]# ./cm-5.3.6/etc/init.d/cloudera-scm-server start
Starting cloudera-scm-server: [ OK ]
[root@cdh-server user1]# tail -f ./cm-5.3.6/log/cloudera-scm-server/cloudera-scm-server.log
The theory of handle delicately
Handle delicately is a kind of feeling, but also a skill. When in seller's market, a company can make a profit while may needn't to handle delicately. However, if it wishes to pursue more, it will handle more delicately, such as pay more attention to detail, User Experience or others. When in buyer's market, the relation between supply and demand makes companies handle delicately to survive.
Handle delicately is not only the driving force pushing social to continually advance, but also the result of this advance. Today, lots of internet firms are in buyer's market, who has more users who will win the fight, delicately handling makes them at the forefront of social evolution and technological innovation.
Handle delicately doesn't only appear in companies, but also individuals, regions and countries, etc. The contry who handles more delicately, who is more developed. The company who pays more attention to details, who is more competitive. But, the one who handles more delicately doesn't mean it will make more profits, for various reasons.
Writer: @Angel Wang

aitanjupt@hotmail.com
2015 - 10 - 18
[1]: http://www.cloudera.com/content/www/en-us/documentation/enterprise/latest/topics/pcm_os.html
果然cnblogs不支持目录啊。不过代码格式还算漂亮。
此篇文章是本人另一英文文章的版本,中文版在此:朝花夕拾之--大数据平台CDH集群离线搭建 http://www.cnblogs.com/wgp13x/p/4990484.html ,多谢指教!
A record--Offline deployment of Big Data Platform CDH Cluster的更多相关文章
- 《Toward an SDN-Enabled Big Data Platform for Social TV Analysis》--2015--Han Hu
<面向应用于社会TV分析的应用了SDN的大数据平台> Abstract social TV analytics 是什么,就是说很多TV观众在微博.微信和推特等这些地方分享他们的观感时,然后 ...
- Tapdata 的 2.0 版 ,开源的 Live Data Platform 现已发布
https://www.bilibili.com/video/BV1tT411g7PA/?aid=470724972&cid=766317673&page=1 点击上方链接,一分钟快速 ...
- Putting Apache Kafka To Use: A Practical Guide to Building a Stream Data Platform-part 1
转自: http://www.confluent.io/blog/stream-data-platform-1/ These days you hear a lot about "strea ...
- Moving Computation is Cheaper than Moving Data
https://hadoop.apache.org/docs/r1.2.1/hdfs_design.html Introduction The Hadoop Distributed File Syst ...
- Linux command line exercises for NGS data processing
by Umer Zeeshan Ijaz The purpose of this tutorial is to introduce students to the frequently used to ...
- HDFS relaxes a few POSIX requirements to enable streaming access to file system data
https://hadoop.apache.org/docs/r2.7.2/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html Introduction [ ...
- Publishing and Deployment >> Publishing to IIS 翻译
Publishing to IIS 发布到IIS 2017/1/18 18 min to read Contributors Supported operating systems 支持的操作系统 ...
- goldengate for big data 12.3发布
主要新增特性:通用JDBC目标端:支持Amazon Redshift & IBM Netezza Oracle GoldenGate for Big Data 12.3现在支持通用的JDBC目 ...
- Principal Data Scientist
http://stackoverflow.com/jobs/124781/principal-data-scientist-concur-technologies-inc?med=clc&re ...
随机推荐
- 利用servlet3.0上传,纯原生上传,不依赖任何第三方包
tomcat7里面自带的servlet3.0.jar,支持很多新特性,例如,annotation配置servlet,上传,异步等等.... 如果你的tomcat版本低于7的话,单独在项目中引入serv ...
- 第 20 章 CSS3 前缀和 rem
学习要点: 1.CSS3 前缀 2.长度单位 rem 主讲教师:李炎恢 本章主要探讨 HTML5 中 CSS 在发展中实行标准化的一些问题,重点探讨 CSS3 中新属性前缀问题和新的单位 rem. 一 ...
- 泛函编程(35)-泛函Stream IO:IO处理过程-IO Process
IO处理可以说是计算机技术的核心.不是吗?使用计算机的目的就是希望它对输入数据进行运算后向我们输出计算结果.所谓Stream IO简单来说就是对一串按序相同类型的输入数据进行处理后输出计算结果.输入数 ...
- Windows Git中文文件名乱码
在Windows下使用git,安装包如下: https://git-for-windows.github.io/ 在使用git bash时git 默认中文文件名是 xx% 是因为 对0x80以上的字符 ...
- 通过angularjs的directive以及service来实现的列表页加载排序分页
前两篇:(列表页的动态条件搜索,我是如何做列表页的)分别介绍了我们是如何做后端业务系统数据展示类的列表页以及动态搜索的,那么还剩下最重要的一项:数据展示.数据展示一般包含三部分: 数据列头 数据行 分 ...
- 我最常用的几个Xcode快键键
⌘(command) ⏎(return) ⌥(option/alt) ⇧(shift) ⌃(control/ctrl) 快速打开文件 ⌘ + ⇧ + O(字母) 快速搜索文本 ⌘ + ⇧ + F 分栏 ...
- JavaScript寄生组合式继承分析
JavaScript寄生组合式继承特点: 避免了在子类prototype上创建不必要多余的属性,相比直接继承基类的实例效率要高. 是JavaScript 实现继承的最有效方式. <script& ...
- 基于jPlayer的三分屏制作
三分屏,这里的三分屏只是在一个播放器里同时播放三个视频,但是要求只有一个控制面板同时控制它们,要求它们共享一个时间轨道.这次只是简单的模拟了一下功能,并没有深入的研究. 首先,需要下载jPlayer, ...
- 自己动手打造WEB服务器 Windows + Apache + PHP + MySQL
XWAMP并不打算打造一个多功能,零配置,方便调试的工具.XWAMP只是把原程序简单的组合在一起,利用CMD命令控制,真正的绿色版,只为了多学习点Windows + Apache + PHP + My ...
- ie7下<a href="javascript:;">标签不反应
<a href="javascript:;" onclick="functionOne()"> 点击</a> <script&g ...