1<?xml version='1.0' encoding='UTF-8'?>
2<!DOCTYPE section PUBLIC '-//OASIS//DTD DocBook XML V4.2//EN'
3	'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'[
4	<!ENTITY % local.common.attrib "xml:base  CDATA  #IMPLIED">
5]>
6
7<section><title>Installation and running</title>
8
9<para>Presence modules use some dynamic libraries distributed with SIP-router and the
10compilation procedure and running is a bit more difficult than usual. For detailed
11description of libraries see their separate documentation (stored in
12<filename>lib/doc</filename> subdirectory of main SIP-router directory).</para>
13
14<section><title>Incompatibility</title>
15<para>XCAP module needed for authorization is not working with TLS module. For
16more information see <xref linkend="pres.known_problems"/>.
17</para>
18</section>
19
20<section id="pres.dependencies"><title>Dependencies</title>
21<para>Presence module dependecies may be found in sections <link
22linkend="pa.dependencies">PA module dependencies</link> and <link
23linkend="rls.dependencies">RLS module dependencies</link>. These modules depend
24on common libraries which have their own dependencies as mentioned below.
25</para>
26
27<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
28	href="../../lib/doc/libraries.xml"
29	xpointer="xpointer(id('lib.dependencies')/child::*[not(self::title)])">
30	<xi:fallback>
31		<para><emphasis>Missing dependencies for common
32		libraries!</emphasis></para>
33	</xi:fallback>
34</xi:include>
35<!--<para>Presence modules and common libraries need these external libraries installed
36(development versions, with header files):</para>
37<itemizedlist>
38	<listitem><para>libxml2</para></listitem>
39	<listitem><para>libcurl3</para></listitem>
40</itemizedlist>-->
41</section>
42
43<section><title>Installation from CVS</title>
44<para>There is an example of steps which need to be done while installing SIP-router
45with shared libraries into directory /base/ser/directory (if no directory specified -
46no prefix parameter given - default value is used: /usr/local/)
47<orderedlist>
48	<listitem><para>Download current SIP-router sources:</para>
49	<para><userinput>cvs -d :pserver:anonymous@cvs.berlios.de:/cvsroot/ser checkout sip_router</userinput>
50	</para></listitem>
51
52	<listitem><para>Download very useful <application>ser_ctl</application> utility
53	(not necessary, but it is handy for adding data into database, running
54	XML-RPC functions etc):</para>
55	<para><userinput>cvs -d :pserver:anonymous@cvs.berlios.de:/cvsroot/ser checkout serctl</userinput>
56	</para></listitem>
57
58	<listitem><para>Compile and install SIP-router with presence modules. Common
59	libraries should be compiled automaticaly - it may fail in the case of
60	unsatisfied library dependencies. You need to install all external libraries
61	introduced in <xref linkend="pres.dependencies"/></para>
62	<para><userinput>cd sip_router</userinput></para>
63	<para><userinput>make install group_include="standard,presence,standard-dep" prefix=/base/ser/directory</userinput></para>
64	</listitem>
65</orderedlist>
66</para>
67</section> <!-- Installation from CVS -->
68
69<section><title>Presence snapshots</title>
70<para>In past there were published <quote>presence snapshots</quote> with stable
71and tested code and up to date documentation. This will change - tested and
72documented stable features will be probably imported into stable SIP-router branch
73(Ottendorf) and unstable ones will remain in CVS head.
74</para>
75</section> <!-- snapshots -->
76
77<section><title>Running SIP-router</title>
78<para>Linker used for dynamic linking must know, where to find these libraries.
79This may be done by setting <varname>LD_LIBRARY_PATH</varname> before
80startup.</para>
81<para><userinput>export LD_LIBRARY_PATH=/base/ser/directory/lib/ser</userinput></para>
82<para><userinput>/base/ser/directory/sbin/ser -f /base/ser/directory/etc/ser/ser.cfg</userinput></para>
83
84<warning>If you want to run SIP-router under sudo like <quote>sudo /base/ser/directory/sbin/ser -f
85/base/ser/directory/etc/ser/ser.cfg</quote> it need not work - it is possible
86that LD_LIBRARY_PATH will not be propagated in this case!</warning>
87</section> <!-- running SIP-router -->
88
89<section><title>Database initialization</title>
90<warning>
91<para>This paragraph can be out-of-dated by changes in DB init scripts or in
92ser_ctl. It has only informative value!</para>
93</warning>
94<para>It is very handy to use SIP-router together with database - at least domains and
95users with attributes can be stored there. First must be database created -
96there are scripts to do this in SIP-router's source tree in directory scripts; for
97example "scripts/mysql/ser_mysql.sh create" will create the database for MySQL.
98<note><para>Later MySQL versions can complain with current script, if so, you
99can try to remove qotes around $PW in script to get it into work.</para></note>
100</para>
101
102<para>After database creation you can add data using
103<application>ser_ctl</application> utility:
104<itemizedlist>
105	<listitem><para>add domain:</para>
106	<para><userinput>ser_domain add test test-domain.com</userinput></para></listitem>
107	<listitem><para>add user <quote>parf</quote> with password <quote>parf</quote>:</para>
108	<para><userinput>ser_user add parf</userinput></para>
109	<para><userinput>ser_uri add parf parf@test-domain.com</userinput></para>
110	<para><userinput>ser_cred add parf parf test test-domain.com parf</userinput></para>
111	</listitem>
112</itemizedlist>
113</para>
114
115<note>
116<para>Running ser_xxx without arguments shows help.</para>
117<para>You can specify database URI used by <application>ser_ctl</application>;
118for example you can use <quote>postgres://...</quote> instead of default
119<quote>mysql://...</quote> etc.</para>
120</note>
121
122</section>
123
124</section>
125