微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

CentOS 7.5 安装 CDH6.3.2

#install OS centos 7.5
#install lsb net-tools package

yum install -y redhat-lsb net-tools

 

1. Configure hostnames

Configure each host in the cluster as follows to ensure that all members can communicate with each other:

Set the hostname to a unique name (not localhost).

sudo hostnamectl set-hostname foo-1.example.com

 



Edit /etc/hosts with the IP address and fully qualified domain name (FQDN) of each host in the cluster. You can add the unqualified name as well.

1.1.1.1  foo-1.example.com  foo-1
2.2.2.2  foo-2.example.com  foo-2
3.3.3.3  foo-3.example.com  foo-3
4.4.4.4  foo-4.example.com  foo-4

Edit /etc/sysconfig/network with the FQDN of this host only:

HOSTNAME=foo-1.example.com

 



Verify that each host consistently identifies to the network:

Run uname -a and check that the hostname matches the output of the hostname command.
Run /sbin/ifconfig and note the value of inet addr in the eth0 (or bond0) entry, for example:

eth0      Link encap:Ethernet  HWaddr 00:0C:29:A4:E8:97  
          inet addr:172.29.82.176  Bcast:172.29.87.255  Mask:255.255.248.0
...

Run host -v -t A $(hostname) and verify that the output matches the hostname command.

The IP address should be the same as reported by ifconfig for eth0 (or bond0):

Trying "foo-1.example.com"
...
;; ANSWER SECTION:
foo-1.example.com. 60 IN
A
172.29.82.176

2.disabling the Firewall

To disable the firewall on each host in your cluster, perform the following steps on each host.

For iptables, save the existing rule set:

sudo iptables-save > ~/firewall.rules

 

disable the firewall:

RHEL 7 compatible:

sudo systemctl disable firewalld
sudo systemctl stop firewalld

3.SELinux

#disable selinux

sed -i 's/SELINUX=enforcing/SELINUX=disabled/'  /etc/selinux/config
setenforce 0

 

#优化配置

sysctl vm.swappiness=10

echo 'vm.swappiness=10' >> /etc/sysctl.conf

echo never > /sys/kernel/mm/transparent_hugepage/defrag

echo never > /sys/kernel/mm/transparent_hugepage/enabled

echo 'echo never > /sys/kernel/mm/transparent_hugepage/defrag'  >> /etc/rc.local

echo 'echo never > /sys/kernel/mm/transparent_hugepage/enabled'  >> /etc/rc.local

chmod +x /etc/rc.d/rc.local

 


4.set ntp
yum install -y ntp

#Edit the /etc/ntp.conf file  master
server 120.25.108.11 iburst
server 182.92.12.11 iburst

#other server

vim /etc/ntp.conf

server 192.168.88.35
fudge 192.168.88.35 stratum 10


#check

ntpdate -u 120.25.108.11

sudo systemctl start ntpd
sudo systemctl enable ntpd
hwclock --systohc

 



# all server

systemctl stop chronyd.service
systemctl disable chronyd.service

 



5.Installing Cloudera Manager, CDH, and Managed Services on manager-server
#enable httpd

sudo yum -y install httpd

sudo systemctl enabled httpd
sudo systemctl start httpd

#download cm6

sudo mkdir -p /var/www/html/cloudera-repos/cm6

wget https://archive.cloudera.com/cm6/version/repo-as-tarball/cm6.3.1-redhat7.tar.gz

tar xvfz cm6.3.1-redhat7.tar.gz -C /var/www/html/cloudera-repos/cm6 --strip-components=1
sudo chmod -R ugo+rX /var/www/html/cloudera-repos/cm6

 

#download cdh6.3.2

sudo mkdir -p /var/www/html/cloudera-repos
sudo wget --recursive --no-parent --no-host-directories https://archive.cloudera.com/cdh6/6.3.2/redhat7/ -P /var/www/html/cloudera-repos

sudo wget --recursive --no-parent --no-host-directories https://archive.cloudera.com/gplextras6/6.3.2/redhat7/ -P /var/www/html/cloudera-repos

sudo chmod -R ugo+rX /var/www/html/cloudera-repos/cdh6
sudo chmod -R ugo+rX /var/www/html/cloudera-repos/gplextras6

 

sudo rpm --import https://archive.cloudera.com/cm6/6.3.1/redhat7/yum/RPM-GPG-KEY-cloudera

 

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。