1. 程式人生 > >cloudera CDH5 Hadoop叢集全套安裝部署流程

cloudera CDH5 Hadoop叢集全套安裝部署流程

CDH install

[detail installing PDF]($ sudo ./cloudera-manager-installer.bin)

create virtual machine

eth0: hostonly

eth1: bridge

configure network and host

  • set ethX name and write down hardware address

    /etc/udev/rules.d/70-persistent-net.rules

  • /etc/sysconfig/network-scripts/ifcfg-eth0

    DEVICE=eth0
    HWADDR=08
    :00:27:0F:B6:C1
    TYPE=Ethernet UUID=be125edc-4dda-4478-964b-285409fdc735 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static IPADDR=192.168.56.2

    /etc/sysconfig/network-scripts/ifcfg-eth1

    DEVICE=eth1
    HWADDR=08:00:27:9D:D9:E6
    TYPE=Ethernet
    UUID=be125edc-4dda-4478-964b-285409fdc735
    ONBOOT=yes
    NM_CONTROLLED=yes
    BOOTPROTO=dhcp
  • set host name and gateway

$ vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=master
#GATEWAY=192.168.1.1
  • hosts
$vi /etc/hosts 
192.168.56.2 master
192.168.56.3 slave1

install perl

yum install perl

create user

sudo useradd -m cloudera
passwd cloudera

add to sudoer

visudo

無密碼sudo許可權

cloudera ALL=(root)NOPASSWD:ALL

trun off firewalls

  • disable the selinux at all nodes
vi /etc/selinux/config
SELINUX=disabled #carfore! not SELINUXTYPE!!!
  • close iptables firewall
chkconfig iptables off
chkconfig ip6tables off
service iptables stop

Time

date #view the time
#set all node's time zone to shanghai
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
#update time
yum install ntp
ntpdate pool.ntp.org
#update time manually
date -s 02/25/17
date -s 19:21:00
hwclock -w #white time to BIOS
chkconfig ntpd on

install JDK(alternative)

remove open jdk

java -version
rpm -qa | grep java

rpm -e --nodeps java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64
rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64
rpm -e --nodeps java-1.6.0-openjdk-devel-1.6.0.0-1.66.1.13.0.el6.x86_64

install JDK

CDH5 -> jdk-7u55-linux-x64

jdk7

jdk8

mkdir /usr/java/jdk-version
cd /usr/java/jdk-version
tar zxvf jdk.1.7.0_nn.tar.gz
ln -s /usr/java/jdk.1.7.0_nn /usr/java/default
#or rpm -ivh jdk-7u55-linux-x64.rpm

vi /home/cloudera/.bash_profile

export JAVA_HOME=/usr/java/default
export CLASSPATH=.:$JAVA_HOME/lib:$CLASSPATH  
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin  
source  /home/hadoop/.bash_profile
rm /usr/java/default.tar.gz
java -version

Ubuntu:

sudo apt-get -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold -y install oracle-j2sdk1.7

這步如果跳過的話之後在安裝的時候就勾上要裝JDK

clone virtual machine

clone and configure:

network configure

  1. delete /etc/udev/rules.d/70-persistent-net.rules and reboot, or delete primary eth0 & eth1 change eth3 &eth4 to eth0 & eth1

    or you can
    remove modprobe: modprobe -r e1000
    reload modprobe: modprobe e1000

  2. change name and write down hardware address in

    /etc/udev/rules.d/70-persistent-net.rules

  3. change DEVICE, HWADDR, IPADDR in

    /etc/sysconfig/network-scripts/ifcfg-eth0

    restart network: service network restart

  4. change host name:

    in /etc/sysconfig/network

    HOSTNAME=

  5. write host file

    /etc/hosts

generate ssh key

cd /root/.ssh
ssh-keygen

then send the id_rsa.pub from all nodes(including master) to master

ssh-copy-id master
#or send manually
cat ~/.ssh/id_rsa.pub | ssh hadoop@CDHNode1 'cat >> ~/.ssh/authorized_keys'

finally sent this authorized_keys from master to all of the nodes

scp -r authorized_keys [email protected]
...

理解rsa認證:

我有一對玉佩,我送給你其中一個玉佩,我自己拿著另一個玉佩,等我下次到你家的時候我給你家的保安看我這個玉佩就知道是我來了而不是小偷。

mysql

hadoop 本身需要資料庫來維護,選擇mysql來做這個事

yum install -y mysql-server mysql mysql-devel
#/usr/bin/mysqladmin -u root 'old_password' 'new-password'
#SET PASSWORD = Password('password');
chkconfig mysqld on
service mysqld start
cp  /usr/my.cnf  /etc/my.cnf 

vi /etc/my.cnf

#bind-address           = 127.0.0.1
max_connections  = 400 #(db_number*100+50)
#hive
create database hive DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
grant all privileges on hive.* to 'hive'@'master' identified by 'qwerqwer' with grant option;

