It has to be said that the version updates of various software systems are now so fast!
Generally speaking, the newly installed ubuntu system is too clean, lack a lot of library files, the following code runs first!
sudo apt install --fix-missing libcurl4-openssl-dev libxml2-dev libgdal-dev libssl-dev libglu1-mesa-dev libmagick++-dev libudunits2-dev
sudo apt install -y libcurl4-gnutls-dev
sudo apt install -y libxml2-dev
sudo apt install -y openssl
sudo apt install -y libssl-dev
Use root privileges (system administrator) to install the latest version of R. Our ubuntu is 20, so ** choose the code name focal, and then cran40**, the entire code is as follows:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://mirrors.ustc.edu.cn/CRAN/bin/linux/ubuntu focal-cran40/'
sudo apt update
sudo apt install r-base
In fact, you need to install some R packages with root privileges (system administrator).
Here we use root privileges (system administrator): sudo R
options()$repos
options()$BioC_mirror
# options(BioC_mirror="https://mirrors.ustc.edu.cn/bioc/")options(BioC_mirror="http://mirrors.tuna.tsinghua.edu.cn/bioconductor/")options("repos"=c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))options()$repos
options()$BioC_mirror
# https://bioconductor.org/packages/release/bioc/html/GEOquery.html
if(!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("KEGG.db",ask = F,update = F)
Generally speaking, no error will be reported, and then continue to install more packages:
BiocManager::install(c("GSEABase","GSVA","clusterProfiler"),ask = F,update = F)
BiocManager::install(c("GEOquery","limma","impute"),ask = F,update = F)
BiocManager::install(c("org.Hs.eg.db","hgu133plus2.db"),ask = F,update = F)options()$repos
install.packages('WGCNA')
install.packages(c("FactoMineR","factoextra"))
install.packages(c("ggplot2","pheatmap","ggpubr"))library("FactoMineR")library("factoextra")library(GSEABase)library(GSVA)library(clusterProfiler)library(ggplot2)library(ggpubr)library(hgu133plus2.db)library(limma)library(org.Hs.eg.db)library(pheatmap)
BiocManager::install("ChAMP")
I have to say that some R packages are really difficult to install, and I spent an afternoon, such as ChAMP, a methylation chip data processing package, as follows;
My blank ubuntu system, after all the above codes are run, there are 327 packages:
( base) jmzeng@biotrainee:/usr/local/lib/R/site-library$ du -h -d 1|tail
404 K ./ruv
3.2 M ./biovizBase
4.5 M ./colorspace
1.8 M ./prettydoc
444 K ./lazyeval
392 K ./statmod
5.2 M ./WGCNA
156 K ./generics
8.0 M ./urltools
2.9 G .
sudo apt install -y nginx curl
At the same time, you need to set the permissions of the /var/www/html folder, that is, you need to add a www-data user group, and all the users contained in it can access it.
sudo chgrp -R www-data /var/www
sudo usermod -a -G www-data jmzeng
# sudo usermod -a -G www-data ubuntu
sudo chmod -R 2770/var/www/html
At the same time, you also need to manage the port of ubuntu. After Nginx is installed, the IP can be opened in the browser in theory, but it requires the opening of the web port 80.
Ufw is a host-side iptables firewall configuration tool
sudo ufw enable #Open firewall
sudo ufw allow 80 ##Open port
sudo ufw status ###View firewall status
sudo ufw allow 8787 ##Open port
Only open the port on the server side.
Reference: https://rstudio.com/products/rstudio/download-server/debian-ubuntu/
Be sure to see the version of the ubuntu system!
sudo apt-get install gdebi-core
wget https://download2.rstudio.org/server/bionic/amd64/rstudio-server-1.3.1056-amd64.deb
sudo gdebi rstudio-server-1.3.1056-amd64.deb
On this version, I wasted at least two hours. Install shiny and rsutdio server, find the latest version on the official website
Find the address by yourself!
This, basically only if you really need to develop your own web tools, you can use it!
sudo systemctl restart shiny-server
You may need to restart frequently, check the port opening after the installation is successful: netstat -tln
Configure user groups:
sudo groupadd shiny
sudo chgrp -R shiny /srv/shiny-server/
sudo usermod -a -G shiny jmzeng
Some self-developed web gadgets can be stored in the /srv/shiny-server/ directory.
sudo chmod -R 2775/srv/shiny-server/
cd /srv/shiny-server/
mkdir -p plot123
cd plot123
mkdir lineplot dotplot scatterplot boxplot barplot histplot pieplot density
mkdir violinplot qqplot errorplot
mkdir veen upsetr heatmap circos volcano
mkdir genestructure
cd /srv/shiny-server/
mkdir analysis
cd analysis
mkdir deg det deu enrich gsea gsva wgcna timeseries pca tsne
mkdir kmsurvival cox forest
cd /srv/shiny-server/
mkdir database
cd database
mkdir tcga icgc ccle gtex encode roadmap
mkdir ncbi ucsc ensembl
cd /srv/shiny-server/
mkdir paper
cd paper
Recommended Posts