静态iP配置
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="STATIC" //手动
DHCP_HOSTNAME="ni-probe-default"
HWADDR="E4:1F:13:44:47:E0"
IPV6INIT="no"
IPADDR=10.128.9.222 //手动
GATEWAY=10.128.9.254 //手动
NETMASK=255.255.255.0 //手动
NM_CONTROLLED="no"
ONBOOT="yes" //手动
TYPE="Ethernet"
UUID="e3743eaa-95f4-4513-aa47-ea2c14104723"
#DNS=219.141.140.10
DNS1=202.106.196.115 //手动
DNS2=8.8.8.8 //手动
linux更新yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
yum clean all
yum makecache
yum -y install glib2
centos6升级glibc到2.14
/lib64/libc.so.6: version `GLIBC_2.14' not found
strings /lib64/libc.so.6 |grep GLIBC
下载:
glibc-2.14.1-6.x86_64.rpm
glibc-common-2.14.1-6.x86_64.rpm
glibc-devel-2.14.1-6.x86_64.rpm
glibc-headers-2.14.1-6.x86_64.rpm
rpm -Fhv glibc*
误删/lib64/libm.so.6
export LD_PRELOAD=/lib64/libc-2.14.1.so
ls -ltr
重建软连接
ldconfig
文件夹大小
du -h --max-depth=1 当前文件夹大小
du -hm --max-depth=2 | sort -n
du -hm --max-depth=2 | sort -nr | head -12
大文件查找
find . -type f -size +800M 找文件
find . -type f -size +800M -print0 | xargs -0 ls -l
find . -type f -size +800M -print0 | xargs -0 du -h
find . -type f -size +800M -print0 | xargs -0 du -hm | sort -nr
I/O
iostat -dmx 5 10
kill多次启动的进程
ps -ef | grep -i tcpreplay | grep -v grep | awk '{print $2}' | xargs kill -9
清空缓存
sync
echo 1 > /proc/sys/vm/drop_caches
CPU消耗top10
ps auwx | sort -rn -k3 | head -10
传输文件
rz -b
sz file
网络相关信息
netstat -anp | grep
root无法修改权限
yum remove e2fsprogs
yum -y install e2fsprogs
lsattr filename
chattr -i filename
网卡型号
lspci | grep Eth
网友评论