利用最新的CentOS7.5,hadoop3.1,spark2.3.2搭建spark集羣

1. 橋接模式,靜態ip上外網:
vi /etc/sysconfig/network-scripts/ifcfg-ens33linux

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=292b882b-ebd2-4d03-9ce5-402da7858f6d
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.2.124
NETMASK=255.255.255.0
GATEWAY=192.168.2.1
DNS1=127.207.160.106
DNS2=219.239.26.42網絡

或者用下面的DNS也是能夠的:
DNS1=8.8.8.8
DNS2=8.8.4.4ssh

systemctl restart networkoop

cat /etc/resolv.conf
看一下
nameserver 8.8.8.8
nameserver 8.8.4.4
2. 關閉防火牆
systemctl stop firewalld.service #中止firewall

systemctl disable firewalld.service #禁止firewall開機啓動spa

3. 禁止:
vi /etc/sysconfig/selinux
改爲disabled
SELINUX=enforcing
改爲:
SELINUX=disabled
4. 配置yum源
網絡yum源
yum install wget
cd /etc/yum.repos.d/
wget http://mirrors.aliyun.com/repo/Centos-7.repo
mv CentOS-Base.repo CentOS-Base.repo.bak
mv Centos-7.repo CentOs-Base.repo
yum clean all
yum makecache
yum updaterest

5. 免密碼登錄:
永久修改主機名:
在三臺機器上分別執行下列語句:注意三臺機器的用戶名不一樣
hostnamectl --static set-hostname spark1
ssh-keygen -t rsa
cd /root/.ssh
cp id_rsa.pub authorized_keys
而後從spakr1主機免密碼登錄spark2,spark3
ssh-copy-id -i spark2
ssh-copy-id -i spark3
同理在spark2執行下列語句:
ssh-copy-id -i spark1
ssh-copy-id -i spark3
同理在spark3執行下列語句:
ssh-copy-id -i spark1
ssh-copy-id -i spark2server

6. hadoop集羣搭建:ip

未完待續。hadoop

相關文章
相關標籤/搜索