Oracle Cloud 配置

1. Oracle Cloud 配置

1.1. 特别注意

  • Oracle cloud 的防火墙 Ingress Rules 配置注意 Source Port Range 选择 ALL
  • 如果进去发现没有 instance, 左边 Compartment 选择自己。

1.2. 问题 1: Oracle Cloud SSH 无法远程登录

Oracle Cloud SSH 太坑了, 只支持自家的 Oracle Linux 镜像, 其它的只能使用 terminal 登录。

解决方法: 使用 Oracle Linux 镜像或者使用 terminal 或者使用其它第三方 ssh client。

1.3. 问题 2: Please login as the user “opc” rather than the user “root”.

这是在 .ssh/authorized_keys 里面控制的, 所以要在 .ssh/authorized_keys 里面删除这部分代码。

1.3.1. 第 1 步: 删除 .ssh/authorized_keys 里面的代码

/root/.ssh/authorized_keys

1.3.2. 第 2 步: 编辑 /etc/ssh/sshd_config 文件

PermitRootLogin yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no

1.4. 问题 3: 开启 bbr

现在很多高版本的 Linux 内核不需要重启即可使 bbr 生效。

1.4.1. 检测是否已开启 bbr

  • uname -a

需要 Linux 4.9.0 以上内核才可以开启 bbr。

  • sysctl net.ipv4.tcp_available_congestion_control

返回值一般为:

# Run the following command to check available congestion control algorithms.
net.ipv4.tcp_available_congestion_control = bbr cubic reno

# 或者为: 

net.ipv4.tcp_available_congestion_control = reno bbr cubic
  • sysctl net.ipv4.tcp_congestion_control

返回值一般为:

# Run the below command to check the current congestion control algorithm used in your system,
net.ipv4.tcp_congestion_control = bbr
  • sysctl net.core.default_qdisc

返回值一般为:

net.core.default_qdisc = fq
  • lsmod | grep bbr

返回值有 tcp_bbr 模块即说明 bbr 已启动。注意: 并不是所有的 VPS 都会有此返回值, 若没有也属正常。

1.4.2. 开启 bbr

如果以上都没有 bbr 说明未开启。可以使用以下方式开启 bbr。

  • 编辑 sysctl.conf
vi /etc/sysctl.conf

# 在文件内加入
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

# 使生效
sysctl -p

# 查看 BBR 开启是否成功。或者使用上面的方法。
# 注意没有任何返回不一定没有开启 bbr, 有些 Linux 不返回 bbr 也开启成功了。
# sysctl net.ipv4.tcp_congestion_control 如果有 bbr 那就说明成功了。
lsmod | grep bbr

1.5. Oracle cloud 换 IP

  1. 进入 instance 详情, 拉到最下方(非常重要, 不是点击中间的那个), 在左边 Resources 下选择 “Attached VNICs”, 再在出现的表格里面点击 “Primary VNIC”;
  2. 进入后拉到最下方, 左边 Resources 下选择 “IPv4 Addresses”, 在出现的表格里面的右方 “下拉按钮” 处点击 “Edit” 就可以配置 IP 地址了;
  3. 为了换新 IP 必须先注销当前 IP, 方法是选择 “No public IP” 再 “Update”, 再根据需要选择是 “Ephemeral public IP”(临时 IP) 还是 “Reserved public IP”(固定 IP)。搞科研的话一般临时的就够用了。
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

云满笔记

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值