Tag Archives: CentOS

[Linux笔记]CentOS添加与批量添加IP

Leave a comment

一、添加单个IP的方法:

cd /etc/sysconfig/network-scripts  
cp ifcfg-eth0 ifcfg-eth0:0  
vim ifcfg-eth0:0  
DEVICE=eth0:0           #此处添加:0,保持和文件名一致,添加多个IP依次递增  
ONBOOT=yes              #是否开机激活  
BOOTPROTO=static        #静态IP,如果需要DHCP获取请输入dhcp  
IPADDR=192.168.0.2      #此处修改为要添加的IP  
NETMASK=255.255.255.0   #子网掩码根据你的实际情况作修改  

Continue reading

[Linux笔记] CentOS配置SNMP[服务器SNMP性能监控]

4 Comments

CentOS配置SNMP[服务器SNMP性能监控]
一、安装SNMP
1.检查SNMP是否安装

rpm -q net-snmp

2.如果未安装,安装SNMP

yum install net-snmp

3.设置开机自动运行SNMP

/sbin/chkconfig snmpd on

二、配置SNMP
编辑snmpd.conf

vi /etc/snmp/snmpd.conf

1.更改团体名(Community)
找到下面这句

# sec.name source community
com2sec notConfigUser  default       public

将团体名(Community)public改为其它任意字段,例:

com2sec notConfigUser  default       meidahua

Continue reading