added missing file
[public/netxms.git] / INSTALL
CommitLineData
282c9f4c
IK
1Deployment of netxms should start from installation of NetXMS server which
2does most of work and then distributing netxms agent all over the network
3where it is possible and needed.
4
5Basic NetXMS Installation
6=========================
d16cf8a5 7
27edcf09 8 These are generic installation instructions. For more detailed
df7156b3
VK
9installation instruction consult NetXMS Installation Guide (located in
10doc/manuals, also available separately on NetXMS web site).
d16cf8a5 11
282c9f4c 12The simplest way to install netxms server is:
d16cf8a5 13
27edcf09
IK
14 1. Get current distribution from www.netxms.org using any of methods
15 available.
16 For ex.: fetch http://www.netxms.org/download/netxms-0.1.20.tar.gz
17 (do not just copy-paste line above, there might be newer version
18 available).
d16cf8a5 19
27edcf09
IK
20 2. Unpack distribution.
21 For ex. gunzip netxms-0.1.20.tar.gz; tar xf netxms-0.1.20.tar
d16cf8a5 22
27edcf09 23 3. `cd' to the directory containing the package's source code and type
d16cf8a5
AK
24 `./configure' to configure the package for your system. If you're
25 using `csh' on an old version of System V, you might need to type
26 `sh ./configure' instead to prevent `csh' from trying to execute
27 `configure' itself.
28
29 Running `configure' takes awhile. While running, it prints some
30 messages telling which features it is checking for.
31
27edcf09
IK
32 Please note: if You're willing to install netxms server - in most cases
33 You should specify also --with-server and --with-[dbname] parameters
34 for configure script where [dbname] is database driver name You're
35 going to use. Try ./configure --help to see all possible
36 parameters.
37
a6fafafc 38 For example:
27edcf09
IK
39 ./configure --with-server --with-agent --with-mysql=/opt/mysql \
40 --prefix=/opt/netxms
41 Will configure distribution to build both server and agent and to build
42 mysql driver for netxms using mysql libraries from mysql distribution
282c9f4c
IK
43 located in /opt/mysql. Distribution will be configured also to be
44 installed in /opt/netxms.
d16cf8a5 45
27edcf09 46 4. Type `make' to compile the package.
d16cf8a5 47
27edcf09 48 5. Type `make install' to install the programs and any data files and
d16cf8a5 49 documentation.
27edcf09 50
df7156b3
VK
51 6. Copy default netxms daemon configuration file ('netxmsd.conf-dist') to /etc
52 directory with name 'netxmsd.conf' and edit it to match actual settings.
53 You can do it like this:
36a639ee 54 cp ./contrib/netxmsd.conf-dist /etc/netxmsd.conf
df7156b3
VK
55 vi /etc/netxmsd.conf
56
57 7. Use sql/dbinit_[dbname].sql script and Your database client
27edcf09 58 program to initialize database for netxms.
a6fafafc 59 For example if You're going to use mysql this could be like this:
27edcf09
IK
60
61 mysql> create database netxms;
62 mysql> \q
df7156b3 63 $> nxdbmgr init sql/dbinit_mysql.sql
27edcf09 64
27edcf09 65 8. `cd' to netxms installation directory and try running bin/netxmsd.
282c9f4c 66 Check if netsmd process is running. If not try starting it again with
27edcf09
IK
67 --debug-all parameter and see log file for details.
68
69 9. If You see netxmsd running - You have just successfuly installed netxms
70 monitoring server. Try connecting with netxms console. Default
71 login/pass are admin/netxms.
72
282c9f4c 73 10. If You succeeded to connect - first action You should do is
a6fafafc 74 changing password (see netxms console docs for details).
27edcf09
IK
75
76 11. Repeat steps 1-5 on each server which needs to be monitored using just
77 "./configure --with-agent --prefix=..." as parameters. You don't need
282c9f4c 78 server and database driver/libraries for agent.
528ec093
IK
79 12. Copy default netxms agent daemon configuration file ('nxagentd.conf-dist')
80 to /etc directory with name 'nxagentd.conf' and edit it to match actual
81 settings.
82 You can do it like this:
83 cp ./nxagentd.conf-dist /etc/nxagentd.conf
84 vi /etc/nxagentd.conf
85 13. Start nxagentd and check that it is running
86 (do it same way as netxms server).
d16cf8a5 87
27edcf09
IK
88Upgrading
89=========
282c9f4c 90See UPGRADE file in root source directory for details of upgrade procedure.
27edcf09
IK
91Agent upgrades can be done automatically. New agent versions are distributed
92to all servers by netxms server. This can be done from netxms console. So
93You need to build agents only once - during initial installation.
94
95
96Advanced installation/build details
97===================================
98
99 If you need to do unusual things to compile the package, please try
100to figure out how `configure' could check whether to do them, and mail
101diffs or instructions to the address given in the `README' so they can
102be considered for the next release. If at some point `config.cache'
103contains results you don't want to keep, you may remove or edit it.
104
105 The file `configure.in' is used to create `configure' by a program
106called `autoconf'. You only need `configure.in' if you want to change
107it or regenerate `configure' using a newer version of `autoconf'.
d16cf8a5
AK
108
109Compilers and Options
110=====================
111
112 Some systems require unusual options for compilation or linking that
113the `configure' script does not know about. You can give `configure'
114initial values for variables by setting them in the environment. Using
115a Bourne-compatible shell, you can do that on the command line like
116this:
117 CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
118
119Or on systems that have the `env' program, you can do it like this:
120 env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
121
122Compiling For Multiple Architectures
123====================================
124
125 You can compile the package for more than one kind of computer at the
126same time, by placing the object files for each architecture in their
127own directory. To do this, you must use a version of `make' that
128supports the `VPATH' variable, such as GNU `make'. `cd' to the
129directory where you want the object files and executables to go and run
130the `configure' script. `configure' automatically checks for the
131source code in the directory that `configure' is in and in `..'.
132
133 If you have to use a `make' that does not supports the `VPATH'
134variable, you have to compile the package for one architecture at a time
135in the source code directory. After you have installed the package for
136one architecture, use `make distclean' before reconfiguring for another
137architecture.
138
139Installation Names
140==================
141
142 By default, `make install' will install the package's files in
143`/usr/local/bin', `/usr/local/man', etc. You can specify an
144installation prefix other than `/usr/local' by giving `configure' the
145option `--prefix=PATH'.
146
147 You can specify separate installation prefixes for
148architecture-specific files and architecture-independent files. If you
149give `configure' the option `--exec-prefix=PATH', the package will use
150PATH as the prefix for installing programs and libraries.
151Documentation and other data files will still use the regular prefix.
152
153 In addition, if you use an unusual directory layout you can give
154options like `--bindir=PATH' to specify different values for particular
155kinds of files. Run `configure --help' for a list of the directories
156you can set and what kinds of files go in them.
157
158 If the package supports it, you can cause programs to be installed
159with an extra prefix or suffix on their names by giving `configure' the
160option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
161
162Optional Features
163=================
164
165 Some packages pay attention to `--enable-FEATURE' options to
166`configure', where FEATURE indicates an optional part of the package.
167They may also pay attention to `--with-PACKAGE' options, where PACKAGE
168is something like `gnu-as' or `x' (for the X Window System). The
169`README' should mention any `--enable-' and `--with-' options that the
170package recognizes.
171
172 For packages that use the X Window System, `configure' can usually
173find the X include and library files automatically, but if it doesn't,
174you can use the `configure' options `--x-includes=DIR' and
175`--x-libraries=DIR' to specify their locations.
176
177Specifying the System Type
178==========================
179
180 There may be some features `configure' can not figure out
181automatically, but needs to determine by the type of host the package
182will run on. Usually `configure' can figure that out, but if it prints
183a message saying it can not guess the host type, give it the
184`--host=TYPE' option. TYPE can either be a short name for the system
185type, such as `sun4', or a canonical name with three fields:
186 CPU-COMPANY-SYSTEM
187
188See the file `config.sub' for the possible values of each field. If
189`config.sub' isn't included in this package, then this package doesn't
190need to know the host type.
191
192 If you are building compiler tools for cross-compiling, you can also
193use the `--target=TYPE' option to select the type of system they will
194produce code for and the `--build=TYPE' option to select the type of
195system on which you are compiling the package.
196
197Sharing Defaults
198================
199
200 If you want to set default values for `configure' scripts to share,
201you can create a site shell script called `config.site' that gives
202default values for variables like `CC', `cache_file', and `prefix'.
203`configure' looks for `PREFIX/share/config.site' if it exists, then
204`PREFIX/etc/config.site' if it exists. Or, you can set the
205`CONFIG_SITE' environment variable to the location of the site script.
206A warning: not all `configure' scripts look for a site script.
207
208Operation Controls
209==================
210
211 `configure' recognizes the following options to control how it
212operates.
213
214`--cache-file=FILE'
215 Use and save the results of the tests in FILE instead of
216 `./config.cache'. Set FILE to `/dev/null' to disable caching, for
217 debugging `configure'.
218
219`--help'
220 Print a summary of the options to `configure', and exit.
221
222`--quiet'
223`--silent'
224`-q'
225 Do not print messages saying which checks are being made. To
226 suppress all normal output, redirect it to `/dev/null' (any error
227 messages will still be shown).
228
229`--srcdir=DIR'
230 Look for the package's source code in directory DIR. Usually
231 `configure' can determine that directory automatically.
232
233`--version'
234 Print the version of Autoconf used to generate the `configure'
235 script, and exit.
236
237`configure' also accepts some other, not widely useful, options.
22f6cb35 238