Install Scala on CentOS

Download Scala

$ wget


$ tar -xf scala-2.11.8.tgz

Create a directory for scala under /usr/lib/scala. If you choose to use scala v2.10, you can put that inside this directory as well and use "alternatives" to switch between two versions.

$ sudo mkdir /usr/lib/scala

Move the scala binary to /usr/lib/scala

$ sudo mv scala-2.11.8 /usr/lib/scala

Create a symlink to scala executable.

$ sudo ln -s /usr/lib/scala/scala-2.11.8/bin/scala /usr/local/bin/scala

Make sure /usr/local/bin is in $PATH. You can update /etc/profile to set the PATH.


$ scala -version

Scala code runner version 2.11.8 -- Copyright 2002-2016, LAMP/EPFL