Install hadoop with Cloudera Manager 5.2 on CentOS 6.5

分区考虑,不要使用LVM
root -- >40G

var -- >100G

swap -- 2倍系统内存

RAM -- >8GB

Master node:
RAID 10, dual Ethernet cards, dual power supplies, etc.

Slave node:
1. RAID is not necessary

2. HDFS分区, not using LVM
/etc/fstab -- ext3    defaults,noatime
挂载到/data/N/dfs/dn, for N=0,1,2... (one partition per disk)

Cloudera CDH repository:

http://archive.cloudera.com/cdh5
http://archive-primary.cloudera.com/cm5
http://archive.cloudera.com/gplextras5

Cloudera parcel repository:

http://archive.cloudera.com/cdh5/parcels/latest
http://archive.cloudera.com/gplextras5/parcels/latest
http://archive.cloudera.com/impala/parcels/latest/
http://archive.cloudera.com/sqoop-connectors/parcels/latest/
http://archive.cloudera.com/accumulo-c5/parcels/latest/

on cloudera manager and all cluster nodes:

at least 3 Servers for ZooKeeper, 3 DataNodes for HDFS.

1.disable selinux and iptables
service iptables stop
chkconfig iptables off; chkconfig ip6tables off

setenforce 0
vi /etc/sysconfig/selinux
SELINUX=disabled

2. disable ipv6
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
sysctl -p

3. vi /etc/hosts to add all hosts FQDN, like below:
192.168.1.19    cm5.local cm5
192.168.1.20    master1.local master1  # HDFS NameNode
192.168.1.21    master2.local master2  # YARN ResourceManager
192.168.1.22    slave1.local slave1
192.168.1.23    slave2.local slave2

vi /etc/sysconfig/network to set FQDN

yum -y install ntp

service ntpd start; chkconfig ntpd on

cat << EOF > /etc/yum.repos.d/iso.repo
[iso]
name=iso
baseurl=http://mirrors.aliyun.com/centos/6.5/os/x86_64
enable=1
gpgcheck=0
EOF

yum -y install openssh-clients

echo "vm.swappiness = 0" >> /etc/sysctl.conf

sysctl -p

vi /etc/security/limits.conf
*                soft    nofile          32000
*                hard    nofile          32000
*                soft    nproc           unlimited
*                hard    nproc           unlimited
*                soft    memlock         unlimited
*                hard    memlock         unlimited

reboot to take effect

4. On cloudera manager, we will install mysql 5.6 and apache
rpm -e --nodeps mysql-libs
yum -y install libaio perl
rpm -ivh MySQL-shared-compat-5.6.20-1.el6.x86_64.rpm
rpm -ivh MySQL-shared-5.6.20-1.el6.x86_64.rpm
rpm -ivh MySQL-server-5.6.20-1.el6.x86_64.rpm
rpm -ivh MySQL-client-5.6.20-1.el6.x86_64.rpm

vi /etc/my.cnf
[mysqld]
transaction-isolation=READ-COMMITTED
symbolic-links=0

key_buffer = 16M
key_buffer_size = 32M
max_allowed_packet = 32M
thread_stack = 256K
thread_cache_size = 64
query_cache_limit = 8M
query_cache_size = 64M
query_cache_type = 1
max_connections = 550

log-bin=mysql-bin
binlog_format=mixed
expire_logs_days=10
max_binlog_size=100M

read_buffer_size = 2M
read_rnd_buffer_size = 16M
sort_buffer_size = 8M
join_buffer_size = 8M

# InnoDB settings
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 64M
innodb_buffer_pool_size = 4G
innodb_thread_concurrency = 8
innodb_flush_method = O_DIRECT
innodb_log_file_size = 512M

service mysql start; chkconfig mysql on
cat ~/.mysql_secret
mysqladmin -uroot -p‘oldpassword‘ password newpassword
mysql_secure_installation

Install mysql jdbc connector:

tar zxf mysql-connector-java-5.1.33.tar.gz
mkdir /usr/share/java
cp mysql-connector-java-5.1.33/mysql-connector-java-5.1.33-bin.jar /usr/share/java/mysql-connector-java.jar

mysql -u root -p

# for Activity Monitor
create database amon DEFAULT CHARACTER SET utf8;
grant all on amon.* TO ‘amon‘@‘%‘ IDENTIFIED BY ‘amon‘;
grant all on amon.* TO ‘amon‘@‘localhost‘ IDENTIFIED BY ‘amon‘;

