- 전체
- Sample DB
- database modeling
- [표준 SQL] Standard SQL
- G-SQL
- 10-Min
- ORACLE
- MS SQLserver
- MySQL
- SQLite
- postgreSQL
- 데이터아키텍처전문가 - 국가공인자격
- 데이터 분석 전문가 [ADP]
- [국가공인] SQL 개발자/전문가
- NoSQL
- hadoop
- hadoop eco system
- big data (빅데이터)
- stat(통계) R 언어
- XML DB & XQuery
- spark
- DataBase Tool
- 데이터분석 & 데이터사이언스
- Engineer Quality Management
- [기계학습] machine learning
- 데이터 수집 및 전처리
- 국가기술자격 빅데이터분석기사
- 암호화폐 (비트코인, cryptocurrency, bitcoin)
stat(통계) R 언어 RStudio Server: 서버 구성과 관리
2018.07.09 12:23
RStudio Server: 서버 구성과 관리
RStudio 는 아래의 두개 파일 외에 딱히 설정 할 것이 없다.
/etc/rstudio/rserver.conf
/etc/rstudio/rsession.conf
설정 파일을 수정한 후에는 전체적으로 설정을 확인하기 위해 체크가 필요하다.
$ sudo rstudio-server verify-installation
네트워크 포트와 주소
기본적으로 RStudio는 웹접속을 위해 8787을 사용하는 데 이는 /etc/rstudio/rserver.conf 에서 www-port 로 설정이 가능하다.
www-port=80
By default RStudio binds to address 0.0.0.0 (accepting connections from any remote IP). You can modify this behavior using the www-address entry. For example:
www-address=127.0.0.1
Note that after editing the /etc/rstudio/rserver.conf file you should always restart the server to apply your changes (and validate that your configuration entries were valid). You can do this by entering the following command:
$ sudo rstudio-server restart
외부 라이브러리
You can add elements to the default LD_LIBRARY_PATH for R sessions (as determined by the R ldpaths script) by adding an rsession-ld-library-path entry to the server config file. This might be useful for ensuring that packages can locate external library dependencies that aren't installed in the system standard library paths. For example:
rsession-ld-library-path=/opt/local/lib:/opt/local/someapp/lib
R 버전 명시
By default RStudio Server runs against the version of R which is found on the system PATH (using which R). You can override which version of R is used via the rsession-which-r setting in the server config file. For example, if you have two versions of R installed on the server and want to make sure the one at /usr/local/bin/R is used by RStudio then you would use:
rsession-which-r=/usr/local/bin/R
Note again that the server must be restarted for this setting to take effect.
사용자 제한 설정
There are a number of settings which place limits on which users can access RStudio and the amount of resources they can consume. This file does not exist by default so if you wish to specify any of the settings below you should create the file.
To limit the users who can login to RStudio to the members of a specific group, you use the auth-required-user-group setting. For example:
auth-required-user-group=rstudio_users
추가 설정
There is a separate /etc/rstudio/rsession.conf configuration file that enables you to control various aspects of R sessions (note that as with rserver.conf this file does not exist by default). These settings are especially useful if you have a large number of potential users and want to make sure that resources are balanced appropriately.
세션 타임아웃
By default if a user hasn't issued a command for 2 hours RStudio will suspend that user's R session to disk so they are no longer consuming server resources (the next time the user attempts to access the server their session will be restored). You can change the timeout (including disabling it by specifying a value of 0) using the session-timeout-minutes setting. For example:
session-timeout-minutes=30
Note that a user's session will never be suspended while it is running code (only sessions which are idle will be suspended).
패키지 라이브러리 경로
By default RStudio sets the R_LIBS_USER environment variable to ~/R/library. This ensures that packages installed by end users do not have R version numbers encoded in the path (which is the default behavior). This in turn enables administrators to upgrade the version of R on the server without reseting users installed packages (which would occur if the installed packages were in an R-version derived directory).
If you wish to override this behavior you can do so using the r-libs-user settings. For example:
r-libs-user=~/R/packages
CRAN Repository
Finally, you can set the default CRAN repository for the server using the r-cran-repos setting. For example:
r-cran-repos=https://mirrors.nics.utk.edu/cran/
Note again that the above settings should be specified in the /etc/rstudio/rsession.conf file (rather than the aforementioned rserver.conf file).
시작과 종료
If you installed RStudio using a package manager binary (e.g. a Debian package or RPM) then RStudio is automatically registred as a deamon which starts along with the rest of the system. On Debian, Ubuntu, and RedHat/CentOS 6 this registration is performed using an Upstart script at /etc/init/rstudio-server.conf. On other systems including RedHat/CentOS 5 an init.d script is installed at /etc/init.d/rstudio-server.
To manually stop, start, and restart the server you use the following commands:
$ sudo rstudio-server stop
$ sudo rstudio-server start
$ sudo rstudio-server restart
세션 관리
There are a number of administrative commands which allow you to see what sessions are active and request suspension of running sessions (note that session data is not lost during a suspend).
To list all currently active sessions:
$ sudo rstudio-server active-sessions
To suspend an individual session:
$ sudo rstudio-server suspend-session <pid>
To suspend all running sessions:
$ sudo rstudio-server suspend-all
The suspend commands also have a "force" variation which will send an interrupt to to the session to request the termination of any running R command:
$ sudo rstudio-server force-suspend-session <pid>
$ sudo rstudio-server force-suspend-all
The force-suspend-all command should be issued immediately prior to any reboot so as to preserve the data and state of active R sessions accross the restart.
서버 오프라인과 온라인 변경
If you need to perform system maintenance and want users to receive a friendly message indicating the server is offline you can issue the following command:
$ sudo rstudio-server offline
When the server is once again available you should issue this command:
$ sudo rstudio-server online
버전 업그레이드
If you perform an upgrade of RStudio Server using a package manager binary (e.g. a Debian package or RPM) and a version of RStudio Server is currently running, then the upgrade process will also ensure that active sessions are immediately migrated to the new version. This includes the following behavior:
- Running R sessions are suspended so that future interactions with the server automatically launch the updated R session binary
- Currently connected browser clients are notified that a new version is available and automatically refresh themselves.
- The core server binary is restarted
출처:
https://support.rstudio.com/hc/en-us/articles/200552316-Running-with-a-Proxy/
https://support.rstudio.com/hc/en-us/articles/200532327-Configuring-the-Server
출처: http://bhjo0930.tistory.com/entry/RStudio-Server-서버-구성과-관리 [둘러가기]
출처: http://bhjo0930.tistory.com/entry/RStudio-Server-서버-구성과-관리 [둘러가기]
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
댓글 0
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|
| 공지 | 오라클 기본 샘플 데이터베이스 | 졸리운_곰 | 2014.01.02 | 86308 |
| 공지 | [SQL컨셉] 서적 "SQL컨셉"의 샘플 데이타 베이스 SAMPLE DATABASE of ORACLE | 가을의 곰을... | 2013.02.10 | 78761 |
| 공지 | [G_SQL] Sample Database | 가을의 곰을... | 2012.05.20 | 95509 |
| 7 |
Data Models for Supply Chains
| 졸리운_곰 | 2019.06.16 | 1702 |
| 6 |
Understanding the Supply Chain Warehouse Structure
| 졸리운_곰 | 2019.06.16 | 2177 |
| 5 |
데이터베이스 진단의 핵심기법
| 졸리운_곰 | 2018.09.11 | 2092 |
| 4 | Database 네이밍 룰(Naming rule) | 졸리운_곰 | 2018.05.14 | 1653 |
| 3 |
이력 관리란 ? [sql 테이블] 이력관리 처리 history 테이블
| 졸리운_곰 | 2018.01.11 | 5083 |
| 2 |
아는 사람만 아는 데이터 동기화 기술
| 졸리운_곰 | 2017.05.05 | 1733 |
| 1 |
주위의 데이터를 테이블로 만든다
| 졸리운_곰 | 2017.01.30 | 2488 |

