Parcel⽂件离线源部署
2.规划linux版本:CentOS 7.2
节点 Mysql组件 Parcel⽂件离线源 CM服务进程 ⼤数据组件hadoop001 MYSQL Parcel Alert Publisher Event Server NN RM DN NM ZK
hadoop002 Alert Publisher Event Server DN NM ZK
hadoop003 Host Monitor Service Monitor DN NM ZK
3.下载源
CM
cloudera-manager-centos7-cm5.16.1x8664.tar.gz
Parcel
CDH-5.16.1-1.cdh6.16.1.p0.3-el7.parcel
CDH-5.16.1-1.cdh6.16.1.p0.3-el7.parcel.sha1
manifest.json
JDK
JDK8
下载jdk-8u202-linux-x64.tar.gz
MySQL
MYSQL5.7
下载mysql-5.7.26-el7-x86_64.tar.gz
MySQL JDBC jar
mysql-connector-java-5.1.47.jar
下载完成后要重命名去掉版本号
路径: C:\Windows\System32\drivers\etc\hosts
39.97.188.249 hadoop001 hadoop001 39.97.225.112 hadoop002 hadoop002 39.97.224.68 hadoop003 hadoop003注意:IP是你虚拟机公网IP
3.设置所有节点的hosts文件 echo '172.17.144.104 hadoop001' >> /etc/hosts echo '172.17.144.103 hadoop002' >> /etc/hosts echo '172.17.144.105 hadoop003' >> /etc/hosts #检查 cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 172.17.144.104 hadoop001 172.17.144.103 hadoop002 172.17.144.105 hadoop003注意:IP为内网IP
4.关闭所有节点防火墙及清空规则 云主机我们使用的云主机,无论阿里云还是腾讯云的防火墙都是关闭的,所以我们不需要关闭服务器的防火墙。但是,我们需要检查下是否自动开启了web访问端口,如果没有,则自己添加
(1)打开安全组配置进入之后点击配置规则
(2)添加安全组规则注意:
1.点击蓝色感叹号会有规则说明 2.授权对象如果在公司内需要设置网段,就按照上图,将ip网段规定好。不限制的话就直接0.0.0.0/0 内网服务器最好在内部服务器部署时就将防火墙关闭,如果不行就暂时关闭,等部署成功再开启
systemctl stop firewalld systemctl disable firewalld iptables -F 5.关闭所有节点selinux阿里云服务器已经将selinux关闭了,所以不用配置
自己的服务器很可能会开启selinux,这样就需要关闭了
将SELINUX=disabled设置进去,之后重启才会生效
vim /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of three two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted 6.设置所有节点时区一致及时钟同步阿里云已经将节点时区和时间做了同步
我们实操下公司环境的时区时间同步
6.1时区 [root@hadoop001 ~]# timedatectl Local time: Tue 2019-05-28 15:37:53 CST Universal time: Tue 2019-05-28 07:37:53 UTC RTC time: Tue 2019-05-28 15:37:53 Time zone: Asia/Shanghai (CST, +0800) NTP enabled: yes NTP synchronized: yes RTC in local TZ: yes DST active: n/a #查看命令帮助,学习⾄关重要,⽆需百度,太low [root@hadoop001 ~]# timedatectl --help timedatectl [OPTIONS...] COMMAND ... Query or change system time and date settings. -h --help Show this help message --version Show package version --no-pager Do not pipe output into a pager --no-ask-password Do not prompt for password -H --host=[USER@]HOST Operate on remote host -M --machine=CONTAINER Operate on local container --adjust-system-clock Adjust system clock when changing local RTC mode Commands: status Show current time settings set-time TIME Set system time set-timezone ZONE Set system time zone list-timezones Show known time zones set-local-rtc BOOL Control whether RTC is in local time set-ntp BOOL Control whether NTP is enabled #查看哪些时区 [root@hadoop001 ~]# timedatectl list-timezones Africa/Abidjan Africa/Accra Africa/Addis_Ababa Africa/Algiers Africa/Asmara Africa/Bamako #所有节点设置亚洲上海时区 [root@hadoop001 ~]# timedatectl set-timezone Asia/Shanghai [root@hadoop002 ~]# timedatectl set-timezone Asia/Shanghai [root@hadoop003 ~]# timedatectl set-timezone Asia/Shanghai 6.2.时间 #所有节点安装ntp [root@hadoop001 ~]# yum install -y ntp #选取hadoop001为ntp的主节点 [root@hadoop001 ~]# vi /etc/ntp.conf #time server 0.asia.pool.ntp.org server 1.asia.pool.ntp.org server 2.asia.pool.ntp.org server 3.asia.pool.ntp.org #当外部时间不可用时,可使用本地硬件时间 server 127.127.1.0 iburst local clock #允许哪些网段的机器来同步时间 修改成自己的内网网段 restrict 172.17.144.0 mask 255.255.255.0 nomodify notrap #开启ntpd及查看状态 [root@hadoop001 ~]# systemctl start ntpd [root@hadoop001 ~]# systemctl status ntpd ● ntpd.service - Network Time Service Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: d isabled) Active: active (running) since Sat 2019-05-11 10:15:00 CST; 11min ago Main PID: 18518 (ntpd) CGroup: /system.slice/ntpd.service !"18518 /usr/sbin/ntpd -u ntp:ntp -g May 11 10:15:00 hadoop001 systemd[1]: Starting Network Time Service... May 11 10:15:00 hadoop001 ntpd[18518]: proto: precision = 0.088 usec May 11 10:15:00 hadoop001 ntpd[18518]: 0.0.0.0 c01d 0d kern kernel time sync enabl ed May 11 10:15:00 hadoop001 systemd[1]: Started Network Time Service. #验证 [root@hadoop001 ~]# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== LOCAL(0) .LOCL. 10 l 726 64 0 0.000 0.000 0.000 #其他从节点停⽌禁⽤ntpd服务 [root@hadoop002 ~]# systemctl stop ntpd [root@hadoop002 ~]# systemctl disable ntpd Removed symlink /etc/systemd/system/multi-user.target.wants/ntpd.service. [root@hadoop002 ~]# /usr/sbin/ntpdate hadoop001 11 May 10:29:22 ntpdate[9370]: adjust time server 172.19.7.96 offset 0.000867 sec #每天凌晨同步hadoop001节点时间[root@hadoop002 ~]# crontab -e 00 00 * * * /usr/sbin/ntpdate hadoop001 [root@hadoop003 ~]# systemctl stop ntpd [root@hadoop004 ~]# systemctl disable ntpd Removed symlink /etc/systemd/system/multi-user.target.wants/ntpd.service. [root@hadoop005 ~]# /usr/sbin/ntpdate hadoop001 11 May 10:29:22 ntpdate[9370]: adjust time server 172.19.7.96 offset 0.000867 sec #每天凌晨同步hadoop001节点时间 [root@hadoop003 ~]# crontab -e 00 00 * * * /usr/sbin/ntpdate hadoop001 7.JDK部署 mkdir /usr/java tar -xzvf jdk-8u45-linux-x64.tar.gz -C /usr/java/ #切记必须修正所属⽤户及⽤户组 chown -R root:root /usr/java/jdk1.8.0_45 [root@hadoop001 cdh6.16.1]# vim /etc/profile export JAVA_HOME=/usr/java/jdk1.8.0_45 export PATH=${JAVA_HOME}/bin:${PATH} source /etc/profile which java如果节点过多,那么就只做一台镜像模板,将基础工作完成之后,分发克隆。。(最好请运维小哥哥做~)
8.hadoop001节点离线部署MySQL5.7郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。