CDH4.0安装及配置(一)

Cloudera推出了最新版的CDH4.0

在安装CDH4.0之前,首先要进行一些系统准备工作,下面是具体需要做的事情。

1. Support OS for CDH4.0.

2. Install JDK.

=========================安装前准备实践 开始 ===============================

1. 准备操作系统:由于日后希望使用Crowbar来自动安装部署CDH4.0和Cloudera Manager所以选择了 Centos6.2 64bit Server的系统,根据Centos6.2的安装步骤顺利完成安装。

2. 安装好操作系统之后,首先要配置网络,设置为静态IP地址,设置GW和DNS,便于系统设置的稳定。

2.1 修改对应网卡的IP地址的配置文件
# vi /etc/sysconfig/network-scripts/ifcfg-eth0

#Set Static IP address
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Ethernet

BOOTPROTO=static
IPADDR=192.168.26.140
NETMASK=255.255.255.0
NETWORK=192.168.26.0
BROADCAST=192.168.26.255

DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
HWADDR=00:0C:29:7A:CE:59
PEERDNS=yes
PEERROUTES=yes

2.2 CentOS 修改网关
修改对应网卡的网关的配置文件
[root@centos]# vi /etc/sysconfig/network

修改以下内容
NETWORKING=yes(表示系统是否使用网络,一般设置为yes。如果设为no,则不能使用网络,而且很多系统服务程序将无法启动)
HOSTNAME=CDH4.0-Node-1(设置本机的主机名,这里设置的主机名要和/etc/hosts中设置的主机名对应)
GATEWAY=192.168.26.2(设置本机连接的网关的IP地址。例如,网关为10.0.0.2)

2.3 CentOS 修改DNS服务器
# vi /etc/resolv.conf
修改以下内容
# Generated by NetworkManager
domain localdomain
search localdomain
nameserver 192.168.26.2 

2.4 CentOS 网络配置的3个关键文件

[root@CDH4 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
[root@CDH4 ~]# vi /etc/sysconfig/network
[root@CDH4 ~]# vi /etc/resolv.conf

2.5 CentOS 网络配置验证:

网关通畅:

[root@CDH4 ~]# ping 192.168.26.2
PING 192.168.26.2 (192.168.26.2) 56(84) bytes of data.
64 bytes from 192.168.26.2: icmp_seq=1 ttl=128 time=1.57 ms
64 bytes from 192.168.26.2: icmp_seq=2 ttl=128 time=0.238 ms
^C
--- 192.168.26.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1182ms
rtt min/avg/max/mdev = 0.238/0.907/1.577/0.670 ms

出口通畅:

[root@CDH4 ~]# ping 192.168.88.1
PING 192.168.88.1 (192.168.88.1) 56(84) bytes of data.
64 bytes from 192.168.88.1: icmp_seq=1 ttl=128 time=2.64 ms
64 bytes from 192.168.88.1: icmp_seq=2 ttl=128 time=3.20 ms
^C
--- 192.168.88.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1630ms
rtt min/avg/max/mdev = 2.644/2.924/3.204/0.280 ms

公网通畅:

[root@CDH4 ~]# ping www.baidu.com
PING www.a.shifen.com (61.135.169.125) 56(84) bytes of data.
64 bytes from 61.135.169.125: icmp_seq=1 ttl=128 time=33.9 ms
64 bytes from 61.135.169.125: icmp_seq=2 ttl=128 time=33.3 ms

3. 然后更新源,然后升级操作系统到最新。

关于源的速度,国内比较好的源有“USTC中国科技大学”和“网易 mirrors.163.com”

centos更新源(网易 163.com)

# 备份
# mv /etc/yum.repos.d/CentOS-Base.repo{,.bak}
# 修改
# vi /etc/yum.repos.d/CentOS-Base.repo

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6


# yum clean all
# yum makecache     #将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度
# yum install vim*    #测试域名是否可用

# yum update #更新系统

具体yum安装见官方文档https://ccp.cloudera.com/display/CDH4DOC/CDH4+Installation

你可能感兴趣的:(cdh,CDH4.0)