①
选择性开放防火墙端口,在服务器面板可以找到选择性打开(看你自己的需要)默认CVM开放,轻量不开放
②
A方案:上手直接DD干净系统(国内小鸡带宽水管小,耗时比较长)
B方案:莫怕直接用默认,干腾讯云监控&更换稳定源就行(操作如下)
#直接复制粘贴全部到SSH窗口即可 sudo -i systemctl stop tat_agent systemctl disable tat_agent /usr/local/qcloud/stargate/admin/uninstall.sh /usr/local/qcloud/YunJing/uninst.sh /usr/local/qcloud/monitor/barad/admin/uninstall.sh rm -f /etc/systemd/system/tat_agent.service rm -rf /usr/local/qcloud rm -rf /usr/local/sa rm -rf /usr/local/agenttools rm -rf /usr/local/qcloud process=(sap100 secu-tcs-agent sgagent64 barad_agent agent agentPlugInD pvdriver ) for i in ${process[@]} do for A in $(ps aux | grep $i | grep -v grep | awk '{print $2}') do kill -9 $A done done
检验:TOP查看,控制面板监控仪表盘是否有记录,控制面板修改密码是否失效(失效就对了)同时也干掉腾讯云自家自带的监控报警功能(具体哪一个不知道,但是监控本身会互相唤醒守护...有点蛋疼)
③
然后我们需要更换清华稳定的源(腾讯自家的一言难尽)官方的也行不过国内小鸡水土不服
#直接复制粘贴全部到SSH窗口即可 #批量修改源为清华 sources="/etc/apt/sources.list" cat>"${sources}"<<EOF #清华源 deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ buster/updates main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ buster/updates main contrib non-free EOF
换完后记得可以更新下,update下一些软件包和系统本身
④
更换靠谱的公共DNS(自选非强迫)
#直接复制粘贴全部到SSH窗口即可 #大陆首选 sed -i '$a\prepend domain-name-servers 223.5.5.5,119.29.29.29,223.5.5.5,183.60.83.19;' /etc/dhcp/dhclient.conf sed -i '$a\dhclient' /etc/dhcp/dhclient.conf
#直接复制粘贴全部到SSH窗口即可 #非大陆首选 sed -i '$a\prepend domain-name-servers 1.0.0.1,8.8.8.8,1.1.1.1,8.8.4.4;' /etc/dhcp/dhclient.conf sed -i '$a\dhclient' /etc/dhcp/dhclient.conf
重启后的DNS就不用改啦
其余的你们都会啦,改密码 换删端口 防火墙 BBR 定时.......
原文转载:https://hostloc.com/thread-909578-1-2.html 作者:冲浪麦浪花郎
文章评论