前言:
现时小伙伴们对“安装sshcopyid”大概比较看重,各位老铁们都想要分析一些“安装sshcopyid”的相关资讯。那么小编在网上网罗了一些关于“安装sshcopyid””的相关内容,希望兄弟们能喜欢,同学们快快来了解一下吧!环境硬件环境
1、cpu 4核
2、内存16g
软件环境
1、flink版本为1.9.0()
2、CentOS Linux release 7.6.1810 (Core) ()
3、1.8.0_201 64-Bit Server ()
节点环境
master 192.168.1.56
slave01 192.168.1.58
slave02 192.168.1.59
slave03 192.168.1.60
修改/etc/hosts文件,添加映射关系
安装步骤创建flink账号,密码flink
adduser flinkpasswd flink添加ssh免密码登陆
在master上使用ssh-keygen -t rsa生成公钥后,使用ssh-copyid复制master公钥到salve机器上。
[flink@master ~]$ ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/flink/.ssh/id_rsa): Created directory '/home/flink/.ssh'.Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/flink/.ssh/id_rsa.Your public key has been saved in /home/flink/.ssh/id_rsa.pub.The key fingerprint is:SHA256:dMjfT7GUSv03bXpdYb038gsB5XEcGtWylc9oSDhkLhw flink@masterThe key's randomart image is:+---[RSA 2048]----+| E.o. +o++|| o =o +.*++|| * o+.+=Oo|| . + ooo=+*|| S . o+o+B|| o+oB|| .o.o|| ...|| . |+----[SHA256]-----+然后使用ssh-copyid复制[flink@master ~]$ ssh-copy-id flink@slave01[flink@master ~]$ ssh-copy-id flink@slave02[flink@master ~]$ ssh-copy-id flink@slave03切换flink账号下载flink,解压flink
[flink@master ~]$ wget [flink@master ~]$ tar zxvf flink-1.9.0-bin-scala_2.11.tgz添加flink环境变量
vi ~ /.bash_profileexport FLINK_HOME=/home/flink/flink-1.9.0export PATH=$PATH:$FLINK_HOME/bin修改flink配置文件
进入目录/home/flink/flink-1.9.0/conf修改flink-conf.yaml,主要修改项:jobmanager.rpc.addressvi flink-conf.yamljobmanager.rpc.address: master
修改masters 文件,添加master映射名称到master文件中
vi /home/flink/flink-1.9.0/conf/masters master:8081
修改slaves文件,添加slave到文件中
vi /home/flink/flink-1.9.0/conf/slavesslave01slave02slave03分发flink到slave机器
cd /home/flinkscp -r flink-1.9.0/ flink@slave01:/home/flinkscp -r flink-1.9.0/ flink@slave02:/home/flinkscp -r flink-1.9.0/ flink@slave03:/home/flink启动flink
cd /home/flink/flink-1.9.0/bin./start-cluster.sh停止flink
cd /home/flink/flink-1.9.0/bin./start-cluster.sh停止flink
cd /home/flink/flink-1.9.0/bin./stop-cluster.sh查看控制台
打开网址:
标签: #安装sshcopyid