美文网首页
卸载阿里云ECS监控服务

卸载阿里云ECS监控服务

作者: Jack_Jianshu | 来源:发表于2017-09-12 20:46 被阅读1212次

    https://www.exvs.org/?p=441

    使用阿里云ECS的时候不难发现系统里面会有阿里云的有关进程,出于某些原因,我们不希望系统中有这种东西,所以我们这里记录一下卸载或者停用的方法。
    本文适用于Ubuntu 16.04 LTS,其他系统用户可以自己看着办反正systemd很多发行版都在使用。
    1、云盾(安骑士)

    Shell

    curl -sSL http://update.aegis.aliyun.com/download/quartz_uninstall.sh | sudo bash
    sudo systemctl disable agentwatch.service
    sudo rm -rf /usr/local/aegis
    sudo rm /usr/sbin/aliyun-service
    sudo rm /lib/systemd/system/aliyun.service
    1
    2
    3
    4
    5
    curl -sSL http://update.aegis.aliyun.com/download/quartz_uninstall.sh | sudo bash
    sudo systemctl disable agentwatch.service
    sudo rm -rf /usr/local/aegis
    sudo rm /usr/sbin/aliyun-service
    sudo rm /lib/systemd/system/aliyun.service
    或者更简单粗暴点

    Shell

    sudo killall -9 aegis_*
    sudo killall -9 aliyun_*
    sudo systemctl disable agentwatch.service
    sudo rm /usr/sbin/aliyun-service
    sudo rm /lib/systemd/system/aliyun.service
    sudo rm -rf /usr/local/aegis
    1
    2
    3
    4
    5
    6
    sudo killall -9 aegis_*
    sudo killall -9 aliyun_*
    sudo systemctl disable agentwatch.service
    sudo rm /usr/sbin/aliyun-service
    sudo rm /lib/systemd/system/aliyun.service
    sudo rm -rf /usr/local/aegis
    2、阿里云的其他服务进程

    Shell

    sudo systemctl stop accounts-daemon.service
    sudo systemctl disable accounts-daemon.service
    sudo systemctl stop aliyun-util.service
    sudo systemctl disable aliyun-util.service
    sudo systemctl stop cloud-config.service
    sudo systemctl disable cloud-config.service
    sudo systemctl stop cloud-final.service
    sudo systemctl disable cloud-final.service
    sudo systemctl stop cloud-init-local.service
    sudo systemctl disable cloud-init-local.service
    sudo systemctl stop cloud-init-upgrade.service
    sudo systemctl disable cloud-init-upgrade.service
    sudo systemctl stop cloud-init.service
    sudo systemctl disable cloud-init.service

    如果需要删除可以执行

    sudo rm /etc/systemd/system/aliyun-util.service
    sudo rm -rf /etc/aliyun-util
    sudo rm /lib/systemd/system/accounts-daemon.service
    sudo rm /lib/systemd/system/cloud-final.service
    sudo rm /lib/systemd/system/cloud-config.target
    sudo rm /lib/systemd/system/cloud-init.service
    sudo rm /lib/systemd/system/cloud-config.service
    sudo rm /lib/systemd/system/cloud-init-upgrade.service
    sudo rm /lib/systemd/system/cloud-init-local.service
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    sudo systemctl stop accounts-daemon.service
    sudo systemctl disable accounts-daemon.service
    sudo systemctl stop aliyun-util.service
    sudo systemctl disable aliyun-util.service
    sudo systemctl stop cloud-config.service
    sudo systemctl disable cloud-config.service
    sudo systemctl stop cloud-final.service
    sudo systemctl disable cloud-final.service
    sudo systemctl stop cloud-init-local.service
    sudo systemctl disable cloud-init-local.service
    sudo systemctl stop cloud-init-upgrade.service
    sudo systemctl disable cloud-init-upgrade.service
    sudo systemctl stop cloud-init.service
    sudo systemctl disable cloud-init.service

    如果需要删除可以执行

    sudo rm /etc/systemd/system/aliyun-util.service
    sudo rm -rf /etc/aliyun-util
    sudo rm /lib/systemd/system/accounts-daemon.service
    sudo rm /lib/systemd/system/cloud-final.service
    sudo rm /lib/systemd/system/cloud-config.target
    sudo rm /lib/systemd/system/cloud-init.service
    sudo rm /lib/systemd/system/cloud-config.service
    sudo rm /lib/systemd/system/cloud-init-upgrade.service
    sudo rm /lib/systemd/system/cloud-init-local.service

    相关文章

      网友评论

          本文标题:卸载阿里云ECS监控服务

          本文链接:https://www.haomeiwen.com/subject/zfdhsxtx.html