====== Oracle 永久免费 ======
Orcale 提供永久免费的 VPS ([[https://www.oracle.com/cn/cloud/free/|申请链接]]/[[https://www.youtube.com/watch?v=dUo2CExJRv4|视频演示]]) [[https://cloud.oracle.com/?tenant=goldentianya&provider=OracleIdentityCloudService|我的控制台]]
[[https://www.oracle.com/cn/cloud/free/|免费套餐介绍]] / [[https://www.oracle.com/cn/cloud/storage/pricing/|计费信息]]
===== 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 ubuntu@158.101.217.235
# 修改root密码
sudo passwd root
su - // 更换 root 用户
也可用已有的公共密钥创建 [[https://docs.oracle.com/zh-cn/solutions/create-data-mart-multiple-databases-continuous-analytics/create-compute-instances1.html#GUID-6074B0B7-1E37-4CBD-A91B-D417530F8CB4|Oracle 官网》创建实例]] 以及生成公钥 ((b>[[https://git-scm.com/book/zh/v2/%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%E7%9A%84-Git-%E7%94%9F%E6%88%90-SSH-%E5%85%AC%E9%92%A5|服务器上的 Git - 生成 SSH 公钥]]))
进去后更改一下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
===== 各种坑 =====
* ping 不通。解决方案参看 [[https://vpsur.com/oracle-ping.html|开通 ping 端口]]
修改防火墙端口,否则无法接通数据库
{{:it:server:oracle_ping.png?1000|}}
ionos 的服务器同样要开通 0.0.0.0 端口的 ICMP 才能ping的通。
MongoDB
- 在控制台开放端口,并修改/etc/mongod.conf文件在新的端口启动服务
- 使用firewall-cmd命令开放防火墙端口 ((a>[[https://computingforgeeks.com/install-and-use-firewalld-on-ubuntu/|Firewalld on Ubuntu]]))
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 ====
[[https://www.youtube.com/watch?v=enfvqw0mMnI&t=728s|刷机脚本]]{{fa>youtube}}
++++ 日志 |
-----------------------------------使用说明------------------------------------
bash sh_client_bot.sh (启动客户端)
tail -f log_r_client.log (实时查看日志,ctrl+c退出日志,注意日志文件大小)
ps -ef | grep r_client.jar | grep -v grep | awk '{print $2}' | xargs kill -9 (终止进程)
脚本支持传参 bash sh_client_bot.sh 8888 更换默认9527端口 同时需填写local_address
请在client_config文件 oci=begin oci=end 中间放入oracle API参数
https://t.me/radiance_helper_bot /help 获取使用帮助
-----------------------------------使用说明------------------------------------
停止服务:kill the process [ 24099 ]
++++
====== 阿里云 ======
[[https://ecs.console.aliyun.com/?spm=5176.2020520130.105.2.7053697bo42FlT&msctype=pmsg&mscareaid=cn&mscsiteid=cn&mscmsgid=2520122071801676210/home|控制台]]