#activity monitor
create database amon DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
grant all privileges on amon.* to 'amon'@'master' identified by 'qwerqwer' with grant option;

#Hue
create database hue DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
grant all privileges on hue.* to 'hue'@'master' identified by 'qwerqwer' with grant option;

#Oozie Server
create database oozie_server DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
grant all privileges on oozie_server.* to 'oozie_server'@'master' identified by 'qwerqwer' with grant option;

#smon
create database smon DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
grant all privileges on smon.* to 'smon'@'master' identified by 'qwerqwer' with grant option;

#hmon
create database hmon DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
grant all privileges on hmon.* to 'hmon'@'master' identified by 'qwerqwer' with grant option;

#hmon
create database hmon DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
grant all privileges on hmon.* to 'hmon'@'master' identified by 'qwerqwer' with grant option;
#root
grant all privileges on *.* to 'root'@'master' identified by 'qwerqwer' with grant option;
grant SELECT on *.* to 'root'@'%' identified by 'qwerqwer' with grant option;

#show grants
show grants;

JDBC

yum install mysql-connector-java -y

download cloudera maneger

$ wget http://archive.cloudera.com/cm5/installer/latest/cloudera-manager-installer.bin
$ chmod u+x cloudera-manager-installer.bin
$ sudo ./cloudera-manager-installer.bin
#and next next ...

or

#prepare
su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
#centos
wget https://archive.cloudera.com/cm5/redhat/5/x86_64/cm/cloudera-manager.repo
sudo cp cloudera-manager.repo /etc/yum.repos.d/

#ubuntu
wget https://archive.cloudera.com/cm5/debian/squeeze/amd64/cm/cloudera.list
sudo cp cloudera-manager.repo /etc/apt/sources.list.d/ 
sudo apt-get update

do the next step in browser

open http://192.168.your.ip:7180 in browser
default account and password is admin, admin

specify hosts for your CDH cluster installation

Add your hostnames as defined in your /etc/hosts file of all servers.

master slave1 slave2

provide SSH login credentials

upload id_rsa.pub from base server

or

use same username password
on all the nodes

choose the services that you want to start on your cluster

CDH5

All Service
choose mysql as the database
Host name: master
Database type: mysql
Database name:
use name:
password:

start and stop

sudo service cloudera-scm-server start
sudo service cloudera-scm-server stop
sudo service cloudera-scm-server restart
sudo service cloudera-scm-agent start
sudo service cloudera-scm-agent stop
sudo service cloudera-scm-agent restart
sudo service cloudera-scm-agent status

add to startup

in master

chkconfig --add cloudera-scm-server
chkconfig cloudera-scm-server on
chkconfig --list cloudera-scm-server
chkconfig httpd  on

in slaves

chkconfig --add cloudera-scm-agent
chkconfig cloudera-scm-agent on
chkconfig --list cloudera-scm-agent

test installing

Running a MapReduce Job

Parcel installation

sudo -u hdfs hadoop jar /opt/cloudera/parcels/CDH/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar pi 10 100

Package installation

 sudo -u hdfs hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar pi 10 100

View the results of running the job by selecting Activities > MAPREDUCE-1 Jobs from the top navigation bar:

相關推薦

cloudera CDH5 Hadoop叢集全套安裝部署流程

CDH install [detail installing PDF]($ sudo ./cloudera-manager-installer.bin) create virtual machine eth0: hostonly eth1: br

Ganglia監控Hadoop叢集安裝部署

一、 安裝環境 Ubuntu server 12.04 安裝gmetad的機器:192.168.52.105安裝gmond的機器:192.168.52.31,192.168.52.32,192.168.52.33,192.168.52.34,192.168.52.35,

webacula安裝部署流程

bacula webacula 以webacula-7.0.0為例 建議安裝在os6上下載webcaulahttp://webacula.sourceforge.net/#downloads安裝和配置安裝要求1、Bacula 3.0 或以上版本2、系統安裝有 Mysql,PostgreSQL 或 SQ

OEMCC 13.2 叢集版本安裝部署

之前測試部署過OEMCC 13.2單機,具體可參考之前隨筆: OEMCC 13.2 安裝部署 當時環境:兩臺主機,系統RHEL 6.5,分別部署OMS和OMR: OMS,也就是OEMCC的服務端 IP:192.168.1.88 記憶體:12G+ 硬碟:100G+ OMR,也就是OEM底層的資料庫

Hadoop叢集配置安裝,詳細步驟及講解

**涉及linux命令一定要注意大小寫和空格,linux系統對此敏感** **hadoop叢集的安裝一定要靜下心一步一步來** 1、關閉防火牆(防火牆最好關閉,不然以後linux操作會有很多麻煩) 1)輸入命令: vi etc/selinux/config 其中改為 SELINU

Hadoop叢集安裝與配置

