1. shiny server简介

shiny-server是一种可用把R 语言以web形式展示的服务,其实RStudio公司自己构建了R Shiny Application运行的平台(http://www.shinyapps.io/ ), 用户可以通过RStudio上面的工具把自己编写调试好的Shiny Application上传到shinyapps.io上去(这里需要先注册和设置些东西)。这样构建了一个云端的服务器。但是有时还是有必要自己去构建一个自己的Shiny 服务器,这样操作起来还是方便些。下面就讲讲如何在自己的服务器上构建Shiny Server。

环境:ubuntu14.04

下载:shiny-server的地址

2. 安装步骤

2.1  安装libpng,x11相关支持包

由于ubuntu默认是不支持png 以及X11(redhat,centos也会有同样的问题)

所以安装R语言前需要安装libpng,x11相关包,命令如下

bonnie@bonnie0:~$ sudo apt-get install build-essential gcc g++ autoconf libiconv-hook-dev libmcrypt-dev libxml2-dev libmysqlclient-dev libcurl4-openssl-dev libjpeg8-dev libpng12-dev libfreetype6-dev

bonnie@bonnie0:~$ sudo apt-get install libX11-dev libXext-dev libXtst-dev libXrender-dev libxmu-dev libxmuu-dev

2.2 安装R语言 验证X11 ,libpng支持

bonnie@bonnie0:~$ sudo apt-get install r-base

在命令行输入R进入R语言shell

bonnie@bonnie0: R

R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> capabilities()
    jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets
    TRUE     TRUE     TRUE     TRUE     TRUE    FALSE     TRUE     TRUE
  libxml     fifo   cledit    iconv      NLS  profmem    cairo
    TRUE     TRUE     TRUE     TRUE     TRUE     TRUE     TRUE

PS:如果你不是在ubuntu本机操作登陆,而是远程通过ssh登录时,ssh username@ip地址 要加 -X, 否则X11会显示FALSE

2.2 在R中安装shiny模块

在R命令行中运行 install.packages("shiny")

> install.packages("shiny")

运行成功后(ctl + C)退出R界面

2.3 安装shiny-server

bonnie@bonnie0:~$ sudo apt-get install gdebi-core

bonnie@bonnie0:~$ wget https://download2.rstudio.org/rstudio-server-1.0.44-amd64.deb

bonnie@bonnie0:~$ sudo gdebi rstudio-server-1.0.44-amd64.deb

2.4 启动与关闭 shiny-server

start shiny-server        # 启动
stop shiny-server      # 停止
restart shiny-server     # 重启
status shiny-server     #查看状态 
reload shiny-server     #不中断服务的前提下 更新加载配置项

2.5 登陆web界面查看运行情况

http://10.211.55.16:3838/   默认端口时3838,可以在配置文件(/etc/shiny-server/shiny-server.conf)中修改

SHINY-SERVER R(sparkR)语言web解决方案 架设shiny服务器的更多相关文章

  1. shiny server SparkR web展示界面(二)

    1.  需要先在Mac OS中安装好R,Rstudio中,这个比较简单,掠过 2. 下载编译好的spark(spark-2.0.0-bin-hadoop2.6.tgz)可以在Spark官网下载到你所需 ...

  2. shiny server SparkR web展示界面(一)

    1. shiny server简介 shiny-server是一种可用把R 语言以web形式展示的服务,下面就讲讲如何在自己的服务器上构建Shiny Server.下一篇主要介绍如何集成sparkR后 ...

  3. 大数据平台R语言web UI应用架构 设计与开发

    1. 系统拓扑图 在日常业务分析中,R是非常常用的分析工具,而当数据量较大时,用R语言需要需用更多的时间来完成训练模型,spark作为大规模数据处理框架,采用内存计算,可以短时间内完成大量的数据的处理 ...

  4. 编程语言 : Java的动态Web解决方案泛谈

    文章概述 最近发现很久前一股脑地学习框架,发觉越发迷糊.知道了框架只是暂时的,重点是基础的技术.该文大篇幅回顾Servlet技术栈和简要的MVC框架. 至于为什么学J2EE,额,大家都用框架,可框架也 ...

  5. Go语言Web框架gwk介绍 1

    Go语言Web框架gwk介绍 (一)   今天看到Golang排名到前30名了,看来关注的人越来越多了,接下来几天详细介绍Golang一个web开发框架GWK. 现在博客园支持markdown格式发布 ...

  6. 在CentOS上安装和部署Shiny Server

    1.安装R: sudo yum install R 2.安装Shiny的R包: sudo su - \ -c "R -e \"install.packages('shiny', r ...

  7. Go语言Web框架gwk介绍4

    Go语言Web框架gwk介绍 (四)   事件 gwk支持事件系统,但并没有硬编码有哪些事件,而是采用了比较松散的定义方式. 订阅事件有两种方式: 调用On函数或者OnFunc函数 func On(m ...

  8. Go语言Web框架gwk介绍 3

    Go语言Web框架gwk介绍 (三)   上一篇忘了ChanResult ChanResult 可以用来模拟BigPipe,定义如下 type ChanResult struct { Wait syn ...

  9. Go语言Web框架gwk介绍2

    Go语言Web框架gwk介绍 (二) HttpResult 凡是实现了HttpResult接口的对象,都可以作为gwk返回Web客户端的内容.HttpResult接口定义非常简单,只有一个方法: ty ...

随机推荐

  1. oracle全文检索

    全文检索 oracle对使用几十万以上的数据进行like模糊查询速度极差,包括 like 'AAA%' ,like '%AAA',like '%AAA%',like '%A%A%'的那些模糊查询.网上 ...

  2. Linux系统编程-setitimer函数

    功能:linux系统编程中,setitimer是一个经常被使用的函数,可用来实现延时和定时的功能. 头文件:sys/time.h 函数原型: int setitimer(int which, cons ...

  3. mysql学习(二)

    (1)存储过程:存储过程是SQL语句和控制语句的预编译集合,以一个名称存储并作为一个单元处理: (2)存储过程优点:增强SQL语句的功能和灵活性,实现较快的执行速度,减少网络流量: (3)存储过程结构 ...

  4. 时间转换为yyyymmdd

    Convert.ToDateTime(tbinpici.Text).ToString("yyyyMMdd")

  5. JProfiler使用入门(一)——准备工作

      JProfiler是一个全功能的Java剖析工具(profiler),主要用于检查和跟踪系统(限于Java开发的)的性能. JProfiler可以通过时时的监控系统的内存使用情况,随时监视垃圾回收 ...

  6. canvas像素操作

    像素操作 相关方法:getImageData(x,y,w,h);  putImageData(oImg,x,y);  createImageData(w,h); 1.getImageData(x,y, ...

  7. js资源

    http://www.oschina.net/p/ace-editor https://git.oschina.net/pandao/editor.md/blob/master/editormd.js ...

  8. hadoop2.0单机安装

    hadoop发行的版本:apache hadoop;HDP;CDH -----这里只使用apache hadoop---可以在网站hadoop.apache.org网站上找到 hadoop安装方式:自 ...

  9. [Ng]Angular应用点概览

      1. 使用模块化写法. var app = angular.module('myApp', []); app.controller('TextController', function($scop ...

  10. who is the middle

    Description FJ is surveying his herd to find the most average cow. He wants to know how much milk th ...