机器准备(以4台机器进行说明)
- 安装操作系统,笔者以Centos7.8进行测试
- 笔者采用UltraISO进行系统安装,采用mini模式。
- 接下来进行了基本配置,包括ip,网络,时间同步等等
下面为其中一些操作:
sodu vi /etc/hosts
#############
xxx.xxx.xx.xx1 mycluster.master
xxx.xxx.xx.xx2 mycluster.slave1
xxx.xxx.xx.xx3 mycluster.slave2
xxx.xxx.xx.xx4 mycluster.slave3
##############
firewall-cmd –state
systemctl status firewalld
systemctl stop firewalld
systemctl disable firewalld
##############
vi /etc/selinux/config
SELINUX=disabled
###############
vi /etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=static
ONBOOT=yes
IPADDR=xxx.xxx.xx.xxx
GATEWAY=YYY.YYY.YY.YYY
NETMASK=255.255.255.0
################
vi /etc/resolv.conf
nameserver 114.114.114.114
nameserver 223.5.5.5
################
nmcli c reload
nmcli networking off
nmcli networking on
################
yum –y install ntp
yum install httpd
systemctl status httpd
systemctl start httpd
chkconfig httpd on
################
ssh-keygen
ssh-copy-id root@mycluster.master
scp authorized_keys mycluster.slave1:/root/.ssh/
scp authorized_keys mycluster.slave2:/root/.ssh/
scp authorized_keys mycluster.slave3:/root/.ssh/
#################
vi /etc/ntp.conf
#添加配置
server ntp.aliyun.com
################
systemctl enable ntpd
systemctl restart ntpd
ntpdc –c loopinfo(查看与时间同步服务器的时间偏差)
ntpq –p(查看当前同步的时间服务器)
ntpstat(查看状态)
#(注:要生效可能要等差不多一分钟)
#################
后序的安装过程请参照下面这篇博文,写的比较详细
CDH6.3.2搭建详细步骤
一些报错
- 7180页面打不开
请执行命令查看报错详情 service --status-all - monitor报错:
vi /etc/security/limits.conf
###################
#在文件后加入下面内容:
soft nofile 100000
hard nofile 100000
#此步骤需要重启机器生效,可以设置完后再重启。