Pratik Patil Pratik Patil - 2 years ago 171
R Question

Automated Installation of R-Studio Using Shell Script

Is there any way to automate the Installation Of R-Studio on Linux Systems? It should automatically detect operating system and install R and R-Studio with required dependencies.

Answer Source

I have prepared the following shell script to make this installation fully automated.

# ******************************************
# Program: R-Studio Installation Script
# Developer: Pratik Patil
# Date: 16-04-2015
# Last Updated: 16-04-2015
# ********************************************

if [ "`lsb_release -is`" == "Ubuntu" ] || [ "`lsb_release -is`" == "Debian" ]
    sudo apt-get -y install r-base gdebi-core libapparmor1;
    sudo wget;
    sudo gdebi rstudio-server-0.98.1103-amd64.deb;

elif [ "`lsb_release -is`" == "CentOS" ] || [ "`lsb_release -is`" == "RedHat" ]
    sudo yum -y install R openssl098e;
    sudo wget;
    sudo yum -y install --nogpgcheck rstudio-server-0.98.1103-x86_64.rpm;
    echo "Unsupported Operating System";

sudo rm -f rstudio-server-*;
sudo rstudio-server verify-installation;

How to Launch R-Studio in Ubuntu or Debian Systems? Enter the following command on the terminal:


How to Launch R-Studio in CentOS or RedHat Systems? Open the Following URL in browser:


After that Login prompt will appear & then Login with the current system user credentials.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download