scala从2.0 版本后需要安装jdk1.8环境,安装jdk方法请参考https://blog.youkuaiyun.com/anaitudou/article/details/79864893
[root@itcast01 ~]#tar -zxvf scala-2.12.6.tgz -C /itcast
配置环境变量
[root@itcast01 itcast]# vim /etc/profile
export SCALA_HOME=/itcast/scala-2.12.6
生效
[root@itcast01 itcast]# source /etc/profile
检验
[root@itcast01 itcast]# scala
Type in expressions for evaluation. Or try :help.
scala> 1*2
res0: Int = 2
scala>
scala 安装 OK