-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-snmp.sh
21 lines (21 loc) · 969 Bytes
/
install-snmp.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
#
#
sudo apt-get install -y snmp snmpd &&
netstat -nl | grep -E "(local|161)" &&
snmpwalk -v 2c -c public localhost
echo "################################################"
echo "# notes: #"
echo "# edit snmpd.conf in /etc/snmp/snmpd.conf #"
echo "# you can change #"
echo "# port in agentAddress udp:127.0.0.1:161 #"
echo "# change community in rocommunity public #"
echo "# change Location in sysLocation #"
echo "# change Contact in sysContact #"
echo "# to test #"
echo "# snmpwalk -v 2c -c public localhost #"
echo "# #"
echo "# to stop snmpd service #"
echo "# sudo /etc/init.d/snmpd stop #"
echo "# #"
echo "################################################"