How to compile Net-SNMP Libraries for Linux PPC Arch
Introduction
This article describes how to build Net-SNMP Libraries for Linux PPC architecture. Although this article is specific to ppc architecture, but the steps can be used for any architecture.
Obtaining the Net- SNMP Libraries
The Net-Snmp files that this article is based on are listed below and were obtained from the Net-Snmp’s sourceforge website, http://sourceforge.net/projects/net-snmp/files/net-snmp/5.7.3/
File | Description |
net-snmp-5.7.3.tar.gz | For Linux Build |
Build Steps
The Following steps were followed to build libraries for Linux PPC environment
- Set the environment for the ppc build .
- Download net-snmp open source tar file from, http://net-snmp.sourceforge.net/.
- Copy the source code net-snmp-5.7.3.tar.gz to your server
- Then Untar: tar xvfz net-snmp-5.7.3.tar.gz
- cd net-snmp-5.7.3
- Edit the configure script:-
In the "configure" script in the Net-SNMP root directory find the line
test –n "$host_alias" && ac_tool_prefix=$host_alias-
And change to
test –n "$host_alias" && ac_tool_prefix=ppc_82xx - Run configure with the following options configure --host=ppc-hardhat-linux --target=ppc-motorola-linux --build=i686-pc-linux --with-cc=ppc_82xx-gcc --with-ar=ppc_82xx-ar --with-endianness=big --with-cflags="-s -O2 -Dlinux" --with-openssl --without-perl-modules --disable-embedded-perl --disable-perl-cc-checks --prefix=/usr --disable-debugging --disable-manuals
*note here the version of OpenSSL use in the version which is installed on your server - Just press enter when asked for or whatever you requireDefault version of SNMP to use (3):
System Contact Information (@@no.where):
System Location (Unknown):
Location to write logfile (/var/log/snmpd.log):
Location to write persistent information (/var/net-snmp):This will set all the defaults options. - Just type make in the net-snmp.5.7.3 directory to build Net-SNMP tools and libraries
- The following files are created which will needs to be copied to your server :- • net-snmp-5.7.3/snmplib/.libs - libnetsnmp.so.30.0.3 (copy to /lib on your server)
• net-snmp-5.7.3/agent/.libs - libnetsnmpagent.so.30.0.3 (copy to /lib on your server)
• net-snmp-5.7.3/agent/.libs - libnetsnmpmibs.so.30.0.3 (copy to /lib on your server)
• net-snmp-5.7.3/agent/.libs/ -snmpd (copy to /usr/sbin on your server) - The above files can be stripped using the following command
ppc_82xx-strip --remove-section=.note --remove-section=.comment filename - Run the Net-SNMP daemon as /usr/sbin/snmpd -f. That's it!!
This comment has been removed by a blog administrator.
ReplyDelete