一.準備Linux環境(虛擬機器)   1.先將虛擬機器的網路模式選為NAT   2.修改主機名   vi /etc/sysconfig/network       NETWORKING=yes HOSTNAME=hdp-node-01   

Hadoop 3.0 安裝部署

最近在虛擬機器上新裝了一個單節點的Hadoop,用於日常測試。 下載二進位制包,解壓。官網 http://hadoop.apache.org 1、 安裝ssh,否則Pseudo-Distributed Operation 模式下啟動hdfs會失敗。 sudo ap

本地搭建hadoop叢集--hive安裝2.3.3

2.3.3和2以下的安裝區別就是 如下波浪線 需要在執行hive之前 進入 bin目錄 schematool -dbType derby -initSchema 這裡可以用mysql 。derby都行。 具體支援哪些jdbc 作為元資料底層 這個就不曉得了。目前用的最多的是 mysq

Hadoop叢集jdk安裝(Linux)

:在完全分佈模式的整合平臺中進行jdk的安裝 :實驗環境 ①:個人PC機1臺,裝有VMware workstations12Pro。 ②:虛擬機器中安裝5臺CentOS 7作業系統, ③:每臺主機記憶體2g以上,磁碟50g。 ④:主機之間有效的網路連線。

swagger安裝部署流程

在網上搜索很多swagger安裝流程資料,最後總結一下。 需要下載 node.js、swagger-editor、swagger-ui,可以搜尋下載。 a 安裝node.js 1.下載並且安裝node.js b. 安裝swagger-editor 1. 下載專案https://github.c

完全分散式Hadoop叢集安裝搭建和配置(4節點)

Hadoop版本:hadoop-2.5.1-x64.tar.gz 學習參考了給力星http://www.powerxing.com/install-hadoop-cluster/的兩個節點的hadoo

kubernetes 叢集安裝部署

kubernetes 叢集的安裝部署 本文來自我的github pages部落格http://galengao.github.io/ 即www.gaohuirong.cn 摘要: 首先kubernetes得官方文件我自己看著很亂,資訊很少

Hadoop叢集安裝(CDH的方式)

因為資源有限,這裡準備了三臺機器CentOS6.4-x64 192.168.43.121 cdh-bigdata-01(主節點cm-server 從節點cm-agent) 192.168.43.122 cdh-bigdata-02(從節點cm-agent) 192.168.43.123 cd

Centos 7.0 下hadoop叢集模式安裝(以3個節點為例,master,slave1,slave2)超詳細

一、目標: 構建由3臺PC機構成的hadoop環境,安裝完成後使用HDFS、Mapreduce、Hbase等完成一些小例子。 二、硬體需求: 3臺Centos 7.0 系統PC機,每臺PC機4G記憶

zookeeper+kafka叢集安裝部署

準備工作 上傳 zookeeper-3.4.6.tar.gz、scala-2.11.4.tgz、kafka_2.9.2-0.8.1.1.tgz、slf4j-1.7.6.zip 至/usr/local目錄 zookeeper叢集搭建 解壓zookeeper安裝包 # tar -zxvf zookeepe

Apache HAWQ叢集安裝部署

最近Pivotal公司釋出了Apache HAWQ的企業版HDB 2.0,因功能強大,效能出色,很多人已經迫不及待想要安裝來玩玩了。今天我們就來聊聊怎麼部署強大的HAWQ 2.0吧。 企業版的HAWQ你花了錢基本就可以躺著等它安裝好了,所以這裡先不討論,我們來講講社群

Docker叢集管理工具-Kubernetes1.10.6(k8s)四節點叢集使用kubeadm部署流程(一)

一:Kubernetes介紹 1: Kubernetes是什麼 Kubernetes是Google開源的容器叢集管理系統,是基於Docker構建一個容器的排程服務,提供資源排程、均衡容災、服務註冊、動態擴縮容等功能套件。 Kubernetes提供應用部

hadoop叢集-linux安裝配置-基礎配置(二)

多臺虛擬機器–標配 內容 linux 基礎配置 多臺虛擬機器標配 hadoop安裝配置+叢集 zookeeper高可用配置 1.多臺虛擬機器–標配 1.1. 建立虛擬機器 趕緊要看

詳細虛擬機器hadoop叢集環境安裝步驟

要想深入的學習資料分析技術,首要的任務是必須要將hadoop叢集環境搭建起來,可以將hadoop簡化地想象成一個小軟體,通過在各個物理節點上安裝這個小軟體,然後將其執行起來,就是一個hadoop分散式叢集了。 說來簡單,但是應該怎麼做呢?不急,本文的主要目的就是讓新手看了之

Hadoop叢集安裝安裝hadoop叢集

1 解壓hadoop並配置相關環境變數 以hadoop使用者名稱解壓hadoop壓縮檔案 JAVA_HOME=/usr/java/jdk1.8.0_144 JRE_HOME=/usr/java/jdk1.8.0_144/jre HADOOP_HOME=/home/ha