因为RHEL7系统中,采用firewalld防火墙除去了传统的iptables防火墙,因而对于安装Rstudio-server会与RHEL6系统或则Ubuntu不同,安装Rstudio以后centos 7 关闭防火墙,其他设备是未能通过网路登入Rstudio的,这就须要更改防火墙,本次推文,我们将详尽介绍怎样在RHEL7系统,包括CentOS系统中,安装和使用Rstudio-server。
安装R
在RHEL7中安装R比Ubuntu系统中要容易好多,尽管Ubuntu中可以借助apt安装r-base,然而这个R的版本并不是最新版的,在RHEL7中linux服务器配置与管理,只须要添加epel源,就可以直接通过yum安装最新版的R。
yum install -y epel-release
yum install -y R
安装Rstudio
这儿选择下载安装免费版的Rstudio-server,我们选择使用RedHat/CentOS系统64位版本的rpm包。
链接地址:
注意必须使用管理员root帐户安装。
#安装Rstudio
wget https://download2.rstudio.org/rstudio-server-rhel-1.1.463-x86_64.rpm
sudo yum install rstudio-server-rhel-1.1.463-x86_64.rpm
校准安装是否成功
$ rstudio-server verify-installation
$ rstudio-server status
更改防火墙
默认防火墙是关掉8787窗口centos 7 关闭防火墙,须要自动开启这个端口linux启动盘制作工具,RHEL7系统采用systemctl命令来进行处理。
systemctl enable rstudio-server.service
systemctl start rstudio-server.service
systemctl status rstudio-server
firewall-cmd --permanent --add-port=8787/tcp
firewall-cmd --permanent --add-port=8787/udp
firewall-cmd --reload
重启Rstudio-server
$ rstudio-server
Usage: rstudio-server {status|start|stop|restart|test-config|verify-installation|suspend-session|suspend-all|force-suspend-session|force-suspend-all|kill-session|kill-all|offline|online|active-sessions|version}
$ rstudio-server restart
通过浏览器登入Rstudio
不能使用管理员帐户登入Rstudio,这是由于root帐户读写权限太大,会把系统目录写的很乱,因而好多程序严禁使用管理员帐户使用。
----------END----------
(可以添加作者陌陌,备注好单位+姓名)
您可能就会感兴趣的