|
1.Putty / ssh 192.168.25.104 // putty for the Windows remote connection tool 192.168.25.104 Linux system as linux es5
2. # ftp 10.1.9.19 // After logging ftp server to connect to 10.1.9.19
3.> ftp binary / bi // change the ftp file transfer mode to binary if you do not change will not be unpacked
4.> ftp get net-snmp-5.4.1.2.tar.gz // net-snmp-5.4.1.2.tar.gz download files to the machine on
5.> ftp bye // exit ftp
6. # tar -zxvf net-snmp-5.4.1.2.tar.gz // decompression
7. # cd net-snmp-5.4.1.2 // into the source directory
8. #. / Configure // configuration in the process need to choose
default version of-snmp-version: 2
Systemcontact information (configure the device's contacts): heaven
System location (position of the device): china
Location to write logfile (log file location): /var/log/snmpd.log
Location to Write persistent (data storage directory): / var / net-snmp
9. # make && make install // compile and install
10. # cp EXAMPLE.conf /usr/local/share/snmp/snmpd.conf // Note capitalization copy EXAMPLE.conf
11. # vi /usr/local/share/snmp/snmpd.conf // edit snmpd.conf
The inside mynetwork / 24 need to look into the information snmp host ip address here is 192.168.25.40
Change the value of the community you set here is cdc
NOTE: When you need to press the i edit letters, press esc exit enter: wq
12. # vi /etc/rc.local \\ netsnmp set from the start that the end add / usr / local / sbin / snmpd -c /usr/local/share/snmp/snmpd.conf &
13. # vi / etc / profile \\ set the environment variable that is, before export command with PATH = / usr / local / bin: / usr / local / sbin: $ PATH
14. # / usr / local / sbin / snmpd -d \\ snmpd start the service, view service is started
#netstat -an | grep 161
If you have already started the service, and then modify the snmpd.conf must stop snmpd this service again
snmpd -d to take effect
Stop approach 1.ps -ef | grep snmpd // See snmpd process id
2.Kill -9 snmpd process number // end snmpd process
15. For more about the net-snmp configuration, refer to the net-snmp configuration installation manual. |
|
|
|