经常用的大家伙
netstat -ntlp //查看当前所有tcp端口
ss -tlnp |grep 20351 // 查找单个端口所有进程
kill -s 9 进程号 // 强制杀死进程
netstat -tunlp|grep 9503 //查看单个端口进程
strace -p 进程号 // 定位进程卡死 切换默认PHP
// 移除默认php
rm -f /usr/bin/php
// 链接新php
ln -sf /www/server/php/80/bin/php /usr/bin/php封IP
// 封禁 单IP
iptables -I INPUT -s 180.101.214.20 -j DROP
// 封禁整个IP段
iptables -I INPUT -s 180.0.0.0/8 -j DROP
// 封禁IP段
iptables -I INPUT -s 180.101.0.0/16 -j DROP
// 封禁一些IP段
iptables -I INPUT -s 180.101.204.0/24 -j DROP
// 解封
iptables -D INPUT -s 123.44.55.66 -j DROP
// 查看封禁列表
iptables -L INPUT时间同步
chrony
systemctl start chronyd.service 启动chrony服务
systemctl enable chronyd.service 设置开机同步时间
systemctl status chronyd.service 查看服务状态
// 配置时间永久同步
vim /etc/chrony.conf
替换地址 server ntp.ntsc.ac.cn iburst
// 重启服务
systemctl restart chronyd.service
// 开启自启服务
systemctl enable chronyd.service查看内存
// 安装smem工具
yum install epel-release
yum install smem
// RSS 共享内存 USS PHP占用内存
smem -p -P houze USS