Rstudio server setup on Ubuntu server 16.04 with xcms and MetaboAnalystR

Update system

1
sudo apt-get update && sudo apt-get upgrade -y

Update the sources.list to include latest R dist

1
sudo sh -c "echo deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/ >> /etc/apt/sources.list"

The Ubuntu archives on CRAN are signed with the key of “Michael Rutter [email protected]” with key ID E084DAB9. To add the key to your system with one command use

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

Install R

1
sudo apt-get update && sudo apt-get install -y r-base r-base-dev

Install xcms dependencies

1
2
sudo apt-get install -y r-cran-xml
sudo apt-get install -y libcurl4-openssl-dev libxml2-dev libssl-dev build-essential software-properties-common libnetcdf-dev

Install xcms CAMERA

1
sudo R
1
2
3
4
5
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("xcms", version = "3.8")
BiocManager::install("CAMERA", version = "3.8")
BiocManager::install("msdata", version = "3.8")

Install Rstudio server

Install the current version of rstuido server(e.g.v1.1.453)

1
2
3
sudo apt-get install gdebi-core
wget https://download2.rstudio.org/rstudio-server-1.1.463-amd64.deb
sudo gdebi rstudio-server-1.1.463-amd64.deb

The service in running on default port: 8787

Install dependencies for MetaboAnalystR

For Rmpi

1
sudo apt-get install -y libopenmpi-dev

For Cairo

1
sudo apt-get install -y libcairo2-dev libxt-dev

For magick

1
2
3
sudo add-apt-repository -y ppa:opencpu/imagemagick
sudo apt-get update
sudo apt-get install -y libmagick++-dev

For rgl

1
sudo apt-get install libx11-dev libcgal-dev libglu1-mesa-dev libglu1-mesa-dev -y

For siggenes

1
2
3
4
sudo R
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("siggenes", version = "3.8")

Install Tex Live

1
sudo apt-get install texlive-full -y