First, install the JDK
Note: Scala runs on top of the JVM, requires installation of the JDK as a prerequisite, and chooses version 1.7.*, which is better compatible with Scala 2.10.* version
1. Download: Download the JDK installation documentation from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html Jdk-7u72-linux-x64.tar.gz
2. Unzip: Unzip the installation document to the specified directory /usr/java/
3. Environment variable: Open ~/.bashrc, append bin/ folder directory to PATH environment variable
Export JAVA_HOME=/USR/JAVA/JDK1. 7 . 0_75export PATH= $PATH: $JAVA _home/binexport CLASSPATH=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/ Lib/dt.jar: $JAVA _home/lib/tools.jar
4. Verify: Open a new terminal, type java–version
" 1.7.0_72 " 1.7. 0_72-24.72-b04, Mixed mode)
Ii. installation of Scala
Note: Choose the Scala version for 2.10.*, which is the basis for the spark1.* environment.
1. Download: Download the Scala document from http://www.scala-lang.org/download/2.10.4.html scala-2.10.4.tgz
2. Unzip: Unzip the installation document to the specified directory /usr/scala/
3. Environment variable: Open ~/.bashrc, append bin/ folder directory to PATH environment variable
Export scala_home=/usr/scala/scala-2.10. 4 export PATH= $PATH: $SCALA _home/bin
4. Verify: Open a new terminal, type Scala –version
2.10. 4 2002-LAMP/EPFL
Iii. installation of SBT
Note: If you build a spark environment, you do not need to install SBT
1. Download the document: Download the SBT document from http://www.scala-sbt.org/download.html sbt-0.13.7.tgz
2. Unzip: Unzip the installation document to the specified directory /usr/sbt/
3. Environment variable: Open ~/.bashrc, append bin/ folder directory to PATH environment variable
Export sbt_home=/usr/sbt/sbt-0.13. 7 export PATH= $PATH: $SBT _home/bin
4. Verify: Open a new terminal, type SBT sbt-version, first run will download some packages
Iv. IDE
Finally, choose Install scalaide(http://scala-ide.org/) or Intellijidea (https://www.jetbrains.com/idea/)
Reference: Tools Setup:https://class.coursera.org/progfun-005/wiki/toolssetup
Scala environment Build (on CentOS 6)