william

Keep Calm and Markdown.

Rstudio server with ldap

To install Rstudio in CentOS system, we need to run following commands:

1
2
3
4
5
wget https://download2.rstudio.org/server/centos7/x86_64/rstudio-server-rhel-1.4.1717-x86_64.rpm
yum install rstudio-server-rhel-1.4.1717-x86_64.rpm
sudo rstudio-server restart

sudo cp /etc/pam.d/login /etc/pam.d/rstudio

R:nanotime

1
2
3
4
5
6
7
8
library(nanotime)

options("nanotimeTz"="Asia/Shanghai")
options("nanotimeFormat"="%Y-%m-%d %H:%M:%E9S %Z")

## 2021-08-07 15:00:54.080453230
nanotime(1628319654080453230)
[1] 2021-08-07 15:00:54.080453120 CST

Docker 无法运行 systemctl

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 启动的时候添加 /sbin/init
## 不是 /usr/sbin/init/ 因为有可能找不到
docker run --name rshiny -dit --privileged=true -p 58787:8787 -p 53838:3838 -p50022:22 wuya-centos7-r4.0:v1.0 /sbin/init

docker run --name rshiny -dit --privileged=true -p 58787:8787 -p 53838:3838 -p50022:22 192.168.1.88:5000/wuya/centos7-r4.0:v1.0 /sbin/init

## 运行的时候添加 bash
docker exec -it rshiny bash

sudo systemctl start rstudio-server
sudo systemctl start shiny-server
0%