2016-08-12 1 views
1

私は、Red Hat Enterprise Linuxサーバー上の光沢のあるサーバが7.2をリリースセットアップする手順に従っていますR shinyserver:どのように私のアプリケーションを光沢のあるサーバーに展開するのですか?

# path to my application on server 
/home/anon/shinyapps/myapp/ 

myapp 
├── R # Rscripts 
├── data # R objects 
├── server.R 
├── ui.R 
└── www 
    └── styles.css 

# install R 
sudo yum update 
sudo yum install R 
sudo yum install libcurl-devel openssl-devel 

# change Rprofile 
sudo vi /usr/lib64/R/library/base/R/Rprofile 

# add the following to the Rprofile 
# download method 
options(download.file.method = "libcurl") 

# default CRAN mirror 
local({ 
    r <- getOption("repos") 
    r["CRAN"] <- "https://cran.rstudio.com/" 
    options(repos=r) 
}) 

# install shiny 
sudo su - -c "R -e \"install.packages('shiny')\"" 

# install shiny server 
wget https://download3.rstudio.org/centos5.9/x86_64/shiny-server-1.4.4.801-rh5-x86_64.rpm 
sudo yum install --nogpgcheck shiny-server-1.4.4.801-rh5-x86_64.rpm 

# edit config file 
/etc/shiny-server/shiny-server.conf 

これは私の設定ファイルです。私は場所で私のアプリmyappを追加します。

# Instruct Shiny Server to run applications as the user "shiny" 
run_as shiny; 

# Define a server that listens on port 3838 
server { 
    listen 3838; 

    # Define a location at the base URL 
    location/{ 

    # Host the directory of Shiny Apps stored in this directory 
    site_dir /srv/shiny-server; 

    # Log all Shiny output to files in this directory 
    log_dir /var/log/shiny-server; 

    # When a user visits the base URL rather than a particular application, 
    # an index of the applications available in this directory will be shown. 
    directory_index on; 
    } 

    # Define location at NWP URL 
    location /NWP { 

    # application directory 
    app_dir /home/anony/shinyapps/myapp; 

    simple_scheduler 10; 

    # log directory 
    log_dir /home/anon/shinyapps/myapp/logs; 

    # directory structure 
    directory_index on; 
    } 
} 

私はそれがThis site can’t be reached言うhttp://myserveraddress:3838/NWP/ために行くことによって、このアプリケーションを起動しようとしています。私は何が欠けていますか?

は、私が試したがあります

$ sudo firewall-cmd --zone=public --permanent --add-port=3838/tcp && firewall-cmd --reload 
success 
Authorization failed. 
Make sure polkit agent is running or run the application as superuser. 

$ systemctl status firewalld 
● firewalld.service - firewalld - dynamic firewall daemon 
    Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled) 
    Active: active (running) since Fri 2016-08-05 10:44:34 EDT; 1 weeks 0 days ago 
Main PID: 1032 (firewalld) 
    CGroup: /system.slice/firewalld.service 
      └─1032 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid 

これは働いていた:

sudo firewall-cmd --zone=public --add-port=3838/tcp --permanent && sudo firewall-cmd --zone=public --add-port=3838/tcp 

おかげ

+0

何 'ファイアウォール-CMD --list-ポート '戻りますか? – nrussell

+0

何も返されません。 –

+0

rootとして 'firewall-cmd --zone = public --permanent --add-port = 3838/tcp && firewall-cmd --reload'を実行してみてください。 – nrussell

答えて

1

これは働いていた:

sudo firewall-cmd --zone=public --add-port=3838/tcp --permanent && sudo firewall-cmd --zone=public --add-port=3838/tcp 
関連する問題