centos AWS闪亮服务器无法解析

时间:2014-03-27 01:45:26

标签: r centos shiny shiny-server

使用我的Macbook使用运行centOS 6.4和R和闪亮服务器的AWS实例进行设置,并尝试找出它有什么问题,因为这个过程存在问题

# set up AWS Redhat 6.4 instance (dont forget to download .pem)
# set the .pem file into your ~/.ssh/ folder and make sure you chmod the file
chmod 400 ~/.ssh/myshinypemexample.pem

ssh到机器

ssh -i ~/.ssh/myshinypemexample.pem root@yourPublicDNS
# the first time you run this, just press yes, don't be scared :) 
# use ec2-user and log into machine
ssh -i ~/.ssh/myshinypemexample.pem ec2-user@yourPublicDNS

获取EPEL rpm

wget http://mirror.us.leaseweb.net/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm --test

导入EPEL GPG密钥

wget https://www.fedoraproject.org/static/0608B895.txt
sudo mv 0608B895.txt /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

验证密钥是否已导入。

rpm -qa gpg*
## You should see a line like this: gpg-pubkey-0608b895-4bd22942

安装rpm

sudo rpm -ivh epel-release-6-8.noarch.rpm

安装闪亮服务器

sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""

# this gives error and have to install Rcpp and httr manually

    wget http://cran.r-project.org/src/contrib/Rcpp_0.11.1.tar.gz
    sudo R CMD INSTALL --build Rcpp_0.11.1.tar.gz
    wget http://cran.r-project.org/src/contrib/httpuv_1.2.3.tar.gz
    sudo R CMD INSTALL --build httpuv_1.2.3.tar.gz

再次运行闪亮服务器

sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""

安装Shiny Server

wget http://download3.rstudio.org/centos-5.9/x86_64/shiny-server-1.0.0.42-x86_64.rpm
sudo yum install --nogpgcheck shiny-server-1.0.0.42-x86_64.rpm

# test server
sudo status shiny-server

检查示例闪亮应用

的位置
sudo R -e "system.file('examples/01_hello', package='shiny')"

[1] "/usr/lib64/R/library/shiny/examples/01_hello"

#copy example file from R to /srv as Shiny looks for this location to work
sudo cp -R /usr/lib64/R/library/shiny/examples/01_hello /srv/shiny-server/

MYIP:3838无法解决。为什么?

0 个答案:

没有答案