Install JDK, the steps are omitted,
mjduan@mjduan-ubuntu:~$ java -version
java version "1.8.0_111"Java(TM) SE Runtime Environment(build 1.8.0_111-b14)
Java HotSpot(TM)64-Bit Server VM(build 25.111-b14, mixed mode)
Install Scala, download link
...
# scala
export SCALA_HOME=/opt/software/tool/scala2.12export PATH=$SCALA_HOME/bin:$PATH
mjduan@mjduan-ubuntu:~$ source ~/.bashrc
mjduan@mjduan-ubuntu:~$ scala -version
Scala code runner version 2.12.8-- Copyright 2002-2018, LAMP/EPFL and Lightbend, Inc.
Install Spark, download link
mjduan@mjduan-ubuntu:~$ tail -f ~/.bashrc
......
# scala
export SCALA_HOME=/opt/software/tool/scala2.12export PATH=$SCALA_HOME/bin:$PATH
# spark
export SPARK_HOME=/opt/software/tool/spark
export PATH=$SPARK_HOME/bin:$PATH
mjduan@mjduan-ubuntu:~$ source ~/.bashrc
mjduan@mjduan-ubuntu:~$ spark-shell
2019- 03- 0818:02:36 WARN Utils:66- Your hostname, mjduan-ubuntu resolves to a loopback address:127.0.1.1; using 192.168.43.214instead(on interfacewlp2s0)2019-03-0818:02:36 WARN Utils:66- Set SPARK_LOCAL_IP if you need to bind to another address
2019- 03- 0818:02:37 WARN NativeCodeLoader:62- Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
Spark context Web UI available at http://192.168.43.214:4040
Spark context available as'sc'(master = local[*], app id = local-1552039363367).
Spark session available as'spark'.
Welcome to
____ __
/ __/__ ___ _____//__
_\ \ / _ \/ _ `/ __/ '_//___/.__/\_,_/_//_/\_\ version 2.4.0/_/
Using Scala version 2.11.12(Java HotSpot(TM)64-Bit Server VM, Java 1.8.0_111)
Type in expressions to have them evaluated.
Type :help for more information.
scala>
Enter http://192.168.43.214:4040 in the browser to see the UI interface.
( adsbygoogle = window.adsbygoogle || []).push({});
Recommended Posts