Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install R Studio Server on Windows

Is it possible to install RStudio Server on a Windows machine? I know that it is possible if I use AMI, but how could I install it without AMI?

I've read at http://www.r-bloggers.com/rstudio-server-part-2-pros-of-using-rstudio-server-for-a-remote-connection/ that:

"This is mainly a problem under Windows, where you need to install Cygwin to get the X server running (assuming using putty for the ssh connection). Although it works, I don’t really like installing a lot of additional software just to get a remote connection with graphic support."

But I dont get it... Any ideas?

like image 245
user1665355 Avatar asked May 28 '13 12:05

user1665355


People also ask

How do I download and install RStudio Server?

To download and install RStudio Server open a terminal window and execute the following commands (corresponding to the 32 or 64-bit version as appropriate). Note that the gdebi-core package is installed first so that gdebi can be used to install RStudio and all of its dependencies.

How to install R on Windows?

Install R on windows Step – 1: Go to CRAN R project website. Step – 2: Click on the Download R for Windows link. Step – 3: Click on the base subdirectory link or install R for the first time link.

Can I use an older version of RStudio on my computer?

RStudio requires a 64-bit operating system. If you are on a 32 bit system, you can use an older version of RStudio.

What is the best way to get started with RStudio team?

RStudio Team is a bundle of RStudio’s popular professional software for data analysis, package management, and sharing data products. Learn how RStudio's enterprise-ready pro products help data science teams securely deploy their work, collaborate, and communicate with decision makers. 1. Install R. RStudio requires R 3.0.1+. 2.


2 Answers

Install Virtual Box from here. Then get Ubuntu Server and add the iso to the virtual machine. Manage to make the Ubuntu to access the network and install RStudio Server.

That's it! Go on windows open the brower and type http://ipAddressOfUbuntu:8787/.

like image 117
Michele Avatar answered Oct 13 '22 00:10

Michele


Here are the steps I took to solve this. My setup is a Windows 10 Pro on a LAN ("host computer"). My goal is to have rstudio-server running on a ubuntu virtual machine ("guest computer", running on the windows computer, and accessible to another computer on the LAN ("remote computer").

  • Install oracle virtualbox (https://www.virtualbox.org/wiki/Downloads).
  • Set up virtualbox to run Ubuntu Server (desktop also works; details available elsewhere online - you may have to troubleshoot this, in my case, I had to disable Windows Hyper-V to get virtualbox to work).
  • Install r and rstudio-server on the virtualbox Ubuntu (details available elsewhere online).
  • Activate Windows ssh and openssh. Since I believe 2018, Windows 10 has openssh client and server built-in, but it needs to be activated. Details here: https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
  • On the Ubuntu virtualbox, run ifconfig on the terminal, find the ip address after inet. Mine was 10.0.2.15.
  • In the settings for the Ubuntu virtualbox, go to Network > Advanced. Add a rule: Host IP = 127.0.1.1; Host Port = 22; Guest IP = (what you got earlier, recall mine was 10.0.2.15); Guest Port = 22. This is so we can ssh into the guest Ubuntu from the Windows host.
  • In the Windows (host) command prompt, forward 8787 from the guest, which is on 127.0.1.1 (due to the previous step), to the host 8787. That is, run ssh -N -L 8787:localhost:8787 [email protected], where username is the name of the user on the guest (ubuntu virtualbox).
  • Now on the Windows host you should be able to go to localhost:8787 and access rstudio-server on the guest ubuntu (test this now).
  • Since openssh is running on Windows, you can now forward 8787 from a remote computer to the Windows host. To do this, first, install the ssh client on the remote computer. Then find the ip address of the Windows host on the LAN by e.g. running ipconfig on the command prompt of the Windows host computer, or looking at the router admin page. Then on the remote computer, do ssh -N -L 8787:localhost:8787 username@windowshostip, where username is your windows login. Then go to localhost:8787 on the remote computer. You should now be able to access rstudio-server on the Ubuntu guest OS running on virtualbox on the Windows host.

In principle this can be generalized to beyond LAN, if the router forwards incoming port 22 to the ip address of the windows computer to the windows computer (most routers won't do this by default, I think).

Also this should work on a MacOS as well, since both virtualbox and openssh are available there (have not tried).

like image 22
Richard DiSalvo Avatar answered Oct 13 '22 00:10

Richard DiSalvo