准备:
1. 规划3个集群节点:
hosts主机都已经配置好映射,映射主机名分别为master,slave1,slave2,
且已经进行ssh免密配置,确保端口互通,防火墙关闭



1. 下载
https://www.scala-lang.org/download/选择scala-2.13.3.tgz,如果是其他平台请根据平台选择


2. 解压到指定目录(解压后主目录:/opt/soft/scala-2.13.3)
tar -zxvf /opt/soft/download_jars/scala-2.13.3.tgz -C /opt/soft/



3. 配置scala环境变量
3.1 打开 vim /etc/profile添加以下配置
# scala home
export SCALA_HOME=/opt/soft/scala-2.13.3
export PATH=$SCALA_HOME/bin:$PATH

3.2 让环境变量立即生效
source /etc/profile

4. 验证安装是否OK
[hadoop@jms-master-01 tools]$ scala
Welcome to Scala 2.12.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_191).
Type in expressions for evaluation. Or try :help.

scala> :q

 

 


5. node节点分发(如果在内网,用内网IP比主机名快很多,主机名是映射的公网太慢)
scp -r /opt/soft/scala-2.13.3 hadoop@172.17.0.5:/opt/soft/
scp -r /opt/soft/scala-2.13.3 hadoop@172.17.0.13:/opt/soft/


6. 其他各node节点(slave1,slave2)分别配置环境变量与刷新环境变量(执行3.1,3.2,4两个步骤),
刷新profile文件使配置生效,验证安装是否OK