Ubunutu 12.10 installing Scala 2.10 and Play Framework 2.1.0

Posted in jvm, playframework, scala on February 10th, 2013 by taswar

First one has to get their java working.

To install java

1
2
3
4
5
6
7
8
9
10
$sudo add-apt-repository ppa:webupd8team/java
$sudo apt-get update
$sudo apt-get install oracle-java7-installer
$sudo update-java-alternatives -s java-7-oracle
$which java
/usr/bin/java
$java -version
java version "1.7.0_13"
Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

Once java is installed we will install scala, I like using stow for my package management for non apt-get stuff.

1
2
3
4
5
6
7
8
$cd /usr/local/stow
$sudo wget http://www.scala-lang.org/downloads/distrib/files/scala-2.10.0.tgz
$sudo tar zxvf scala-2.10.0.tgz
$sudo stow scala-2.10.0
$which scalac
/usr/local/bin/scalac
$scalac -version
Scala compiler version 2.10.0 -- Copyright 2002-2012, LAMP/EPFL

Now that we have scala is installed lets get play framework installed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$cd /usr/local/
$sudo wget http://downloads.typesafe.com/play/2.1.0/play-2.1.0.zip
$sudo unzip play-2.1.0.zip
$cd framework/sbt/boot
$sudo chmod -R o+w boot
$vi ~/.bashrc (let add to PATH=$PATH:/usr/local/play-2.1.0:. )
$source ~/.bashrc 
$play
      _            _
 _ __ | | __ _ _  _| |
| '_ \| |/ _' | || |_|
|  __/|_|\____|\__ (_)
|_|            |__/
 
play! 2.1.0 (using Java 1.7.0_13 and Scala 2.10.0), http://www.playframework.org
 
This is not a play application!
 
Use `play new` to create a new Play application in the current directory,
or go to an existing application and launch the development console using `play`.
 
You can also browse the complete documentation at http://www.playframework.org.

If you get an error when you launch play that means you havent given the rights to the boot folder, check the commands I have listed above again.

Share

Leave a Comment