R在ubuntu16.04上环境搭建
阅读原文时间:2023年07月08日阅读:1

1、R安装

sudo apt-get update
sudo apt-get remove vim-common
sudo apt-get install vim

apt-cache show r-base
sudo vi /etc/apt/sources.list
----------------
deb https://cloud.r-project.org//bin/linux/ubuntu xenial/
----------------
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt-get update
sudo apt-get install r-base r-base-dev

2、Rstudio安装

R --version
sudo apt-get install gdebi-core
sudo wget https://download2.rstudio.org/rstudio-server-1.0.153-amd64.deb
sudo gdebi rstudio-server-1.0.153-amd64.deb

登陆网址为:addr ip:8787

帐号密码为:Linux系统用户登录帐号密码

后面内容未做更正,暂时忽略

mengfei@fly:~$ sudo find /. -name rstudio*
/./home/mengfei/rstudio-server-1.0.143-amd64.deb
mengfei@fly:~$ sudo find /. -name rserver*
/./usr/lib/rstudio-server/bin/rserver
/./usr/lib/rstudio-server/bin/rserver-pam
/./etc/rstudio/rserver.conf
mengfei@fly:~$ sudo rm -rf /usr/lib/rstudio-server/
mengfei@fly:~$ sudo rm -rf /etc/rstudio/

之前用purge和remove都未删除干净

3、Microsoft R Open安装

wget http://mran.microsoft.com/install/mro/3.3.2/microsoft-r-open-3.3.2.tar.gz
tar xf microsoft-r-open-3.3.2.tar.gz
cd microsoft-r-open
sudo ./install.sh

卸载Microsoft R Open

sudo apt-get remove microsoft-r-open-*
rm -rf /usr/lib64/microsoft-r/3.3

更换Microsoft R Open版本

xxx@xxx:/etc/rstudio$ sudo vi rserver.conf
rsession-which-r=/usr/lib64/microsoft-r/3.3/lib64/R
sudo rstudio-server restart

更换R版本

rsession-which-r=/usr/local/bin/R

4、git安装

http://blog.csdn.net/xiemanr/article/details/53405556

sudo apt-get install git
ssh-keygen -t rsa
cat /home/guest/.ssh/id_rsa.pub

rsa密匙对