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

菜单 Home - Compute - Instances

==> 点击右边中间的 “主机实例”

菜单 Networking

==> 拉到下面的 Attached VNICs, 点击作为 Primary VNIC 的 “网络实例”

菜单 IP administration

==> 拉到 IPv4 addresses, 点击作为 Primary IP 的 “IP 实例” 的右边的三个点 ..., 选择 Edit

==> 点击 No public IP - Update - Ephemeral public IP - Update

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

云满笔记

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

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

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

打赏作者

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

抵扣说明:

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

余额充值