Total Pageviews

Friday 23 May 2014

安装scala

wget http://www.scala-lang.org/files/archive/nightly/distributions/scala-2.11.0-20140224-163703-7c709e122f.tgz
tar zxvf scala-2.11.0-20140224-163703-7c709e122f.tgz
cd  scala-2.11.0-20140224-163703-7c709e122f

as3:~/scala-2.11.0-20140224-163703-7c709e122f# ls
api  bin  doc  lib  man  src
as3:~/scala-2.11.0-20140224-163703-7c709e122f# ls bin
fsc      scala      scalac      scaladoc      scalap
fsc.bat  scala.bat  scalac.bat  scaladoc.bat  scalap.bat
as3:~/scala-2.11.0-20140224-163703-7c709e122f# 
as3:~/scala-2.11.0-20140224-163703-7c709e122f# ./bin/scala -version
Scala code runner version 2.11.0-20140224-163703-7c709e122f -- Copyright 2002-2013, LAMP/EPFL
as3:~/scala-2.11.0-20140224-163703-7c709e122f#
(./bin/scala就是scala的主执行文件)
as3:~/scala-2.11.0-20140224-163703-7c709e122f# export PATH=$PATH:/root/scala-2.11.0-20140224-163703-7c709e122f/bin/
as3:~/scala-2.11.0-20140224-163703-7c709e122f# scala -version
Scala code runner version 2.11.0-20140224-163703-7c709e122f -- Copyright 2002-2013, LAMP/EPFL
as3:~/scala-2.11.0-20140224-163703-7c709e122f# nano /etc/profile
(把scala添加到环境变量,在 /etc/profile文件的最下面添加:
 export PATH=$PATH:/root/scala-2.11.0-20140224-163703-7c709e122f/bin/ )

安装eclipse(4.2)插件
site url:
http://download.scala-ide.org/sdk/e38/scala210/dev/site/
一路install。