清除Oracle监控
一、停止 cloud-init 服务:
sudo systemctl stop cloud-init
sudo systemctl stop cloud-init-local
sudo systemctl stop cloud-config
sudo systemctl stop cloud-final
二、禁用 cloud-init 服务,防止它在系统启动时自动启动:
sudo systemctl disable cloud-init
sudo systemctl disable cloud-init-local
sudo systemctl disable cloud-config
sudo systemctl disable cloud-final
三、如果你确定不再需要 cloud-init,可以创建一个文件来阻止它运行:
sudo touch /etc/cloud/cloud-init.disabled
完全删除 cloud-init 可能会导致一些问题,特别是如果你打算使用 OCI 的某些功能(如实例配置、元数据服务等)。因此除非你完全确定不需要 cloud-init 的任何功能,否则建议保留它,只是禁用其服务。
如果你决定在未来重新启用 cloud-init,只需删除 /etc/cloud/cloud-init.disabled
文件并重新启用相关服务即可。
清除agent
sudo snap remove oracle-cloud-agent
systemctl stop oracle-cloud-agent
systemctl disable oracle-cloud-agent
systemctl stop oracle-cloud-agent-updater
systemctl disable oracle-cloud-agent-updater
sudo systemctl stop rpcbind.socket
sudo systemctl stop rpcbind
sudo systemctl disable rpcbind.socket
sudo systemctl disable rpcbind