在Debian VM上安装闪亮的服务器

时间:2016-04-29 22:05:41

标签: r ubuntu debian shiny-server

我试图在脱机的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

然后,我将“闪亮”软件包的所有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

我想知道我是否正确安装了服务器?我怎样才能“启动/停止”闪亮的服务器?

2 个答案:

答案 0 :(得分:3)

我在Debian Wheezy上一直使用闪亮服务器,但在升级到Debian Jessie时切换到自编译,因为这是每个RStudio文档推荐的路由。

要回答您的问题,使用init.d脚本管理shiny-server。要启动服务器,您应该以root身份运行/etc/init.d/shiny-server startservice shiny-server start(sudo)。

答案 1 :(得分:1)

这不是一个有光泽的问题,只是你错过了命令,stop是命令的一个选项service

您应该使用:

sudo service start shiny-server

开始吧

sudo service stop shiny-server

停止它

相关问题