Skip to content

Instantly share code, notes, and snippets.

View skylens's full-sized avatar
🎯
Focusing

skylens

🎯
Focusing
View GitHub Profile

编译安装 nmon

CentOS 下编译安装

yum install git ncurses-devel ncurses -y
yum groups install 'Development Tools'
cd nmon/
./build.sh

CentOS 安装完后的需要安装的软件

CentOS 6

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm -y
yum makecache all
yum update -y
yum install net-tools bind-utils vim nano unzip zip xz wget ftp tmux lrzsz git htop lsof -y

yum groups remove 'Server with GUI' 报错

yum groupremove 'X Window System' 'GNOME' 'Guest Desktop Agents'

iptables 白名单

iptables -vL
iptables -A INPUT -p tcp --dport 22 -s 192.168.149.1 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -s 10.181.242.242 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -s 10.180.221.0/24 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j DROP
service iptables save
service iptables restart
@skylens
skylens / 禁止ping.md
Last active December 6, 2018 16:11
禁止ping

CentOS 下禁 ping

修改内核参数实现

  • 临时生效
echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all