centos7中安装Rstudio-server

发布时间 2023-07-19 16:58:23作者: 小鲨鱼2018

 

001、系统

(base) [root@PC1 home]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

 

002、安装R

(base) [root@PC1 home]# yum -y install epel-release
(base) [root@PC1 home]# yum -y install R

 

003、测试R

(base) [root@PC1 home]# R --version
R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.

 

004、下载Rstudio-server安装包并安装

官网:https://posit.co/

a、

 

b、

 

c、

 

d、

 

e、

 

如下:

(base) [root@PC1 software]# wget https://download2.rstudio.org/server/centos7/x86_64/rstudio-server-rhel-2023.06.1-524-x86_64.rpm
(base) [root@PC1 software]# sudo yum install rstudio-server-rhel-2023.06.1-524-x86_64.rpm

 

005、检测rstudio-server服务状态

(base) [root@PC1 software]# systemctl status rstudio-server

 

006、检测8787端口是否开启

(base) [root@PC1 software]# firewall-cmd --query-port=8787/tcp
no

 

007、开启8787端口

(base) [root@PC1 software]# firewall-cmd --permanent --zone=public --add-port=8787/tcp
success
(base) [root@PC1 software]# firewall-cmd --reload
success
(base) [root@PC1 software]# firewall-cmd --query-port=8787/tcp
yes

 

008、查看ip

(base) [root@PC1 software]# ifconfig | head
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.254.131  netmask 255.255.255.0  broadcast 192.168.254.255
        inet6 fe80::e081:3b3a:face:5663  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:0e:ae:56  txqueuelen 1000  (Ethernet)
        RX packets 939987  bytes 1368794308 (1.2 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 92263  bytes 7126455 (6.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

 

009、网页登录