Tech Tips

  1. Uncategorized
  2. 103 view

[Scala][Play2]Install it on EC2


I would like to use scala, so I installed play framework.
$wget http://downloads.typesafe.com/play/2.1.1/play-2.1.1.zip
$unzip play-2.1.1.zip
$mv play-2.1.1.zip play
$vim .bashrc
export PATH=$PATH:$HOME/play
$source .bashrc
$play help
Getting net.java.dev.jna jna 3.2.3 ...
:: retrieving :: org.scala-sbt#boot-jna
        confs: [default]
        1 artifacts copied, 0 already retrieved (838kB/34ms)
Getting play console_2.9.2 2.1.1 ...
:: retrieving :: org.scala-sbt#boot-app
        confs: [default]
        29 artifacts copied, 0 already retrieved (5976kB/88ms)
Getting Scala 2.9.2 (for console)...
:: retrieving :: org.scala-sbt#boot-scala
        confs: [default]
        4 artifacts copied, 0 already retrieved (20090kB/83ms)
       _            _
 _ __ | | __ _ _  _| |
| '_ \| |/ _' | || |_|
|  __/|_|\____|\__ (_)
|_|            |__/

play! 2.1.1 (using Java 1.6.0_27 and Scala 2.10.0), http://www.playframework.org
Welcome to Play 2.1.1!

These commands are available:
-----------------------------
license            Display licensing informations.
new [directory]    Create a new Play application in the specified directory.

You can also browse the complete documentation at http://www.playframework.org.

$sudo vim /etc/nginx/sites-enabled/
upstream service.srv.com {
        server 自分のIPアドレス:ポート番号;

}

server {
        listen 80; # ここにdefaultがついていないこと
        server_name  service.srv.com;

        access_log  /var/log/nginx/service.srv.com.access.log;

        location / {
                proxy_pass http://自分のIPアドレス:ポート番号;
                allow all;
        }
}

$export _JAVA_OPTIONS='-Xmx128m -Xms128m'
$play
$run
That’s all.

Uncategorized recent post

  1. Run Amazon FreeRTOS on M5Stack Core2 for AWS …

  2. Udacity Self-Driving Car Engineer Nanodegree …

  3. Install sbt 1.0.0 and run sample template

  4. Visualization of Neural Network and its Train…

  5. [Machine Learning]Created docker image includ…

関連記事

PAGE TOP