簡體   English   中英

在Debian VM上安裝閃亮的服務器

[英]Installing shiny server on Debian VM

我試圖在脫機Debian VM上托管閃亮的應用程序。 因此,首先,我在VM上安裝了帶有apt-get的R-version 3.1.1:

$ sudo apt-get update
$ sudo apt-get install r-base
$ sudo apt-get install r-base-dev

然后,我從本地將“ shiny”包的所有tar.gz文件(包括所有依賴項)從本地scp到VM,並使用“ R CMD ...”成功安裝它們。 之后,我運行以下命令來安裝“ gdebi”,並使用它為閃亮的服務器安裝“ shiny-server-1.3.0.403-amd64.deb”。

$ sudo apt-get install gdebi-core
$ sudo gdebi shiny-server-1.3.0.403-amd64.deb

第一次返回錯誤,表明缺少依賴項:

Reading package lists... Done
Building dependency tree        
Reading state information... Done
Building data structures... Done 
Building data structures... Done 
This package is uninstallable
Dependency is not satisfiable: libssl0.9.8

然后,我跟隨另一篇文章,將以下行添加到“ etc / apt / sources.list”文件中,然后使用“ apt-get”安裝缺少的依賴項:

 deb http://security.ubuntu.com/ubuntu lucid-security main

 $ sudo apt-get install libssl0.9.8
 Reading package lists... Done
 Building dependency tree       
 Reading state information... Done
 The following NEW packages will be installed:
 libssl0.9.8
 0 upgraded, 1 newly installed, 0 to remove and 26 not upgraded.
 Need to get 988 kB of archives.
 After this operation, 2,408 kB of additional disk space will be used.
 WARNING: The following packages cannot be authenticated!
 libssl0.9.8
 Install these packages without verification? [y/N] y
 Get:1 http://security.ubuntu.com/ubuntu/ lucid-security/main libssl0.9.8 amd64 0.9.8k-7ubuntu8.27 [988 kB]
 Fetched 988 kB in 1s (902 kB/s)      
 Preconfiguring packages ...
 Selecting previously unselected package libssl0.9.8.
 (Reading database ... 46468 files and directories currently installed.)
 Preparing to unpack .../libssl0.9.8_0.9.8k-7ubuntu8.27_amd64.deb ...
 Unpacking libssl0.9.8 (0.9.8k-7ubuntu8.27) ...
 Setting up libssl0.9.8 (0.9.8k-7ubuntu8.27) ...
 Processing triggers for libc-bin (2.19-18+deb8u3) ...

看來可行,我安裝了“ shiny-server-1.3.0.403-amd64.deb”:

$ sudo gdebi shiny-server-1.3.0.403-amd64.deb
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Building data structures... Done 
Building data structures... Done 

Shiny Server
Shiny Server is a server program from RStudio, Inc. that makes Shiny applications available over the web. Shiny is a web application framework for the R statistical computation language.
Do you want to install the software package? [y/N]:y
Selecting previously unselected package shiny-server.
(Reading database ... 46487 files and directories currently installed.)
Preparing to unpack shiny-server-1.3.0.403-amd64.deb ...
Unpacking shiny-server (1.3.0.403) ...
Setting up shiny-server (1.3.0.403) ...
Creating user shiny
grep: /etc/init/shiny-server.conf: No such file or directory
Adding LANG to /etc/init.d/shiny-server, setting to en_US.UTF-8

但是,當我嘗試從終端“停止/啟動”閃亮的服務器時,cli無法識別該命令:

$ sudo stop shiny-server
sudo: stop: command not found

我想知道我是否正確安裝了服務器? 如何“啟動/停止”閃亮服務器?

我一直在Debian Wheezy上以這種方式使用Shiny-server,但是在升級到Debian Jessie時切換到自編譯,因為這是RStudio文檔中推薦的路由。

為了回答您的問題,使用init.d腳本管理Shiny-server。 要啟動服務器,您應該以根用戶身份(sudo)運行/etc/init.d/shiny-server startservice shiny-server start

這不是一個閃亮的問題,只是您缺少命令,停止是命令服務的一個選項

您應該使用:

sudo service start shiny-server

啟動它

sudo service stop shiny-server

阻止它

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM