连接 AWS
选择一个实例,启动成功后
打开vscode,安装 remote-ssh
打开 ssh 配置文件,windows下 ctrl+ship+p 搜索 ssh, open configure file
Host aws-ec2
HostName 公网ipv4地址【这是动态的,每次启动实例都会改变】
IdentityFile 密匙【启动实例,有让选择下载的, pem后缀】
User ubuntu【这个就是添加的用户】
连上后,就在 /home/ubuntu
下操作了,这个 ubuntu
就是上面添加的用户
配置环境
- 安装python
sudo apt-get install python3.6
- 安装 pip
sudo apt update
sudo apt install python3-pip
- 更换 pip 源
mkdir ~/.pip
touch pip.conf
vim pip.conf
添加以下内容
[global]
trusted-host = pypi.douban.com
index-url = http://pypi.douban.com/simple
附国内源
#清华
https://pypi.tuna.tsinghua.edu.cn/simple
#阿里云
http://mirrors.aliyun.com/pypi/simple/
#中国科技大学
https://pypi.mirrors.ustc.edu.cn/simple/
#华中理工大学
http://pypi.hustunique.com/
#山东理工大学
http://pypi.sdutlinux.org/
#豆瓣
http://pypi.douban.com/simple/
运行时监控命令
top 可查看 cpu 使用情况
再按 1 可具体查看每个核的使用情况