- Apache Spark Quick Start Guide
- Shrey Mehrotra Akash Grade
- 202字
- 2021-07-02 13:39:58
Installing Scala
If you have the Scala .tar file (for example, scala-2.12.6.tgz), then copy it to an AWS EC2 Linux instance at any location (for example, /opt):
- You can also download the latest binary .tar.gz file from http://www.scala-lang.org/download/all.html
- You can download 2.12.6 from the following location: https://downloads.lightbend.com/scala/2.12.6/scala-2.12.6.tgz
The /opt file is an empty folder within the root in most Linux-based operating folders. Here, we can use this folder to copy and install software. By default, this folder is owned by root. Run the following command if you are getting permission issues while accessing this folder:
sudo chmod -R 777 /opt
Follow these steps to install Scala 2.12.6 on your Linux VM:
- Go to the location where you copied the Scala software package and uncompress it:
cd /opt
tar -xzvf scala-2.12.6.tgz
- Set the environment variable in .bash_profile, as follows:
nano ~/.bash_profile
- Add the following lines to the end of the file:
export SCALA_HOME=/opt/scala-2.12.6
export PATH=$PATH:$SCALA_HOME/bin
- Run the following command to update the environment variables in the current session:
source ~/.bash_profile
- Check for a Scala installation by running the following command:
scala -version
推薦閱讀