# for Reports Manager
create database rman DEFAULT CHARACTER SET utf8;
grant all on rman.* TO ‘rman‘@‘%‘ IDENTIFIED BY ‘rman‘;
grant all on rman.* TO ‘rman‘@‘localhost‘ IDENTIFIED BY ‘rman‘;

# for Hive Metastore Server
create database metastore DEFAULT CHARACTER SET utf8;
grant all on metastore.* TO ‘hive‘@‘%‘ IDENTIFIED BY ‘hive‘;
grant all on metastore.* TO ‘hive‘@‘localhost‘ IDENTIFIED BY ‘hive‘;

# for Sentry Server
create database sentry DEFAULT CHARACTER SET utf8;
grant all on sentry.* TO ‘sentry‘@‘%‘ IDENTIFIED BY ‘sentry‘;
grant all on sentry.* TO ‘sentry‘@‘localhost‘ IDENTIFIED BY ‘sentry‘;

# for Cloudera Navigator Audit Server
create database nav DEFAULT CHARACTER SET utf8;
grant all on nav.* TO ‘nav‘@‘%‘ IDENTIFIED BY ‘nav‘;
grant all on nav.* TO ‘nav‘@‘localhost‘ IDENTIFIED BY ‘nav‘;

flush privileges;

yum -y install httpd

service httpd start; chkconfig httpd on

mkdir /var/www/html/cm520

mkdir /var/www/html/cdh520

mount -o loop cm520.iso /var/www/html/cm520

mount -o loop cdh520.iso /var/www/html/cdh520

cat << EOF > /etc/yum.repos.d/cm520.repo
[cm520]
name=cm520
baseurl=http://192.168.1.19/cm520
enable=1
gpgcheck=0
EOF

yum -y install oracle-j2sdk1.7 cloudera-manager-daemons cloudera-manager-server

ln -s  /usr/java/jdk1.7.0_67-cloudera /usr/java/default
echo ‘export JAVA_HOME=/usr/java/default‘ >> /etc/profile
echo ‘export PATH=$JAVA_HOME/bin:$PATH‘ >> /etc/profile
source /etc/profile

/usr/share/cmf/schema/scm_prepare_database.sh mysql -uroot -ppassword cm5 cm5 cm5

service cloudera-scm-server start

wait several minutes, then open http://192.168.1.19:7180

username/password: admin/admin

reboot to confirm it‘s ok, double check cloudera manager web access

if it‘s ok

yum -y install cloudera-manager-agent
service cloudera-scm-agent start

5. on all cluster nodes

cat << EOF > /etc/yum.repos.d/cm520.repo
[cm520]
name=cm520
baseurl=http://192.168.1.19/cm520
enable=1
gpgcheck=0
EOF

cat << EOF > /etc/yum.repos.d/cdh520.repo
[cdh520]
name=cdh520
baseurl=http://192.168.1.19/cdh520
enable=1
gpgcheck=0
EOF

yum -y install oracle-j2sdk1.7 cloudera-manager-agent cloudera-manager-daemons

ln -s  /usr/java/jdk1.7.0_67-cloudera /usr/java/default
echo ‘export JAVA_HOME=/usr/java/default‘ >> /etc/profile
echo ‘export PATH=$JAVA_HOME/bin:$PATH‘ >> /etc/profile
source /etc/profile

vi /etc/cloudera-scm-agent/config.ini
server_host=cm5.local
server_port=7182

service cloudera-scm-agent start

yum -y install avro-tools crunch flume-ng hadoop-hdfs-fuse
hadoop-hdfs-nfs3 hadoop-httpfs hbase-solr hive-hbase hive-webhcat
hue-beeswax hue-hbase hue-impala hue-pig hue-plugins hue-rdbms
hue-search hue-spark hue-sqoop hue-zookeeper impala impala-shell kite
llama mahout oozie pig pig-udf-datafu search sentry solr-mapreduce
spark-python sqoop sqoop2 whirr

install cloudera management service on cm5.local

now add new cluster

ok

时间: 2024-11-10 07:59:16

Install hadoop with Cloudera Manager 5.2 on CentOS 6.5的相关文章

Install hadoop with Cloudera Manager 5 on CentOS 6.5

