Install Scala on CentOS

Download Scala

$ wget http://downloads.lightbend.com/scala/2.11.8/scala-2.11.8.tgz

Extract

$ 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.

Verify

$ scala -version

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