目录

Oracle 永久免费

Orcale 提供永久免费的 VPS (申请链接/视频演示我的控制台

免费套餐介绍 / 计费信息

VPS 创建实例

创建的时候可以选择不同的操作系统,点击启动之前,先下载private key文件,将来登录的时候用。登录命令

# 更改文件权限 It is required that your private key files are NOT accessible by others.
chmod 600 ssh-key-oracle-ubuntu.key
ssh -i ssh-key-oracle-ubuntu.key [email protected]
# 修改root密码
sudo passwd root
su - // 更换 root 用户

也可用已有的公共密钥创建 Oracle 官网》创建实例 以及生成公钥 1)

进去后更改一下root用户密码,并切换到root用户,然后修改 /etc/ssh/sshd_config 文件,以后用root登录。(重启ssh服务 sudo systemctl restart ssh)

PasswordAuthentication yes
PermitRootLogin yes

免密登录 ssh-copy-id -i ~/.ssh/id_rsa.pub root@serverplay

将 ubuntu 移除出管理员群 sudo deluser ubuntu sudo 关闭系统自带的性能监测,会耗费很多资源

systemctl stop oracle-cloud-agent
systemctl disable oracle-cloud-agent
systemctl stop oracle-cloud-agent-updater
systemctl disable oracle-cloud-agent-updater

Windows 下使用, download id_rsa.pub ⇒ %userprofile%.ssh

mkdir %userprofile%.ssh

各种坑

修改防火墙端口,否则无法接通数据库

ionos 的服务器同样要开通 0.0.0.0 端口的 ICMP 才能ping的通。

MongoDB

  1. 在控制台开放端口,并修改/etc/mongod.conf文件在新的端口启动服务
  2. 使用firewall-cmd命令开放防火墙端口 2)
sudo apt update
sudo apt install firewalld
sudo systemctl enable firewalld
sudo systemctl start firewalld
sudo ufw disable
// 开通端口并重启防火墙
sudo firewall-cmd --zone=public --add-port=33720/tcp --permanent
// 删除端口
sudo firewall-cmd --zone=public --remove-port=33720/tcp --permanent
// 重启
sudo systemctl restart firewalld
// 查看防火墙规则
sudo firewall-cmd --list-all
firewall-cmd --state
// 对特定地址开通端口
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="88.153.171.94" port port="33720" protocol="tcp" accept"

重置系统

bash <(wget --no-check-certificate -qo-"https://raw.githubusercontent.com/MoeClub/Note/master/lnstallNET.sh)-d 9 -v 64 -p 密码

命令中的-d 后面为Debian版本号,-v后面为64位/32位,【17、 8、 9、 10】
命令中的-u 后面为Ubuntu版本号,-v后面为64位/32位,【14.04、16.04、 18.04、20.04】

// 更新环境
apt update -y && apt install -y curl && apt install -y socat && apt install wget -y
// 加速脚本
wget -N --no-check-Jertificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

抢刷VPS

刷机脚本

日志

阿里云

控制台