再次安装,已经是隔了两天,我打算换一台机器作为boot机器,但是发现报错,告知部署设备已经安装了dcos;看来需要卸载:
uninstall-master.sh
1 /opt/mesosphere/bin/pkgpanda uninstall && 2 rm -rf /opt/mesosphere /var/lib/mesos /var/lib/dcos /var/lib/zookeeper /var/log/mesos /etc/mesosphere /var/lib/mesosphere && 3 rm -rf /etc/profile.d/dcos.sh /etc/systemd/journald.conf.d/dcos.conf /etc/systemd/system/dcos-cfn-signal.service /etc/systemd/system/dcos-download.service /etc/systemd/system/dcos-link-env.service /etc/systemd/system/dcos-setup.service /etc/systemd/system/multi-user.target.wants/dcos-setup.service /etc/systemd/system/multi-user.target.wants/dcos.target
uninstall-agent.sh
1 echo '+++uninstall starting...+++' 2 echo '' 3 systemctl kill -s SIGUSR1 dcos-mesos-slave; 4 sudo -i /opt/mesosphere/bin/pkgpanda uninstall; 5 6 systemctl stop dcos-adminrouter-agent.service; 7 systemctl stop dcos-diagnostics.service; 8 systemctl stop dcos-epmd.service; 9 systemctl stop dcos-log-agent.service; 10 systemctl stop dcos-mesos-slave-public.service; 11 systemctl stop dcos-metrics-agent.service; 12 systemctl stop dcos-navstar.service; 13 systemctl stop dcos-pkgpanda-api.service; 14 systemctl stop dcos-rexray.service; 15 systemctl stop dcos-spartan-watchdog.service; 16 systemctl stop dcos-spartan.service; 17 systemctl stop dcos-diagnostics.socket; 18 systemctl stop dcos-log-agent.socket; 19 systemctl stop dcos-metrics-agent.socket; 20 systemctl stop dcos.target; 21 systemctl stop dcos-docker-gc.timer; 22 systemctl stop dcos-gen-resolvconf.timer; 23 systemctl stop dcos-logrotate-agent.timer; 24 systemctl stop dcos-spartan-watchdog.timer; 25 systemctl stop dcos-adminrouter-agent.service; 26 systemctl stop dcos-diagnostics.service; 27 systemctl stop dcos-epmd.service; 28 systemctl stop dcos-log-agent.service; 29 systemctl stop dcos-mesos-slave-public.service; 30 systemctl stop dcos-metrics-agent.service; 31 systemctl stop dcos-navstar.service; 32 systemctl stop dcos-pkgpanda-api.service; 33 systemctl stop dcos-rexray.service; 34 systemctl stop dcos-spartan-watchdog.service; 35 systemctl stop dcos-spartan.service; 36 systemctl stop dcos-diagnostics.socket; 37 systemctl stop dcos-log-agent.socket; 38 systemctl stop dcos-metrics-agent.socket; 39 systemctl stop dcos.target; 40 systemctl stop dcos-docker-gc.timer; 41 systemctl stop dcos-gen-resolvconf.timer; 42 systemctl stop dcos-logrotate-agent.timer; 43 systemctl stop dcos-spartan-watchdog.timer; 44 systemctl daemon-reload; 45 sudo rm -rf /opt/mesosphere /etc/mesosphere; 46 sudo rm -rf /opt/dcos-prereqs.installed; 47 sudo rm -rf /var/lib/dcos; 48 sudo rm -rf /var/lib/mesos; 49 sudo rm -rf /etc/systemd/system/dcos-*; 50 sudo rm -rf /etc/systemd/system/dcos.target /etc/systemd/system/dcos.target.wants; 51 sudo rm -rf /run/dcos 52 echo '' 53 echo '+++uninstall complete+++'
这里记录一下,因为rm
-rf
后面没有加绝对路径(直接写的文件名字),而导致dcos.target以及docs.target.wants没有删除掉,于是多次尝试删除重建失败,就是提示我没有删除干净,想想也是醉了。知道一次无意间的到/etc/systemd/system/下面,才发现还有这两个漏网之鱼。浪费了的一个下午啊。