参考:
https://blog.csdn.net/po_int/article/details/80232225
https://www.cnblogs.com/adawong/articles/7412507.html
https://rstudio.com/products/rstudio/download-server/debian-ubuntu/
https://blog.csdn.net/jhr112/article/details/105619984/
https://blog.csdn.net/FontThrone/article/details/80413685
安装:ubuntu 16 下安装
sudo apt-get install gdebi-core
wget https://download2.rstudio.org/server/xenial/amd64/rstudio-server-1.3.1093-amd64.deb
sudo gdebi rstudio-server-1.3.1093-amd64.deb
前面都是用root账号在安装操作,但RStudio Server基于安全考虑不允许使用root账号登录,因此,我们需要创建一个新的账号来使用RStudio Server。
例如创建账号用户名为jhr,然后设置密码,输入两遍进行确认。
useradd jhr
passwd jhr
RStudio Server 默认开启的端口是8787,所以只要用浏览器打开服务器ip地址:8787地址,就可以使用RStudio Server了。如用谷歌浏览器打开192.168.91.100:8787,界面如下,出现登录界面。
RStudio Server使用
#以下操作需root权限
rstudio-server restart #重启
rstudio-server start #启用
rstudio-server stop #停止
rstudio-server offline #服务下线;
rstudio-server online #服务上线
#管理RStudio-server进程:
#查看运行中的R进程:
rstudio-server active-sessions
#指定PID, 停止运行中的R进程:
rstudio-server suspend-session 6666
#停止所有运行中的R进程:
rstudio-server suspend-all
#强制停止运行中的R进程,此操作优先级最高,立刻执行:
rstudio-server force-suspend-session <pid>
rstudio-server force-suspend-all
当登陆网页版的RStudio,显示error : unable to connect to service 或者rstudio initialization error: unable to connect to service,
赋权限:usermod -g root rstudio
以上是国内的人 处理方法 没用
去国外的论坛找了下 方法
解决 :
参考:
https://stackoverflow.com/questions/42690144/rstudio-server-on-ubuntu-16-04-2-lts-rstudio-initialization-error-unable-to-co
This is most likely Permission for the home directory of the system user that you are trying to use to login to rstudio. lets assume that the username is “rstudio_user”. simply make sure that you have a home directory created for this user and this user has full permissions or ownership permission to access the directory.
At least for my experience, when I created the username, the username didn’t have a home directory. so simply follow the below
sudo mkdir /home/你的用户名
sudo chown -R 用户名 用户名文件夹
sudo chown -R fangxiao /home/fangxiao
参考:https://blog.csdn.net/syr1136877833/article/details/85854262?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-1.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-1.control