Neels Hofmeyr | 25dd785 | 2017-09-25 16:37:34 +0200 | [diff] [blame] | 1 | == Running OsmoHLR |
| 2 | |
| 3 | The OsmoHLR executable (`osmo-hlr`) offers the following command-line |
| 4 | arguments: |
| 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 | |
| 44 | Before first launching OsmoHLR, you need to create a database, which can be |
| 45 | done with these commands: |
| 46 | |
| 47 | ---- |
| 48 | mkdir -p /var/lib/osmocom |
| 49 | sqlite3 /var/lib/osmocom/hlr.db < /usr/share/doc/osmo-hlr/hlr.sql |
| 50 | ---- |
| 51 | |
| 52 | Depending on your installation choices, you will probably find `hlr.sql` in one |
| 53 | of 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 | |
| 59 | NOTE: At the time of writing, OsmoHLR does not create an initial empty database |
| 60 | automatically, like OsmoNITB did. This behavior may be added in the future. |
| 61 | |
| 62 | === Multiple instances |
| 63 | |
| 64 | Running multiple instances of `osmo-hlr` on the same computer is possible if |
| 65 | all interfaces (VTY, CTRL) are separated using the appropriate configuration |
| 66 | options. The IP based interfaces are binding to local host by default. In order |
| 67 | to separate the processes, the user has to bind those services to specific but |
| 68 | different IP addresses and/or ports. |
| 69 | |
| 70 | The VTY and the Control interface can be bound to IP addresses from the loopback |
| 71 | address range, for example: |
| 72 | |
| 73 | ---- |
| 74 | line vty |
| 75 | bind 127.0.0.2 |
| 76 | ctrl |
| 77 | bind 127.0.0.2 |
| 78 | ---- |
| 79 | |
| 80 | The GSUP interface can be bound to a specific IP address by the following |
| 81 | configuration options: |
| 82 | |
| 83 | ---- |
| 84 | hlr |
| 85 | gsup |
| 86 | bind ip 10.23.42.1 |
| 87 | ---- |
| 88 | |
| 89 | NOTE: At the time of writing, OsmoHLR lacks a config option to change the GSUP |
| 90 | port, which is by default TCP port 4222. |