简体   繁体   English

使用AWS EC2实例登录RStudio

[英]Log in RStudio with AWS EC2 instance

I managed to follow all the steps to create EC2 instance and install R Server on it. 我设法遵循了创建EC2实例并在其上安装R Server的所有步骤。

But now when I go to RStudio to connect (which looks something like "ec2-[ Public IP ]-.eu-west-3.compute.amazonaws.com:8787") I am asked a username and a password but I did not configure any: 但是现在当我去RStudio进行连接时(看起来像“ ec2- [ Public IP ]-。eu-west-3.compute.amazonaws.com:8787”),我被问到用户名和密码,但是我没有配置任何:

在此处输入图片说明

I tried rstudio (username) and rstudio (password) but it does not work. 我尝试了rstudio(用户名)和rstudio(密码),但是它不起作用。 Anyone knows how I can find the username and the password to connect? 有人知道如何找到要连接的用户名和密码吗? Thanks. 谢谢。 M 中号

You can create a user/password in Linux and use it to log in 您可以在Linux中创建用户/密码并使用它登录

#add user(s)
useradd username
echo username:password | chpasswd 

here is a detailed blog from on running R on AWS 这是有关在AWS运行R的详细博客

If this is using the AMI from http://www.louisaslett.com/RStudio_AMI/ , the default password recently changed to the instance ID of the EC2. 如果这是使用http://www.louisaslett.com/RStudio_AMI/中的AMI,则默认密码最近已更改为EC2的实例ID。 A code starting with i- and 17 alphanumeric characters, for example. 例如,以i-和17个字母数字字符开头的代码。

Username is still rstudio . 用户名仍然是rstudio

I was having the same issue (I believe there is no ubuntu password for an AWS EC2 Instance and R studio requires one). 我遇到了同样的问题(我相信AWS EC2实例没有ubuntu密码,R studio需要一个)。

You can add a new user by typing the following: sudo adduser YOURUSERNAME and follow the terminal instructions (press enter to skip the info you do not want to give). 您可以通过键入以下sudo adduser YOURUSERNAME来添加新用户: sudo adduser YOURUSERNAME并按照终端的指示进行操作(按Enter跳过您不想提供的信息)。 Head over to the IP xxx.xxx.xxx.xxx:8787 and you should be able to log in now. 转到IP xxx.xxx.xxx.xxx:8787,您现在应该可以登录了。

How to install R studio 3.4.4, upgrade to 3.6.0 and add a username (Ubuntu 18): 如何安装R studio 3.4.4,升级到3.6.0并添加用户名(Ubuntu 18):

sudo apt update
sudo apt-get install -y r-base r-base-dev

sudo apt install gdebi-core

wget https://download2.rstudio.org/server/bionic/amd64/rstudio-server-1.2.1335-amd64.deb


sudo gdebi rstudio-server-1.2.1335-amd64.deb

sudo chmod 777 -R /usr/local/lib/R/site-library

sudo adduser YOURUSERNAME

#########
# Upgrade R
echo "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/" | sudo tee -a /etc/apt/sources.list

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

sudo apt-get update
sudo apt-get upgrade -y

sudo apt-get install -y r-base r-recommended r-base-dev

# Rstudio dependency issues (when installing devtools) - I installed from an AWS EC2 account so I need to change my root password.

sudo passwd root
su root
apt-get -y build-dep libcurl4-gnutls-dev

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM