How to install Scala from the official Scala distribution

How to install Scala from the official Scala distribution? This is needed on a Linux release with older version of Scala in the repository, e.g. Fedora 12.

related to an answer for: How to install Scala on Fedora Linux
asked May 20, 2013 by SA (14,760 points)
edited May 20, 2013

2 Answers

 
Best answer

Use the install-scala.sh script:

# wget https://raw2.github.com/zma/usefulscripts/master/script/install-scala.sh
# sh ./install-scala.sh VER

where VER is the scala version that you want to install.

answered Feb 24, 2014 by Eric Z Ma (44,280 points)
selected Feb 24, 2014 by SA

First step, install and configure the Java environment of course.

Second, download the scala-2.9.2 package and decpress it:

# wget http://www.scala-lang.org/downloads/distrib/files/scala-2.9.2.tgz
# tar xf scala-2.9.2.tgz

We install (copy) it to the /opt/ directory:

# mv scala-2.9.2 /opt/

Set globally for all users to include the Scala-2.9.2 installed in their $PATH:

echo "export PATH=/opt/scala-2.9.2/bin/:$PATH" > /etc/profile.d/scala-2.9.2.sh

Alternatively, the $PATH setting can be added by users to their ~/.bashrc.

After re-logon, the users can use Scala now.

I summarize these steps and put them together in a script: install-scala-2.9.2.sh.

answered May 20, 2013 by SA (14,760 points)
edited May 20, 2013

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...