Install R Studio Server on Windows

前端 未结 3 750
暖寄归人
暖寄归人 2021-02-04 07:55

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.

相关标签:
3条回答
  • 2021-02-04 08:32

    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://docs.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 username@127.0.1.1, 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).

    0 讨论(0)
  • 2021-02-04 08:52

    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/.

    0 讨论(0)
  • 2021-02-04 08:55

    I've used it on ubuntu and want to share with mates on windows...

    Actually found it is possible through Docker: https://hub.docker.com/r/rocker/rstudio/

    0 讨论(0)
提交回复
热议问题