Hugo博客公告弹窗

阿里云香港轻量服务器卸载云盾和云监控

   
文章摘要
摘要小助理今天溜号啦……😜

以轻量香港服务器为例

系统:debian11

卸载云盾

wget -O uninstall.sh "http://update.aegis.aliyun.com/download/uninstall.sh" && chmod +x uninstall.sh && ./uninstall.sh
wget -O quartz_uninstall.sh "http://update.aegis.aliyun.com/download/quartz_uninstall.sh" && chmod +x quartz_uninstall.sh && ./quartz_uninstall.sh

删除残留:

pkill aliyun-service
rm -fr /etc/init.d/agentwatch /usr/sbin/aliyun-service
rm -rf /usr/local/aegis*

屏蔽云盾IP 执行下面命令通过“iptables”防火墙来屏蔽云盾IP

iptables -I INPUT -s 140.205.201.0/28 -j DROP
iptables -I INPUT -s 140.205.201.16/29 -j DROP
iptables -I INPUT -s 140.205.201.32/28 -j DROP
iptables -I INPUT -s 140.205.225.192/29 -j DROP
iptables -I INPUT -s 140.205.225.200/30 -j DROP
iptables -I INPUT -s 140.205.225.184/29 -j DROP
iptables -I INPUT -s 140.205.225.183/32 -j DROP
iptables -I INPUT -s 140.205.225.206/32 -j DROP
iptables -I INPUT -s 140.205.225.205/32 -j DROP
iptables -I INPUT -s 140.205.225.195/32 -j DROP
iptables -I INPUT -s 140.205.225.204/32 -j DROP

卸载aliyun-service

rm -rf /usr/sbin/aliyun*

检查

ps -aux | grep -E 'aliyun|AliYunDun' | grep -v grep

或者

systemctl list-units --type=service | grep -E 'aliyun|AliYunDun'

如果输出为空,则说明确实没有相关的进程在运行。

安装云监控插件 (推荐)

以轻量香港服务器为例

内存占用25M左右,好处是可以开启短信和邮件通知

ARGUS_VERSION=3.5.11 /bin/bash -c "$(curl -s https://cms-agent-cn-hongkong.oss-cn-hongkong-internal.aliyuncs.com/Argus/agent_install-1.10.sh)"

执行以下命令,查看云监控插件状态。

ps aux | grep argusagent | grep -v grep

卸载云监控插件

以root用户登录云监控插件所在主机。

执行以下命令,停止云监控插件。

bash /usr/local/cloudmonitor/cloudmonitorCtl.sh stop

执行以下命令,卸载云监控插件。

bash /usr/local/cloudmonitor/cloudmonitorCtl.sh uninstall

执行以下命令,删除目录cloudmonitor。

rm -rf /usr/local/cloudmonitor
CC BY-NC-SA 4.0 转载请注明
最后更新于 2024-09-17 13:18
clarity统计