blob: 09388c03e53863cd4f1c5bfd1e9d0b1461e75325 [file] [log] [blame]
Neels Hofmeyr25dd7852017-09-25 16:37:34 +02001== Running OsmoHLR
2
3The OsmoHLR executable (`osmo-hlr`) offers the following command-line
4arguments:
5
6=== SYNOPSIS
7
8*osmo-hlr* [-h|-V] [-d 'DBGMASK'] [-D] [-c 'CONFIGFILE'] [-s] [-T] [-e 'LOGLEVEL'] [-l 'DATABASE']
9
10=== OPTIONS
11
12*-h, --help*::
13 Print a short help message about the supported options
14*-V, --version*::
15 Print the compile-time version number of the OsmoBTS program
16*-d, --debug 'DBGMASK','DBGLEVELS'*::
17 Set the log subsystems and levels for logging to stderr. This
18 has mostly been superseded by VTY-based logging configuration,
19 see <<logging>> for further information.
20*-D, --daemonize*::
21 Fork the process as a daemon into background.
22*-c, --config-file 'CONFIGFILE'*::
23 Specify the file and path name of the configuration file to be
24 used. If none is specified, use `openbsc.cfg` in the current
25 working directory.
26*-s, --disable-color*::
27 Disable colors for logging to stderr. This has mostly been
28 deprecated by VTY based logging configuration, see <<logging>>
29 for more information.
30*-T, --timestamp*::
31 Enable time-stamping of log messages to stderr. This has mostly
32 been deprecated by VTY based logging configuration, see
33 <<logging>> for more information.
34*-e, --log-level 'LOGLEVEL'*::
35 Set the global log level for logging to stderr. This has mostly
36 been deprecated by VTY based logging configuration, see
37 <<logging>> for more information.
38*-l, --database 'DATABASE'*::
39 Specify the file name of the SQLite3 database to use as HLR/AUC
40 storage
41
42=== Bootstrap the Database
43
44Before first launching OsmoHLR, you need to create a database, which can be
45done with these commands:
46
47----
48mkdir -p /var/lib/osmocom
49sqlite3 /var/lib/osmocom/hlr.db < /usr/share/doc/osmo-hlr/hlr.sql
50----
51
52Depending on your installation choices, you will probably find `hlr.sql` in one
53of these locations:
54
55- `/usr/share/doc/osmo-hlr/hlr.sql`
56- `/usr/local/share/doc/osmo-hlr/hlr.sql`
57- in `osmo-hlr.git`'s source tree at `sql/hlr.sql`
58
59NOTE: At the time of writing, OsmoHLR does not create an initial empty database
60automatically, like OsmoNITB did. This behavior may be added in the future.
61
62=== Multiple instances
63
64Running multiple instances of `osmo-hlr` on the same computer is possible if
65all interfaces (VTY, CTRL) are separated using the appropriate configuration
66options. The IP based interfaces are binding to local host by default. In order
67to separate the processes, the user has to bind those services to specific but
68different IP addresses and/or ports.
69
70The VTY and the Control interface can be bound to IP addresses from the loopback
71address range, for example:
72
73----
74line vty
75 bind 127.0.0.2
76ctrl
77 bind 127.0.0.2
78----
79
80The GSUP interface can be bound to a specific IP address by the following
81configuration options:
82
83----
84hlr
85 gsup
86 bind ip 10.23.42.1
87----
88
89NOTE: At the time of writing, OsmoHLR lacks a config option to change the GSUP
90port, which is by default TCP port 4222.