Last active
December 18, 2015 20:29
-
-
Save rkaneko/5840368 to your computer and use it in GitHub Desktop.
install play framework v2.1.0 & sbt v0.12.2 on CentOS .
This file contains 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
## install play | |
# download play.zip | |
$ cd ~ | |
$ mkdir /workspace | |
$ cd workspace | |
$ wget http://downloads.typesafe.com/play/2.1.0/play-2.1.0.zip | |
$ ls | |
play-2.1.0.zip | |
$ unzip play-2.1.0.zip | |
$ sudo mkdir -p /usr/local/pkg/play | |
$ sudo mv play-2.1.0 /usr/local/pkg/play/2.1.0 | |
$ sudo chmod -R 755 /usr/local/pkg/ | |
## /usr/local/pkg/以下の所有権をwheelグループにする(playコマンドをsudoユーザに使えるようにするため) | |
$ sudo chown -R :wheel /usr/local/pkg | |
# 乱暴だが... | |
$ sudo chmod -R 777 /usr/local/pkg | |
# build play | |
$ cd /usr/local/pkg/play/2.1.0/framework | |
$ ./build | |
> publish-local | |
> exit | |
# (詳しくはREAMDME.md) | |
# 全ユーザからplayコマンドを使えるよう設定 | |
$ sudo vi /etc/profile | |
--- | |
# play framework | |
export PATH=$PATH:/usr/local/pkg/play/2.1.0 | |
--- | |
$ source /etc/profile | |
# check play command | |
$ cd ~/workspace | |
$ play help | |
Getting play console_2.9.2 2.1.0 ... | |
:: retrieving :: org.scala-sbt#boot-app | |
confs: [default] | |
29 artifacts copied, 0 already retrieved (5976kB/73ms) | |
_ _ | |
_ __ | | __ _ _ _| | | |
| '_ \| |/ _' | || |_| | |
| __/|_|\____|\__ (_) | |
|_| |__/ | |
play! 2.1.0 (using Java 1.7.0_19 and Scala 2.10.0), http://www.playframework.org | |
Welcome to Play 2.1.0! | |
## install sbt | |
$ cd ~/workspace | |
$ wget http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt//0.12.2/sbt.zip | |
$ unzip sbt.zip | |
$ ls | |
sbt sbt.zip | |
$ mkdir /usr/local/pkg/sbt/ | |
$ sudo mv sbt /usr/local/pkg/sbt/0.12.2 | |
$ sudo chmod -R 755 /usr/local/pkg/sbt/ | |
# /usr/bin/にsbt-launch.jarのシンボリックリンクを貼る | |
$ cd /usr/local/pkg/sbt/0.12.2/bin/ | |
$ sudo ln sbt-launch.jar /usr/bin/ | |
$ ls /usr/bin/ | grep sbt | |
sbt-launch.jar | |
# make sbt command | |
$ sudo vi /usr/bin/sbt | |
--- | |
java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -jar `dirname $0`/sbt-launch.jar "$@" | |
--- | |
$ sudo chmod 755 /usr/bin/sbt | |
# make test sample | |
$ cd ~/workspace | |
$ play new helloworld | |
> | |
> 2 | |
OK, application helloworld is created. | |
Have fun! | |
$ cd helloworld | |
$ sbt | |
[info] Loading project definition from /home/rkaneko/workspace/helloworld/project | |
[info] Set current project to helloworld (in build file:/home/rkaneko/workspace/helloworld/) | |
[helloworld] $ realod | |
[helloworld] $ update | |
[helloworld] $ compile | |
[helloworld] $ exit | |
# done ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment