SNMP unter Solaris

1. Stop Solaris SNMP daemons

cd /etc/rc3.d
./S76snmpdx stop
./S77dmi stop
mv S76snmpdx _S76snmpdx
mv S77dmi _S77dmi

2. Download NET-SNMP from http://www.net-snmp.org/

3. Compile and configure NET-SNMP

./configure --prefix=/opt/net-snmp \
--with-default-snmp-version=3 \
--with-sys-contact=someone@domain.com \
--with-sys-location=somelocation \
--with-logfile=/opt/net-snmp/log/snmpd.log \
--with-persistent-directory=/opt/net-snmp/var
make
make test
make install
cd /opt/net-snmp
mkdir var
mkdir log
./snmpconf -g basic_setup

4. Start NET-SNMP

/opt/net-snmp/sbin/snmpd -c /opt/net-snmp/bin/snmpd.conf 

5. Create a new start script

::::: /etc/rc3.d/S78net-snmp ::::::
 
#!/sbin/sh
#
# /etc/rc3.d/S78net-snmp
#
# pkill has moved over the years so we need to find it
#
X=`which pkill`
 
case "$1" in
'start')
        /usr/local/sbin/snmpd 
        ;;
 
'stop')
        $X -TERM -x -u 0 snmpd
        ;;
 
*)
        echo "Usage: $0 { start | stop }"
        exit 1
        ;;
esac
exit 0
::::::::::::::::::::::::::::::::::::

6. Try some basic checks

/path/to/snmpget -v 1 -c whatever localhost sysUpTime.0
/path/to/snmpwalk -v 2c -c whatever -m ALL localhost .1.3 | more
snmpwalk -v 2c -c public -m ALL localhost prNames

References:

solaris_snmp.txt · Zuletzt geändert: 2011/07/22 23:26 (Externe Bearbeitung)
 
Falls nicht anders bezeichnet, ist der Inhalt dieses Wikis unter der folgenden Lizenz veröffentlicht: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki