4 Steps to Setup Scala On CentOS

Scala is a widely used Functional Programming language in today’s era of programming. It is a hybrid language which combines the feature of functional and object oriented programming together. Same as Java it also convert the source code to byte code hence it require JVM in order to execute the program. You can learn more about it from this link.

The Setup of Scala on CentOS can be done as the same way as Java which is explained already in article 2 Ways of installing Java 8 on CentOS.

So let’s begin with the installation after logging in with root user…..!!!!!

Step 1: Download Tarball OR RPM file of Scala 2.11.6 using below commands

OR

Step 2: Installation

For Tarball Install, extract .tgz file under /opt directory and move scala-2.11.6 to /opt/scala directory

For RPM Install,
Extract scala RPM file

Step 3: Configure scala, scalac, scaladoc and scalap commands using alternatives (in case you have done tarball installation)

No need to use alternatives command if installation is done using rpm.

Check Scala version

Scala code runner version 2.11.6 — Copyright 2002-2013, LAMP/EPFL

Step 4: Update SCALA_HOME for all users in any of below files

Update /etc/profile (Global for all users)

Same thing can be done in ~/.bash_profile for user specific installation.
So finally done with Scala installation…..!!!!!

Leave a Reply

Your email address will not be published. Required fields are marked *