Problem:
# snmpwalk -v
bash: snmpwalk: command not found
#
Solution:
The problem is that the snmp binaries are not listed in my system's environment PATH!
# find / -name snmpwalk
/usr/sfw/bin/snmpwalk
/usr/local/bin/snmpwalk
/tmp/net-snmp-5.4.4/apps/.libs/snmpwalk
/tmp/net-snmp-5.4.4/apps/snmpwalk
/tmp/net-snmp-5.4.4/win32/snmpwalk
#
#echo $PATH
/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/bin:/usr/platform/SUNW,Netra-240/sbin:/opt/sun/bin:/opt/SUNWexplo/bin:/opt/SUNWsneep/bin:/opt/CTEact/bin
So i added the PATH "/usr/local/bin" to my system's environment PATH:
export PATH=$PATH:/usr/local/bin
#echo $PATH
/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/bin:/usr/platform/SUNW,Netra-240/sbin:/opt/sun/bin:/opt/SUNWexplo/bin:/opt/SUNWsneep/bin:/opt/CTEact/bin:/usr/local/bin
#snmpwalk -V
NET-SNMP version: 5.4.4
#
To make the environment PATH persistent through system restarts, follow these steps:
- vi /etc/profile
- PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/bin:/usr/platform/SUNW,Netra-240/sbin:/opt/sun/bin:/opt/SUNWexplo/bin:/opt/SUNWsneep/bin:/opt/CTEact/bin:/usr/local/bin
- source /etc/profile
- #echo $PATH
No comments:
Post a Comment