0

使用我的 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 转速

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/')\""

安装闪亮的服务器

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 无法解决。为什么?

4

0 回答 0