Linux环境:Scala和jdk下载安装

1、官网

https://www.scala-lang.org/download/
JDK的版本:1.8
Linux环境:Scala和jdk下载安装_第1张图片
Scala以前的版本:
Linux环境:Scala和jdk下载安装_第2张图片
根据操作系统下载:
Linux环境:Scala和jdk下载安装_第3张图片

2、解压

我这里是hadoop用户目录下的

[hadoop@vm01 ~]$ ll
total 4
drwxrwxr-x. 4 hadoop hadoop   53 Jul 27 11:42 app
drwxrwxr-x. 2 hadoop hadoop    6 Jul 14 12:28 data
drwxrwxr-x. 2 hadoop hadoop    6 Jul 14 12:28 lib
drwxrwxr-x. 3 hadoop hadoop 4096 Jul 27 11:41 software
drwxrwxr-x. 2 hadoop hadoop    6 Jul 14 12:28 source
[hadoop@vm01 ~]$ cd software/
[hadoop@vm01 software]$ ll
-rw-r--r--.  1 hadoop hadoop 173271626 Jul 10 04:41 jdk-8u45-linux-x64.gz
-rw-r--r--.  1 hadoop hadoop  28678231 Jul 27 11:29 scala-2.11.8.tgz
[hadoop@vm01 software]$ tar -zxvf scala-2.11.8.tgz -C ~/app/
[hadoop@vm01 software]$ tar -zxvf jdk-8u45-linux-x64.gz -C ~/app/
[hadoop@vm01 app]$ vi ~/.bash_profile 
export SCALA_HOME=/home/hadoop/app/scala-2.11.8
export PATH=$SCALA_HOME/bin:$PATH

export JAVA_HOME=/usr/java/jdk1.8.0_45
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JER_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JER_HOME/bin:$PATH
[hadoop@vm01 app]$ source ~/.bash_profile 
[hadoop@vm01 app]$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

[hadoop@vm01 app]$ scala -version
Scala code runner version 2.11.8 -- Copyright 2002-2016, LAMP/EPFL
[hadoop@vm01 app]$ 

3、scala帮助命令

[hadoop@vm01 app]$ scala
Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45).
Type in expressions for evaluation. Or try :help.

scala> :help
…
scala> :quit
[hadoop@vm01 app]$

你可能感兴趣的:(开发环境,Scala)