ユーザ用ツール

サイト用ツール


linux:shiny_server:shinyserver

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
最新のリビジョン両方とも次のリビジョン
linux:shiny_server:shinyserver [2020/03/03 12:59] – 作成 adminlinux:shiny_server:shinyserver [2020/03/03 15:05] admin
行 1: 行 1:
 ====== Shiny Server ====== ====== Shiny Server ======
  
-  * https://github.com/rstudio/shiny-server/wiki/Building-Shiny-Server-from-Source+  * [[https://github.com/rstudio/shiny-server/wiki/Building-Shiny-Server-from-Source]] 
 +  * [[https://rstudio.github.io/shiny-server/os/latest/#configuration-settings]]
  
  RでWebアプリケーションを開発するためのパッケージShinyをWebアプリケーションとして動作させるためのサーバ。オンプレミスの有償版は金額が高く、ホスティングサービスは無償アカウントもあるがデータを外部のサーバに置くのは問題が多いため、オープンソース版を使う。いくつかのOSではパッケージが用意されているが、Gentoo向けには無いのでソースからビルドする。  RでWebアプリケーションを開発するためのパッケージShinyをWebアプリケーションとして動作させるためのサーバ。オンプレミスの有償版は金額が高く、ホスティングサービスは無償アカウントもあるがデータを外部のサーバに置くのは問題が多いため、オープンソース版を使う。いくつかのOSではパッケージが用意されているが、Gentoo向けには無いのでソースからビルドする。
行 72: 行 73:
   }   }
  
 +===== 起動スクリプト =====
 +Gentoo OpenRC用の起動スクリプト。
  
 +注意点は、start-stop-daemonのオプション「--background」「--make-pidfile」をつけておくこと。
  
 +shinyは勝手にバックグラウンドにならないのでbackgroundオプションで切り離し、 pidファイルも生成しないのでmake-pidfileでpidfileオプションで指定した場所にpidファイルを吐き出させる。これでstop関数が正常に動作する。
  
 +
 +
 +  #!/sbin/openrc-run
 +  # Copyright 1999-2016 Gentoo Foundation
 +  # Distributed under the terms of the GNU General Public License v2
 +  
 +  description="R Shiny Server"
 +  pidfile="/var/run/shiny-server.pid"
 +  command="/usr/local/shiny-server/bin/shiny-server"
 +  
 +  depend() {
 +          use net
 +  }
 +  
 +  start() {
 +          ebegin "Starting Shiny Server"
 +          start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${pidfile} --exec ${command} \
 +          >> /home/shiny/log/shiny-server.log 2>&1
 +          eend $?
 +  }
 +  
 +  stop() {
 +          ebegin "Stopping Shiny Server"
 +          start-stop-daemon --stop --quiet --pidfile ${pidfile}
 +          eend $?
 +  }
  
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki