配置aliyun服務(wù)器,安裝R及shiny

root密碼登入

##安裝R語(yǔ)言

sudo apt-get update

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

##發(fā)現(xiàn)是3.0版本


##安裝最新版的R

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

##加入下面的鏡像到,/etc/apt/sources.list

##deb http://mirrors.xmu.edu.cn/CRAN/bin/linux/ubuntu/? trusty/

sudo apt-get update

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

## 錯(cuò)誤W: Failed to fetch http: 403? Forbidden [IP: 112.124.140.210 80]

## 已解決,方法來(lái)自:https://www.v2ex.com/t/331412

## /etc/apt/apt.conf里

## Acquire::http::Proxy "http://mirrors.aliyun.com/";

## 注釋掉好了。


##安裝R包

R

install.packages("shiny")

install.packages("rmarkdown")

install.packages("ggplot2")

install.packages("shinydashboard")

install.packages('DT')


##安裝shiny服務(wù)器

#參考https://www.rstudio.com/products/shiny/download-server/

sudo apt-get install gdebi-core

wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.1.834-amd64.deb

sudo gdebi shiny-server-1.5.1.834-amd64.deb

#安裝完以后,參考文檔

http://docs.rstudio.com/shiny-server/

##進(jìn)入192.168.1.4:3838,如果shiny腳本不能訪問

#參考https://github.com/rstudio/shiny-server/issues/153

我做了以下得到它運(yùn)行:

sudo gedit /etc/shiny-server/shiny-server.conf

然后改run_as shiny? ? run_as username,這在我的情況run_as myname

sudo ufw allow 3838/tcp ?#允許3838端口

#重啟ok了

sudo restart shiny-server

netstat -anp #查看端口信息

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容