IP | 主機名 | 安裝的軟件 | ||
---|---|---|---|---|
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系統
使用Vmware虛擬機,選擇NAT網絡模式
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 ~]#
其他機器相同操作
[root@node01 ~]# sed -i 's@SELINUX=enforcing@SELINUX=disabled@g' /etc/selinux/config [root@node01 ~]# setenforce 0 [root@node01 ~]# getenforce Permissive
其他機器相同操作
[root@node01 ~]# systemctl disable firewalld # 開機不自啟防火墻 [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.
其他機器相同操作
[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地址為了防止虛擬機網絡問題,造成IP地址變動。
其他機器類似操作
其他機器相同操作
腳本安裝
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
每個機器都要做
免密
[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.
文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。
轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/127476.html
痛點: 如今數字化轉型,已成為企業界的共識。 從信息時代走向數字時代,大家都希望在生產要素、經濟形態發生變革的節點抓住機遇不被淘汰,而絕大多數中小企業又沒有財力搞得太折騰太復雜。因此大家不要期待一口氣吃成胖子,而要抓住數字化時代的本質是讓企業線上的數據流動起來,解決數據的運力和流通問題,也就是數據消費。其實絕大多數企業的核心訴求也是打破數據孤島,提升數據共享消費的效率,進而實現企業的降本...
摘要:學習需要什么基礎學習需要什么基礎這已經不是一個新鮮的話題了,隨便上網搜索一下就能找出成百上千篇的文章在講學習需要掌握的基礎。剛開始寫的幾篇稍微有點亂,其中有一篇就是在說學習需要什么樣基礎的。 學習hadoop需要什么基礎學習hadoop需要什么基礎這已經不是一個新鮮的話題了,隨便上網搜索一下就能找出成百上千篇的文章在講學習hadoop需要掌握的基礎。再直接的一點的問題就是——學Hado...
閱讀 1209·2023-02-24 11:21
閱讀 1405·2023-02-24 10:55
閱讀 2407·2023-02-24 10:47
閱讀 3099·2023-02-24 10:44
閱讀 885·2023-02-24 10:38
閱讀 610·2022-12-25 19:44
閱讀 752·2022-12-25 19:39
閱讀 866·2022-12-25 19:36