A simple walkthrough to install and configure an Scala on Centos 7.

As always, this is as much documentation for me as it is intended to be a tutorial but suggested corrections, additions and omissions are welcomed.


Do your updates & upgrades.

sudo yum -y update
sudo yum -y upgrade


Verify that you have a compatible version of the Java JDK installed:

$ java -version
# openjdk version "1.8.0_131"
# OpenJDK Runtime Environment (build 1.8.0_131-b11)
# OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)

Running a compatible version of the compiler:

javac -version
# javac 1.8.0_131

If you haven’t done this, please visit the JDK installation article.


Go to the downloads page and download the most current version of Scala.

Note that I’m using /opt/<software>/<software>-<version> because this is 3rd party software but if you don’t have root access this can be done to any writable directory.

wget http://downloads.lightbend.com/scala/2.12.2/scala-2.12.2.rpm
sudo yum -y install scala-2.12.2.rpm

Verify your install:

$ scala -version
# Scala code runner version 2.12.2 -- Copyright 2002-2017, LAMP/EPFL and Lightbend, Inc.