blob: a8abd875db8473c42a00a03f24ba15da0d2979fe [file] [log] [blame]
Harald Welteab599af2011-02-25 16:11:30 +01001= Installing mgw_nat =
2
3... is currently not _that_ simple, I'm working on it.
4
5== Installation procedure (rebar) =
6
7=== checking out mgw_nat ===
8
9{{{
10cd ~/osmo-erlang/
11git clone git://git.osmocom.org/erlang/mgw_nat
12}}}
13
14=== getting + patching rebar ===
15
16{{{
17cd ~/osmo-erlang
18hg clone https://bitbucket.org/basho/rebar
19patch -p1 < ~/osmo-erlang/mgw_nat/rebar-asn1_set.diff
20cd rebar
21./bootstrap
22cp rebar /usr/local/bin/
23}}}
24
25=== building mgw_nat and its dependencies ===
26
27{{{
28cd ~/osmo-erlang/mgw_nat
29rebar get-deps
30rebar compile
31}}}
32some error will occur regarding src/tcap_map_patch.erl due to missing map.hrl file
33{{{
34mv deps/osmo_map/src/map.hrl deps/osmo_map/include/
35rebar compile
36}}}
37
38== Installation procedure (manual) ==
39
40=== Dependencies ===
41
42let's assume we create a new base directory directory {{{~/osmo-erlang}}} for all
43the Osmocom related Erlang code.
44
45As such, we need to set the {{{ERL_LIBS}}} variable to include this directory, e.g.
46by using {{{export ERL_LIBS=~/osmo-erlang/}}} in the shell.
47
48==== osmo_ss7 ====
49
50{{{
51cd ~/osmo-erlang/
52git clone git://git.osmocom.org/erlang/osmo_ss7
53cd osmo_ss7
54erl -make
55}}}
56
57
58==== osmo_map ====
59
60{{{
61cd ~/osmo-erlang/
62git clone git://git.osmocom.org/erlang/osmo_map
63cd osmo_map
64erl -make
65}}}
66
67=== mgw_nat ===
68
69{{{
70cd ~/osmo-erlang/
71git clone git://git.osmocom.org/erlang/mgw_nat
72cd mgw_nat
73erl -make
74}}}
75
76== Configuration file ==
77
78You have to write the config file using the standard Erlang OTP application
79configuration file syntax and store it in e.g. {{{~/osmo-erlang/local.cfg}}}
80
81== Starting the VM / Application ==
82
83* Make sure ERL_LIBS is set (see above)
84{{{
85cd ~/osmo-erlang/
86erl -config ./local.cfg
87}}}
88
89Inside the VM, you can then type
90{{{
91application:start(mgw_nat).
92}}}
93in order to start the application.