- JDK のインストール
$ sudo yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel
- Scala と sbt のインストール http://www.scala-lang.org/download/install.html
$ sudo -s
# yum -y install wget
# cd /usr/local/share
# wget http://downloads.typesafe.com/scala/2.11.8/scala-2.11.8.tgz
# tar xzf scala-2.11.8.tgz
# ln -s scala-2.11.8 scala
# rm scala-2.11.8.tgz
# ls -la /usr/local/share/
合計 24
drwxr-xr-x. 6 root root 4096 6月 18 16:26 .
drwxr-xr-x. 12 root root 4096 4月 4 17:57 ..
drwxr-xr-x. 2 root root 4096 8月 12 2015 applications
drwxr-xr-x. 2 root root 4096 8月 12 2015 info
drwxr-xr-x. 21 root root 4096 4月 4 17:57 man
lrwxrwxrwx. 1 root root 12 6月 18 16:26 scala -> scala-2.11.8
drwxrwxr-x. 6 1001 1001 4096 3月 4 10:30 scala-2.11.8
Scala に PATH を通す
/etc/profile.d/scala.sh
export SCALA_HOME=/usr/local/share/scala
export PATH=${PATH}:${SCALA_HOME}/bin
- sbt のインストール http://www.scala-sbt.org/release/docs/Installing-sbt-on-Linux.html
$ curl https://bintray.com/sbt/rpm/rpm | sudo tee /etc/yum.repos.d/bintray-sbt-rpm.repo
$ sudo yum install sbt
- インストールの確認
$ java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
$ source /etc/profile.d/scala
$ scala -version
Scala code runner version 2.11.8 -- Copyright 2002-2016, LAMP/EPFL
$ sbt about
[info] Set current project to vagrant (in build file:/home/vagrant/)
[info] This is sbt 0.13.9
[info] The current project is {file:/home/vagrant/}vagrant 0.1-SNAPSHOT
[info] The current project is built against Scala 2.10.5
[info] Available Plugins: sbt.plugins.IvyPlugin, sbt.plugins.JvmPlugin, sbt.plugins.CorePlugin, sbt.plugins.JUnitXmlReportPlugin
[info] sbt, sbt plugins, and build definitions are using Scala 2.10.5