Scala installation Configuration

Source: Internet
Author: User
Background Notes

Recent research spark need Scala to prepare a Scala environment for documenting the configuration notes.
The Scala language is based on the Java language, so you have to install the JDK first. Experimental Environment: Win7 under VMware Virtual machine operating system: CentOS 6.5 x64 java:jdk-8u161-linux-x64.tar.gz scala:scala-2.12.4.tgz Installation configuration 1. Install JDK

In general, we will have to uninstall the Linux openjdk, and then install the Sun's JDK.
Since my CentOS is installed in the mini version, I can install it directly without having my own JDK.
Download JDK installation package from Oracle website:
http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/ Jdk-8u161-linux-x64.tar.gz? Authparam=1517808422_bdd9ddc0a30c84fe1961a9a2f6f1eb63
I downloaded the latest version of JDK8: jdk-8u161-linux-x64.tar.gz
The following is the configuration step for the JDK.
Create a directory/java in the/usr directory,

CD/USR
mkdir Java

Upload the JDK installation package to the/usr/java directory, unzip the JDK installation package,

TAR-ZXVF jdk-8u161-linux-x64.tar.gz

Configure Environment variables

Vim/etc/profile

Add the following configuration entry in/etc/profile

java_home=/usr/java/jdk1.8.0_161
path= $JAVA _home/bin: $PATH
classpath=.: $JAVA _home/lib/dt.jar: $JAVA _ Home/lib/tools.jar

Refresh environment variable to make configuration take effect immediately

Source/etc/profile

Check that the JDK is configured successfully

Java-version

2. Install Scala

First go to the official website to download Scala installation package, download address: http://www.scala-lang.org/download/
The latest version we downloaded: scala-2.12.4.tgz
Here is the Scala configuration step.
Create a directory/scala in the/usr directory,

Mkdir/usr/scala

Upload the Scala installation package to the/usr/scala directory and unzip the Scala installation package.

TAR-ZXVF scala-2.12.4.tgz

Configure Environment variables

Vim/etc/profile

Add the following configuration entry in/etc/profile

scala_home=/usr/scala/scala-2.12.4
path= $PATH: $SCALA _home/bin


Refresh environment variable to make configuration take effect immediately

Source/etc/profile

Check that scala configuration is in effect.

Scala-version

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.