分区考虑,不要使用LVMroot -- > 20Gswap -- 2倍系统内存 RAM -- >4GB Master node:RAID 10, dual Ethernet cards, dual power supplies, etc. Slave node:1. RAID is not necessary 2. HDFS分区, not using LVM/etc/fstab -- ext3    defaults,noatime挂载到/data/N, for N=0,1,2... (one

Cloudera Manager 5 和 CDH5 本地(离线)安装指南(Hadoop集群搭建)

系统环境 4台联想R510服务器,其中master节点4核心.8GB,其它节点双核心.4GB. 网卡:100M. 共有硬盘6TB. 网络环境内网. Centos6.5 x64(安装系统时尽量把开发包安装齐全,另master节点需要Mysql可以在安装系统时勾选). 准备工作 卸载系统自带OPEN-JDK(所有节点) 安装好的Centos系统有时会自动安装OpenJdk,用命令java -version查看: 1 java version "1.6.0" 2 OpenJDK Runtim

Centos6.5安装配置Cloudera Manager CDH5.6.0 Hadoop

环境规划操作系统版本:CentOS-6.5-x86_64-minimal.iso 192.168.253.241    master   虚拟机4G内存192.168.253.242    slave1    虚拟机2G内存192.168.253.243    slave2    虚拟机2G内存 一.环境初始化1.修改主机名(每台机器都执行) 192.168.253.241    master 192.168.253.242    slave1 192.168.253.243    slave2

Hadoop 离线安装 CDH5.1 第二章:cloudera manager与agent 安装

新建cloudera-scm用户 (做了分行,这个是一条linux命令,) [[email protected] cloudera-manager-5.1.0]$ sudo useradd --system  --home=/opt/cloudera-manager-5.1.0/run/cloudera-scm-server  --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm 改

Enable Kerberos secured Hadoop cluster with Cloudera Manager

I created an secured Hadoop cluster for P&G with cloudera manager, and this document is to record how to enable kerberos secured cluster with cloudera manager. Firstly we should have a cluster that contains kerberos KDC and kerberos clients 1. Instal

基于Cloudera Manager 5和CDH5(版本5.3.3)的Hadoop集群安装

一.Cloudera Manager/CDH5 1.关于cloudera manager和CDH是什么,这里不做详细介绍了.有官网和百科介绍. 附上官网地址:cloudera manager 2.官网的安装指南 官方文档提供了三种安装方式:在线自动安装/手动安装包安装/手动使用cloudera manager管理安装 此处使用第三种方式安装hadoop集群. 二.环境规划 1.系统:CentOS 6.4_x86 master:4G内存,硬盘尽量大容量 slave1:2G内存,硬盘尽量大容量 sl

离线部署 Cloudera Manager 5 和 CDH 5.12.1 及使用 CDH 部署 Hadoop 集群服务

Cloudera Manager Cloudera Manager 分为两个部分:CDH和CM. CDH是Cloudera Distribution Hadoop的简称,顾名思义,就是cloudera公司发布的Hadoop版本,封装了Apache Hadoop,提供Hadoop所有的服务,包括HDFS,YARN,MapReduce以及各种相关的components:HBase, Hive, ZooKeeper,Kafka等. CM是cloudera manager的简称,是CDH的管理平台,主要

【Hadoop】3、Hadoop安装之cloudera manager(1)

1.网络配置 1.1  为每台机器配置固定IP 安装完cm后尽量不要修改IP,  cm在安装时会绑定IP, 修改IP会造成cm不能正确识别主机. 1.2 设置开机自动连接 图形界面 或修改配置文件 vi  /etc/sysconfig/network-scripts/ifcfg-eth0 将ONBOOT由no改为yes ifcfg-eth0对应的网卡名称 2. 修改主机名(hostname) 2.1 用root用户进入,打开终端: #  vi /etc/sysconfig/network 2.2

[How to]Cloudera manager 离线安装手册

1.简介 本文介绍在离线环境下安装Cloudera manager和简单使用方法 2.环境 OS:CentOS 6.7 Cloudera manager版本:5.5.1 CDH版本:5.4.2 安装用户:root 资源: 10.211.55.16 xufeng-1 CM主节点,CM代理节点 10.211.55.17 xufeng-2 CM代理节点 10.211.55.18 xufeng-3 CM代理节点 3.介质准备 由于是要求在离线环境下进行安装,所以我们必须是先下载好安装所需要的所有介质.