Debian Codegraph @

INSTALL

raw
1 TABLE OF CONTENTS
2 =================
3
4 Table Of Contents
5 Quick Instructions
6 * Net-SNMP Specific Information
7 Long (but you should read these) Instructions
8 Installing the Perl/SNMP Module
9 * Compilers and Options
10 Compiling For Multiple Architectures
11 Installation Names
12 Optional Features
13 Sharing Defaults
14 Operation Controls
15
16 * = required reading
17
18 QUICK INSTRUCTIONS
19 ==================
20
21 1) Run ./configure
22 (type "./configure --help" for a quick usage summary.)
23 (--prefix=PATH will change the default /usr/local installation path.)
24 (see "Compilers and Options" on changing the compiler to use)
25
26 2) Optionally edit include/net-snmp/net-snmp-config.h
27 (due to prompting done by the configure script, this is very rarely
28 necessary.)
29
30 3) make
31
32 4) Run the next command as root:
33 5) make install
34
35 6) configure the agent
36 (either using 'snmpconf' or by crafting an snmpd.conf file manually.
37 The file 'EXAMPLE.conf' may be a suitable starting point)
38
39 Note: By default, everything will be installed in /usr/local.
40 (see below for more instructions)
41
42 Net-SNMP Specific Information
43 =============================
44
45 As of UCD-SNMP V3.3.1 the configuration files are now looked for in
46 $(prefix)/share/snmp, where ($prefix) is defined as the value passed
47 to the --prefix argument of the configure script, or /usr/local if
48 undefined. In version 3.0.3 till 3.3, the files were kept in
49 $(prefix)/lib/snmp
50
51 Optional features to pass to configure for Net-SNMP can be obtained by
52 running configure --help.
53
54 LONG (but you should read these) INSTRUCTIONS
55 =============================================
56
57 The `configure' shell script attempts to guess correct values for
58 various system-dependent variables used during compilation. It uses
59 those values to create a `Makefile' in each directory of the package.
60 It may also create one or more `.h' files containing system-dependent
61 definitions. Finally, it creates a shell script `config.status' that
62 you can run in the future to recreate the current configuration, a file
63 `config.cache' that saves the results of its tests to speed up
64 reconfiguring, a file `config.log' containing compiler output
65 (useful mainly for debugging `configure') and a file `configure-summary'
66 containing the summary displayed at the end of the `configure' run.
67
68 The file `include/net-snmp/net-snmp-config.h' is also generated
69 at this time. It contains IMPORTANT information such as the location
70 of log and configuration files. In some special cases you may need to
71 modify this file but it is prefererable to work out a way of getting
72 `configure' to set things up for your particular environment.
73
74 As the `configure' invocation often gets lengthy and difficult to
75 type or if you have several different ways you want to configure a
76 system, you may want to create a shell script containing your invocation.
77
78 If you need to do unusual things to compile the package, please try
79 to figure out how `configure' could check whether to do them, and mail
80 diffs or instructions to the address given in the `README' so they can
81 be considered for the next release. If at some point `config.cache'
82 contains results you don't want to keep, you may remove or edit it.
83
84 The file `configure.ac' is used to create `configure' by a program
85 called `autoconf'. You only need `configure.ac' if you want to change
86 it or regenerate `configure' using a newer version of `autoconf'.
87
88 The simplest way to compile this package is:
89
90 1. `cd' to the directory containing the package's source code and type
91 `./configure' to configure the package for your system. If you're
92 using `csh' on an old version of System V, you might need to type
93 `sh ./configure' instead to prevent `csh' from trying to execute
94 `configure' itself.
95
96 Running `configure' takes awhile. While running, it prints some
97 messages telling which features it is checking for. When it
98 completes it prints a short message (also available in configure-summary)
99 indicating what functionality will be available when compiled.
100
101 2. If necessary, edit include/net-snmp/net-snmp-config.h (see above).
102
103 3. Type `make' to compile the package.
104
105 4. Type `make test' which runs a variety of tests to see what functionality
106 has been incorporated and if it works.
107
108 5. Type `make install' to install the programs and any data files and
109 documentation.
110
111 6. You can remove the program binaries and object files from the
112 source code directory by typing `make clean'. To also remove the
113 files that `configure' created (so you can compile the package for
114 a different kind of computer), type `make distclean'.
115
116 7. You can remove the application (but not the perl or python modules)
117 by typing `make uninstall'.
118
119 There may be additional installation issues discussed in the
120 README's for various platforms such as README.solaris.
121
122
123 Installing the Perl/SNMP Module
124 ===============================
125
126 The Perl/SNMP Module is now bundled with the net-snmp package
127 (which includes other Net-SNMP specific modules as well), all of which
128 are located in the net-snmp/perl directory. The Perl package provides
129 a high level abstract interface to the functionality found in the
130 Net-SNMP libraries and daemon applications.
131
132 It is recommended you install the perl modules as you build the
133 Net-SNMP package. The configure script can be run as follows to
134 automatically find perl and use it to install the perl modules:
135
136 ./configure --with-perl-modules
137
138 If you wish to use the embedded perl support available in the
139 Net-SNMP agent (and starting in Net-SNMP 5.2, the trap receiver),
140 then use the following option instead:
141
142 ./configure --enable-embedded-perl --enable-shared
143
144 Starting with Net-SNMP 5.4, configure enables embedded Perl and the
145 Perl modules by default when possible unless explicitly disabled.
146
147 If you wish to build the perl modules by hand, *install Net-SNMP
148 first* and then change directories to the perl subdirectory and:
149
150 Run:
151 cd perl
152 perl Makefile.PL
153 make
154 make test
155 make install (as root)
156
157
158 Compilers and Options
159 =====================
160
161 Some systems require unusual options for compilation or linking that
162 the `configure' script does not know about. You can give `configure'
163 initial values for variables by setting them in the environment. Using
164 a Bourne-compatible shell, you can do that on the command line like
165 this:
166 CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
167
168 Or on systems that have the `env' program, you can do it like this:
169 env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
170
171 Compiling For Multiple Architectures
172 ====================================
173
174 You can compile the package for more than one kind of computer at the
175 same time, by placing the object files for each architecture in their
176 own directory. To do this, you must use a version of `make' that
177 supports the `VPATH' variable, such as GNU `make'. `cd' to the
178 directory where you want the object files and executables to go and run
179 the `configure' script. `configure' automatically checks for the
180 source code in the directory that `configure' is in and in `..'.
181
182 If you have to use a `make' that does not supports the `VPATH'
183 variable, there is a `maketarget' script that will generate a symlink'ed
184 shadow-directory for the object files. Do a `sh maketarget', then `cd' into
185 targets/`config.guess` and do the configuration and installation.
186
187 Installation Names
188 ==================
189
190 By default, `make install' will install the package's files in
191 `/usr/local/bin', `/usr/local/man', etc. You can specify an
192 installation prefix other than `/usr/local' by giving `configure' the
193 option `--prefix=PATH'.
194
195 You can specify separate installation prefixes for
196 architecture-specific files and architecture-independent files. If you
197 give `configure' the option `--exec-prefix=PATH', the package will use
198 PATH as the prefix for installing programs and libraries.
199 Documentation and other data files will still use the regular prefix.
200
201 If the package supports it, you can cause programs to be installed
202 with an extra prefix or suffix on their names by giving `configure' the
203 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
204
205 Optional Features
206 =================
207
208 Some packages pay attention to `--enable-FEATURE' options to
209 `configure', where FEATURE indicates an optional part of the package.
210 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
211 is something like `gnu-as' or `x' (for the X Window System). The
212 `README' should mention any `--enable-' and `--with-' options that the
213 package recognizes.
214
215 For packages that use the X Window System, `configure' can usually
216 find the X include and library files automatically, but if it doesn't,
217 you can use the `configure' options `--x-includes=DIR' and
218 `--x-libraries=DIR' to specify their locations.
219
220 Specifying the System Type
221 ==========================
222
223 There may be some features `configure' can not figure out
224 automatically, but needs to determine by the type of host the package
225 will run on. Usually `configure' can figure that out, but if it prints
226 a message saying it can not guess the host type, give it the
227 `--host=TYPE' option. TYPE can either be a short name for the system
228 type, such as `sun4', or a canonical name with three fields:
229 CPU-COMPANY-SYSTEM
230
231 See the file `config.sub' for the possible values of each field. If
232 `config.sub' isn't included in this package, then this package doesn't
233 need to know the host type.
234
235 If you are building compiler tools for cross-compiling, you can also
236 use the `--target=TYPE' option to select the type of system they will
237 produce code for and the `--build=TYPE' option to select the type of
238 system on which you are compiling the package.
239
240 Sharing Defaults
241 ================
242
243 If you want to set default values for `configure' scripts to share,
244 you can create a site shell script called `config.site' that gives
245 default values for variables like `CC', `cache_file', and `prefix'.
246 `configure' looks for `PREFIX/share/config.site' if it exists, then
247 `PREFIX/etc/config.site' if it exists. Or, you can set the
248 `CONFIG_SITE' environment variable to the location of the site script.
249 A warning: not all `configure' scripts look for a site script.
250
251 Operation Controls
252 ==================
253
254 `configure' recognizes the following options to control how it
255 operates.
256
257 `--cache-file=FILE'
258 Use and save the results of the tests in FILE instead of
259 `./config.cache'. Set FILE to `/dev/null' to disable caching, for
260 debugging `configure'.
261
262 `--help'
263 Print a summary of the options to `configure', and exit.
264
265 `--quiet'
266 `--silent'
267 `-q'
268 Do not print messages saying which checks are being made.
269
270 `--srcdir=DIR'
271 Look for the package's source code in directory DIR. Usually
272 `configure' can determine that directory automatically.
273
274 `--version'
275 Print the version of Autoconf used to generate the `configure'
276 script, and exit.
277
278 `configure' also accepts some other, not widely useful, options.
279