This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt update | |
sudo apt upgrade -y | |
sudo apt install postgresql postgresql-contrib -y | |
#To allow database to be accessed remotely follow this https://linuxize.com/post/how-to-install-postgresql-on-ubuntu-18-04/ | |
#you need to edit the follwoing 2 files using vim - the most difficult part, vim instructions here https://vim.rtorr.com/ | |
#sudo vim /etc/postgresql/10/main/postgresql.conf | |
sudo sed -i s/"#listen_addresses = 'localhost'"/"listen_addresses = '*' "/g /etc/postgresql/12/main/postgresql.conf | |
#sudo vim /etc/postgresql/10/main/pg_hba.conf | |
sudo sed -i '[email protected]/[email protected]/0@' /etc/postgresql/12/main/pg_hba.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: SKS 1.1.6 | |
Comment: Hostname: keyserver.ubuntu.com | |
mQENBEy9tcUBCACnWQfqdrcz7tQL/iCeWDYSYPwXpPMUMLE721HfFH7d8ErunPKPIwq1v4Cr | |
NmMjcainofbu/BfuZESSK1hBAItOk/5VTkzCJlzkrHY9g5v+XlBMPDQC9u4AE/myw3p52+0N | |
XsnBz+a35mxJKMl+9v9ztvueA6EmLr2xaLf/nx4XwXUMSi1Lp8i8XpAOz/Xg1fspPMRhuDAG | |
YDnOh4uH1jADGoqYaPMty0yVEmzx74qvdIOvfgj16A/9LYXk67td6/JQ5LFCZmFsbahAsqi9 | |
inNgBZmnfXO4m4lhzeqNjJAgaw7Fz2zqUmvpEheKKClgTQMWWNI9Rx1L8IKnJkuKnpzHABEB | |
AAG0I01pY2hhZWwgUnV0dGVyIDxtYXJ1dHRlckBnbWFpbC5jb20+iQE+BBMBAgAoAhsjBgsJ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt upgrade -y | |
sudo apt install postgresql postgresql-contrib -y | |
sudo apt install vim -y | |
#To allow database to be accessed remotely follow this https://linuxize.com/post/how-to-install-postgresql-on-ubuntu-18-04/ | |
#you need to edit the follwoing 2 files using vim - the most difficult part, vim instructions here https://vim.rtorr.com/ | |
#sudo vim /etc/postgresql/10/main/postgresql.conf | |
sudo sed -i s/"#listen_addresses = 'localhost'"/"listen_addresses = '*' "/g /etc/postgresql/10/main/postgresql.conf | |
#sudo vim /etc/postgresql/10/main/pg_hba.conf | |
sudo sed -i '[email protected]/[email protected]/0@' /etc/postgresql/10/main/pg_hba.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su - -c "R -e \"install.packages('devtools', repos='http://cran.rstudio.com/')\"" | |
sudo su - -c "R -e \"install.packages('tidyverse', repos='http://cran.rstudio.com/')\"" | |
sudo su - -c "R -e \"install.packages('pacman', repos='http://cran.rstudio.com/')\"" | |
sudo su - -c "R -e \"install.packages('ProjectTemplate', repos='http://cran.rstudio.com/')\"" | |
sudo su - -c "R -e \"install.packages('rio', repos='http://cran.rstudio.com/')\"" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# after installing centos7 Compute Machine option | |
sudo yum install epel-release -y | |
sudo yum update -y | |
sudo yum install net-tools -y | |
sudo shutdown -r now | |
sudo yum install R -y | |
sudo yum install wget -y | |
wget https://download2.rstudio.org/rstudio-server-rhel-1.1.419-x86_64.rpm | |
sudo yum install rstudio-server-rhel-1.1.419-x86_64.rpm -y | |
sudo systemctl status rstudio-server.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install epel-release | |
sudo yum update | |
sudo shutdown -r now | |
sudo yum install R -y | |
cd | |
wget https://download2.rstudio.org/rstudio-server-rhel-1.0.136-x86_64.rpm | |
sudo yum install --nogpgcheck rstudio-server-rhel-1.0.136-x86_64.rpm -y | |
sudo systemctl status rstudio-server.service | |
sudo systemctl enable rstudio-server.service | |
sudo firewall-cmd --permanent --zone=public --add-port=8787/tcp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list' | |
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 | |
gpg -a --export E084DAB9 | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get -y install r-base libapparmor1 libcurl4-gnutls-dev libxml2-dev libssl-dev gdebi-core | |
sudo apt-get install libcairo2-dev | |
sudo apt-get install libxt-dev | |
sudo apt-get install git-core | |
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ipak function: install and load multiple R packages. | |
# check to see if packages are installed. Install them if they are not, then load them into the R session. | |
ipak <- function(pkg){ | |
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])] | |
if (length(new.pkg)) | |
install.packages(new.pkg, dependencies = TRUE) | |
sapply(pkg, require, character.only = TRUE) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^.*\.Rproj$ | |
^\.Rproj\.user$ |