centos7常用命令
程序员文章站
2024-03-07 14:14:45
...
# 修改hostname
vim /etc/sysconfig/network
HOSTNAME=node1 # 修改为node1
# 同时
hostnamectl set-hostname node1
# 再手动更新 hosts
vim /etc/hosts
ll /proc/${pid}
查看 ${pid} 的进程信息,包括启动路径等
#TCP连接的情况
netstat -n | grep ":80" | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
# 修改记录
vim /etc/sysctl.conf
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_max_tw_buckets=100000
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_tw_timeout = 3
# 保存
/sbin/sysctl -p
转载于:https://my.oschina.net/corleone/blog/1857711