Linux installation using cacti

  

install snmp

http://www.zijidelu.org/thread-7479-1-1.html

yum install net-snmp net-snmp-devel Net-snmp-utils

centos Install SNMP

Install Net-SNMP

CentOS and other RedHat series products provide net-snmp binary packages. We can install directly from the source.

yum install net-snmp net-snmp-devel net-snmp-utils

Copy Code

Description: net-snmp-devel is to use net-snmp-config , net-snmp-utils is to use snmpwalk

to configure Net-SNMP

net-snmp under CentOS cannot use v3 in selinux environment. If you want to use snmp v3, please disable selinux first.

net-snmp-config --create-snmpv3-user -ro -A snmp@jiankongbao -a MD5 jiankongbao

Copy the code

The above command to create a snmpv3 user , read only, use MD5, the user name is jiankongbao, and the password is snmp@jiankongbao.

Note: Please disable the net-snmp service before running.

service snmpd stop

Copy Code

Run Net-SNMP

The method of running Net-SNMP service is simple, but the name of the Net-SNMP service Is snmpd

service snmpd start

Copy code

You may need to add it to the list of boot autorun services.

chkconfig snmpd on

Copy Code

Detect Net-SNMP

We can use snmpwalk to check if the snmp service is up and running.

snmpwalk -v 3 -u jiankongbao -a MD5 -A "snmp@jiankongbao" -l authNoPriv 127.0.0.1 sysDescr

Copy Code

Configure iptables Firewall
>

Net-SNMP uses the udp protocol, port 161. Add the following rule to /etc/sysconfig/iptables

-A RH-Firewall-I INPUT -p udp -s 60.195.249.83 --dport 161 -j ACCEPT

-A RH- Firewall-I INPUT -p udp -s 60.195.252.107 --dport 161 -j ACCEPT

-A RH-Firewall-I INPUT -p udp -s 60.195.252.110 --dport 161 -j ACCEPT

Copy Code

Start to add is blocked by the firewall, use this rule to pass

cacti default username and password are admin

Change Password

Error 1: PHP Warning: date(): It is not safe to rely on the system’s timezone settings

By observing the error log of nginx, I found a lot of the following Error:

PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used Any of those methods and you are still getting this warning, you most likely misspelled the Timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in

By search, found from php5.3, when using date() and other functions, if timezone is not set Correctly, E_NOTICE or E_WARNING information is generated each time the time function is called. Know the root of the problem, there are three ways to solve it, you can choose one.

First, use date_default_timezone_set() in the header to set date_default_timezone_set('PRC');

Second, use ini_set('date.timezone', 'Asia/Shanghai') in the header;

Third, modify php.ini. Open php5.ini and find date.timezone. Remove the preceding semicolon and change it to: date.timezone =PRC

Note: The above settings are all set for mainland China, and PRC can also use Asia/Shanghai, Asia. /Chongqing, Asia/Urumqi to replace.



Copyright © Windows knowledge All Rights Reserved