●腾讯云YDService
如果云服务器的配置不算太高,删除这个安全服务后,可减少内存的占用。
查看YDService
检查进程路径/usr/local/qcloud/YunJing/YDEyes/YDService
查了一下,发现是腾讯云的服务器会自动安装云监控、云镜等安全服务,方便在控制台查看产品运行状态等
具体的介绍如下:《腾讯云云服务器安全监控组件》
还有一个主机安全,也就是所谓的云镜,新开服务器不取消勾选都会默认安装
云镜 Linux 安装目录是/usr/local/qcloud/YunJing
其实用意还是不错的,但是自己的1cpu、1g、1m的服务器,用不起呀!
下面不废话了,卸载它!
卸载腾讯云云服务器安全监控组件
- 直接在腾讯云服务器上运行以下代码
/usr/local/qcloud/stargate/admin/uninstall.sh
/usr/local/qcloud/YunJing/uninst.sh
/usr/local/qcloud/monitor/barad/admin/uninstall.sh
- 这些都是腾讯云自带的卸载脚本,如果你不想用也可以使用打包好的 shell
wget -qO- https://raw.githubusercontent.com/littleplus/TencentAgentRemove/master/remove.sh | bash
# 备用1
wget -qO- https://raw.githubusercontents.com/littleplus/TencentAgentRemove/master/remove.sh | bash
# 备用2
wget -qO- https://wikicc.cn/usr/uploads/2023/09/remove.sh | bash
- 此脚本卸载完腾讯云的监控,但是腾讯云文件夹并不是只有监控,为了保险起见,脚本不会
rm -rf /usr/local/qcloud
- 卸载完以后可以通过如下命令来查看是否卸载干净
ps -A | grep agent
引用:https://www.aiunk.com/1315/
●阿里云盾安骑士和阿里云助手
- 今天浏览龙笑天下网站时,突然网页打开非常慢非常卡,然后去 ssh 通过 top c 命令查看了下,阿里云服务进程 aliyun-service 占用非常高。我记得当初购买阿里云服务器的时候,明明没勾选云盾服务的,结果现在还是出现了几个阿里云服务进程。
- 下面龙笑天就来教大家如何完整干净的卸载掉阿里云服务器的云盾安骑士和阿里云助手等安全监控组件。
卸载阿里云助手
阿里云助手的路径是:/usr/local/share/aliyun-assist
,执行下面的命令即可卸载它:
systemctl stop aliyun
systemctl disable aliyun
rm -rf /etc/systemd/system/aliyun.service
rm -rf /usr/sbin/aliyun_installer
rm -rf /usr/sbin/aliyun-service
rm -rf /usr/local/share/aliyun-assist
systemctl daemon-reload
然后通过下面的命令来查看是否还有 aliyun-service
进程:
ps -ef | grep -v grep | grep -i aliyun-service
如果有输出内容的话,可以通过下面的命令来查看进程 ID:
ps -ef | grep -v grep | grep -i aliyun-service | awk '{print $2}'
然后通过下面的命令来结束杀死此阿里云助手进程:
ps -ef | grep -v grep | grep -i aliyun-service | awk '{print $2}' | xargs kill -9
卸载阿里云助手的守护进程
阿里云助手守护进程的路径是:/usr/local/share/assist-daemon
,执行下面的命令即可卸载它:
systemctl stop AssistDaemon
systemctl disable AssistDaemon
rm -rf /etc/systemd/system/AssistDaemon.service
rm -rf /usr/local/share/assist-daemon
systemctl daemon-reload
卸载阿里云盾 AliYunDun
使用 chkconfig --list
命令可以在开机启动项里面看到 aegis
,这个就是阿里云盾 AliYunDun
了。
# chkconfig --list
aegis 0:off 1:off 2:on 3:on 4:on 5:on 6:off
agentwatch 0:off 1:off 2:on 3:on 4:on 5:on 6:off
cloudmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:off
mysql 0:off 1:off 2:off 3:off 4:off 5:off 6:off
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
通过下面命令就可以使它开机不启动了:
service aegis stop # 停止服务
chkconfig --del aegis # 删除服务
然后执行下面的命令来删除云盾残留:
rm -rf /usr/local/aegis
然后通过下面的命令来查看是否还有 aliyundun
进程:
ps -ef | grep -v grep | grep -i aliyundun
如果有输出内容的话,可以通过下面的命令来结束杀死此云盾进程:
ps -ef | grep -v grep | grep -i aliyundun | awk '{print $2}' | xargs kill -9
引用:https://www.ilxtx.com/remove-aliyundun-service-completely.html