IP | 主機(jī)名 | 安裝的軟件 | ||
---|---|---|---|---|
192.168.71.133 | node01 | JDK Hadoop | ||
192.168.71.134 | node01 | JDK Hadoop | ||
192.168.71.135 | node03 | JDK Hadoop | ||
192.168.71.136 | node04 | JDK Hadoop |
基于centos7系統(tǒng)
使用Vmware虛擬機(jī),選擇NAT網(wǎng)絡(luò)模式
name="node04" hostnamectl set-hostname $name echo $name > /etc/hostname bash sed -i 's@SELINUX=enforcing@SELINUX=disabled@g' /etc/selinux/config setenforce 0 getenforce \cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime echo "*/5 * * * * /usr/sbin/ntpdate cn.pool.ntp.org > /dev/null 2>&1" >> /var/spool/cron/root cat>>/etc/security/limits.conf<<EOF * soft nofile 65535 * hard nofile 65535 EOF echo "ulimit -SHn 65535">>/etc/rc.local ulimit -SHn 65535 ulimit -n systemctl disable firewalld systemctl stop firewalld systemctl status firewalld
[root@localhost ~]# hostnamectl set-hostname node01 [root@localhost ~]# bash [root@node01 ~]# echo 'node01'> /etc/hostname [root@node01 ~]#
其他機(jī)器相同操作
[root@node01 ~]# sed -i 's@SELINUX=enforcing@SELINUX=disabled@g' /etc/selinux/config [root@node01 ~]# setenforce 0 [root@node01 ~]# getenforce Permissive
其他機(jī)器相同操作
[root@node01 ~]# systemctl disable firewalld # 開機(jī)不自啟防火墻 [root@node01 ~]# systemctl stop firewalld [root@node01 ~]# systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:firewalld(1) Feb 18 17:10:21 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon... Feb 18 17:10:22 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon. Feb 18 09:14:35 localhost.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon... Feb 18 09:14:36 localhost.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon. Feb 18 09:14:36 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon... Feb 18 09:14:36 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon. Feb 19 16:40:39 localhost.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon... Feb 19 16:40:39 localhost.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon.
其他機(jī)器相同操作
[root@node01 ~]# \cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime [root@node01 ~]# echo "*/5 * * * * /usr/sbin/ntpdate cn.pool.ntp.org > /dev/null 2>&1" >> /var/spool/cron/root [root@node01 ~]# crontab -l */5 * * * * /usr/sbin/ntpdate cn.pool.ntp.org > /dev/null 2>&1
cat>>/etc/security/limits.conf<<EOF * soft nofile 65535 * hard nofile 65535 EOF echo "ulimit -SHn 65535">>/etc/rc.local ulimit -SHn 65535
[root@node01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33 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=1f78f596-4e84-42c4-b5ff-b6056e2cd60a DEVICE=ens33 ONBOOT=yes IPADDR=192.168.71.133 NETMASK=255.255.255.0 GATEWAY=192.168.71.2 DNS1=223.5.5.5 DNS2=114.114.114.114
固定IP地址為了防止虛擬機(jī)網(wǎng)絡(luò)問題,造成IP地址變動。
其他機(jī)器類似操作
其他機(jī)器相同操作
腳本安裝
cd /usr/local/src/ wget 192.168.2.49:10000/caimengzhi/JDK8_112.zip unzip JDK8_112.zip sh InstallJDK8.sh source /etc/profile java -version
每個(gè)機(jī)器都要做
免密
[root@node01 ~]# ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: SHA256:1nEuxcQYCBAw7IM3N7Ud63N2IpPO3uKxMmxlDLwE2A0 root@node01 The key's randomart image is: +---[RSA 2048]----+ | .o+E=.. ..+. | | o.o o o .o. | | o + o o. + | |. = o = o. = | | . + o =S.o . | | ..X +.. | | . =.* o | | = ++ | | . =+.. | +----[SHA256]-----+ ------> 免密到node01 也就是自己 [root@node01 ~]# ssh-copy-id root@node01 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub" The authenticity of host 'node01 (192.168.71.133)' can't be established. ECDSA key fingerprint is SHA256:YcLvRKxlm+A/ojEzBNzAJcgCF0ya0Nfd0x5lPc4ZO/I. ECDSA key fingerprint is MD5:bb:ba:5e:c5:4a:d1:6c:ba:a8:aa:5d:31:b6:cb:17:33. Are you sure you want to continue connecting (yes/no)? yes /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys root@node01's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'root@node01'" and check to make sure that only the key(s) you wanted were added. [root@node01 ~]# ssh node01 Last login: Wed Mar 11 20:50:14 2020 from 192.168.71.1 [root@node01 ~]# logout Connection to node01 closed. ------> 免密到node02 [root@node01 ~]# ssh-copy-id root@node02 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub" The authenticity of host 'node02 (192.168.71.134)' can't be established. ECDSA key fingerprint is SHA256:It4bpZuRcqmOPQlHB7GATIdx5zFa3Qb1FnSfedvBPbU. ECDSA key fingerprint is MD5:1a:70:54:c0:20:9e:20:37:14:fb:87:7f:cf:f1:79:a4. Are you sure you want to continue connecting (yes/no)? yes /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys root@node02's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'root@node02'" and check to make sure that only the key(s) you wanted were added. [root@node01 ~]# ssh node02 Last login: Wed Mar 11 20:55:24 2020 from 192.168.71.1 [root@node02 ~]# logout Connection to node02 closed. ------> 免密到node03 [root@node01 ~]# ssh-copy-id root@node03 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub" The authenticity of host 'node03 (192.168.71.135)' can't be established. ECDSA key fingerprint is SHA256:hfM32lJMLFKybYxNw+cm3pX5Z9lISpvXm88cob77hqs. ECDSA key fingerprint is MD5:9b:69:4a:81:28:fe:59:aa:e9:c3:86:8b:2d:f7:67:f2. Are you sure you want to continue connecting (yes/no)? yes /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys root@node03's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'root@node03'" and check to make sure that only the key(s) you wanted were added. [root@node01 ~]# ssh node03 Last failed login: Wed Mar 11 21:03:09 CST 2020 from node01 on ssh:notty There was 1 failed login attempt since the last successful login. Last login: Wed Mar 11 20:55:29 2020 from 192.168.71.1 [root@node03 ~]# logout Connection to node03 closed. ------> 免密到node04 [root@node01 ~]# ssh-copy-id root@node04 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub" The authenticity of host 'node04 (192.168.71.136)' can't be established. ECDSA key fingerprint is SHA256:RPhRCeYqNUn2AiUj246zRsHoxuRbvZ1al/lk6yTSjXc. ECDSA key fingerprint is MD5:d6:4f:15:09:6b:85:7f:ea:14:5c:cc:3c:5f:36:0d:74. Are you sure you want to continue connecting (yes/no)? yes /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys root@node04's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'root@node04'" and check to make sure that only the key(s) you wanted were added. [root@node01 ~]# ssh node04 Last login: Wed Mar 11 20:55:33 2020 from 192.168.71.1 [root@node04 ~]# logout Connection to node04 closed.
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://systransis.cn/yun/127476.html
痛點(diǎn): 如今數(shù)字化轉(zhuǎn)型,已成為企業(yè)界的共識。 從信息時(shí)代走向數(shù)字時(shí)代,大家都希望在生產(chǎn)要素、經(jīng)濟(jì)形態(tài)發(fā)生變革的節(jié)點(diǎn)抓住機(jī)遇不被淘汰,而絕大多數(shù)中小企業(yè)又沒有財(cái)力搞得太折騰太復(fù)雜。因此大家不要期待一口氣吃成胖子,而要抓住數(shù)字化時(shí)代的本質(zhì)是讓企業(yè)線上的數(shù)據(jù)流動起來,解決數(shù)據(jù)的運(yùn)力和流通問題,也就是數(shù)據(jù)消費(fèi)。其實(shí)絕大多數(shù)企業(yè)的核心訴求也是打破數(shù)據(jù)孤島,提升數(shù)據(jù)共享消費(fèi)的效率,進(jìn)而實(shí)現(xiàn)企業(yè)的降本...
摘要:學(xué)習(xí)需要什么基礎(chǔ)學(xué)習(xí)需要什么基礎(chǔ)這已經(jīng)不是一個(gè)新鮮的話題了,隨便上網(wǎng)搜索一下就能找出成百上千篇的文章在講學(xué)習(xí)需要掌握的基礎(chǔ)。剛開始寫的幾篇稍微有點(diǎn)亂,其中有一篇就是在說學(xué)習(xí)需要什么樣基礎(chǔ)的。 學(xué)習(xí)hadoop需要什么基礎(chǔ)學(xué)習(xí)hadoop需要什么基礎(chǔ)這已經(jīng)不是一個(gè)新鮮的話題了,隨便上網(wǎng)搜索一下就能找出成百上千篇的文章在講學(xué)習(xí)hadoop需要掌握的基礎(chǔ)。再直接的一點(diǎn)的問題就是——學(xué)Hado...
閱讀 1232·2023-02-24 11:21
閱讀 1433·2023-02-24 10:55
閱讀 2458·2023-02-24 10:47
閱讀 3157·2023-02-24 10:44
閱讀 905·2023-02-24 10:38
閱讀 632·2022-12-25 19:44
閱讀 770·2022-12-25 19:39
閱讀 887·2022-12-25 19:36