1
은 내가 레드햇 엔터프라이즈 리눅스 서버에 반짝 서버 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
감사
무엇을'방화벽 cmd를 --list- 포트'반환? – nrussell
아무 것도 반환하지 않습니다. –
'firewall-cmd --zone = public --permanent --add-port = 3838/tcp && firewall-cmd --reload'를 루트로 실행하십시오. – nrussell