質問

I got a 64-bit ubuntu instance running on Amazon EC2, and then followed the instructions here to get the shiny server (for R) running. Next I ran

cd /var/shiny-server/www
sudo git clone https://github.com/trestletech/shiny-sandbox.git .

as instructed here to put a simple example shiny application within reach of the shiny server. (I also used scp to move a second toy set of shiny application files, server.R and ui.R into a folder in my home directory.)

Finally, I want to access my shiny apps from a browser, as if I were an ordinary web user. However (obviously) I know next to nothing about how web pages,servers, and addresses conspire to make the internet work. How can I visit my server/app?

This page suggested entering

http://<your amazon machine name>:3838/

in a browser. I've tried substituting several things in for <your amazon machine name> including the public and private IP address, my Amazon "instance ID", my "Public DNS", but none of these things results in a web page loading.

役に立ちましたか?

解決

A couple of things you'll need to check:

  1. Try this guide instead of the one you referenced. The link you provide is older and suggests using an older directory that isn't used anymore (/var/...). Nowadays shiny-server expects your applications to be hosted in /srv/shiny-server. And actually, if you're using the recently released version 1.1 of Shiny Server, there should be some content at http://<server address>:3838/ without you having to even deploy any apps yet. But, of course, feel free to setup your applications first.
  2. On EC2, you need to worry about "security groups" which control how your machine can be accessed. In particular, you need to make sure that port 3838 is open on your server.
  3. Your "Public DNS" entry is probably the safest way to get to your server.
  4. If you're still not having any luck, you can check the server log in /var/log/shiny-server.log to see if there are any helpful error messages there and post them back here.

他のヒント

There is some outdated blog posts so first time installs inevitably end up getting terminated.. As Jeff mentioned, shiny will be looking for apps in /srv. Try this: sudo cp -R /usr/local/lib/R/site-library/shiny/examples/01_hello /srv/shiny-server/ Also, may be useful, for Ubuntu 12.04 did you sort out the sources.list file before installing R? Can copy paste the below in Terminal.

########################################
# UBUNTU CONFIG 
######################################## 
# useful: http://withr.me/blog/2013/07/23/configure-shiny-server-under-ubuntu/
## Unlike other Linux, need to follow the following steps to install R on Ubuntu:
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
## Open sources.list, and add the repository deb http://<myFAVcran>/linux/ubuntu precise/ to its end, 
deb http://cran.csiro.au/bin/linux/ubuntu precise/
## Where precise means the R version for Ubuntu 12.04. 
## Note, if you use ‘nano’ as the editor, press Ctrl+X to exit nano editor and press Y to save the change, then press Enter.
sudo nano /etc/apt/sources.list
## Update Ubuntu, and install R.
sudo apt-get update
sudo apt-get install r-base r-base-dev
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top