Last active
November 15, 2016 02:05
-
-
Save RavenZZ/b2695d2587c65bcd03fdcbbfbc081613 to your computer and use it in GitHub Desktop.
scala installation on centos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #http://backtobazics.com/scala/4-steps-to-setup-scala-on-centos/ | |
| #Step 1: Download Tarball OR RPM file of Scala 2.11.6 using below commands | |
| cd /data | |
| sudo wget http://downloads.typesafe.com/scala/2.12.0-M5/scala-2.12.0-M5.tgz | |
| #Step 2: Installation | |
| sudo cp /data/scala-2.12.0-M5.tgz /opt/ | |
| sudo cd /opt/ | |
| sudo tar -xvf scala-2.12.0-M5.tgz | |
| sudo mv scala-2.12.0-M5 scala | |
| sudo rm -f scala-2.12.0-M5.tgz | |
| #Step 3: Configure scala, scalac, scaladoc and scalap commands using alternatives (in case you have done tarball installation) | |
| sudo alternatives --install /usr/bin/scala scala /opt/scala/bin/scala 2 | |
| sudo alternatives --install /usr/bin/scalac scalac /opt/scala/bin/scalac 2 | |
| sudo alternatives --install /usr/bin/scaladoc scaladoc /opt/scala/bin/scaladoc 2 | |
| sudo alternatives --install /usr/bin/scalap scalap /opt/scala/bin/scalap 2 | |
| #Step 4: Update SCALA_HOME for all users in any of below files | |
| echo "" >> /etc/profile | |
| echo "## Setting SCALA_HOME for all USERS ##" >> /etc/profile | |
| echo "export SCALA_HOME=/opt/scala" >> /etc/profile | |
| source /etc/profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment