Tech Tips

  1. プログラミング
  2. 351 view

[Scala][Play2]EC2上にインストール

なんとなくscalaが使いたくなって入れてみた。
$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
以上。

プログラミングの最近記事

  1. PlatformIO IDE for VSCode を使用して VSCode で Ardu…

  2. ROS Docker イメージで発生した GPG error の解消方法

  3. Streamlit で訪れた国を色づけした世界地図を作成できるアプリケーションを作成してみ…

  4. M5Stack Core2 for AWS – ESP32 IoT開発キットで…

  5. D3.js v7 で点・線・テキスト・ツールチップ・ズームを設定する方法

関連記事

PAGE TOP