root/INSTALL

Revision 436, 8.0 kB (checked in by Dan Pascu <dan@ag-projects.com>, 4 weeks ago)

Added minimum pyrad version dependency

Line 
1
2MediaProxy installation procedure
3---------------------------------
4
5Copyright (c) 2008 AG Projects
6http://ag-projects.com
7
8Authors: Ruud Klaver, Dan Pascu
9
10Home page: http://www.ag-projects.com/MediaProxy.html
11
12For the list of changes between revisions please consult debian/changelog
13
14For information about the MediaProxy architecture, configuring and running
15the dispatcher and the relay, as well as details about the supported
16features and how to use them, please consult the README file.
17
18
19Prerequisites
20-------------
21
22In order to build and install, MediaProxy has the following requirements:
23
24 - Linux (at least 2.6.18) with the following features compiled in:
25   - netfilter support
26   - connection tracking support
27   - connection tracking netlink interface
28   - connection tracking event notification API
29   - netfilter "NOTRACK" target support
30   - netfilter "CONNMARK" target support
31   - netfilter "connmark" match support
32   - IPv4 connection tracking support
33   - IP tables support
34   - IP tables Full NAT support
35   Distribution provided kernel images should normally provide of all these
36   features as modules. The Debian kernel images have all these features
37   available and can be used out of the box.
38 - libnetfilter-conntrack (at least version 0.0.89)
39   Most of the Linux distributions separate a library package into runtime
40   and development packages. To build MediaProxy, the development version
41   is needed (it usually has a -dev suffix in the package name).
42 - Python (at least 2.4)
43   http://python.org
44 - Twisted framework (at least 2.5.0 with epollreactor support)
45   http://twistedmatrix.com
46 - python-zopeinterface (this is also a requirement for twisted)
47   http://zope.org/Products/ZopeInterface
48 - python-application (at least 1.0.9)
49   http://pypi.python.org/pypi/python-application
50 - GNU-TLS
51   http://www.gnu.org/software/gnutls
52 - python-gnutls
53   http://pypi.python.org/pypi/python-gnutls
54 - python-cjson
55   http://pypi.python.org/pypi/python-cjson
56
57For the database accounting module:
58
59 - SQLObject
60   http://sqlobject.org
61
62For the RADIUS accounting module:
63
64 - pyrad (at least 1.1)
65   http://www.wiggy.net/code/pyrad/
66
67
68Installation
69------------
70
71For people running Debian testing or unstable on an i386 architecture there is
72an official public repository provided by AG Projects. To use it, add these
73lines in /etc/apt/sources.list (use unstable/testing as appropriate):
74
75# AG Projects software
76deb     http://ag-projects.com/debian unstable main
77deb-src http://ag-projects.com/debian unstable main
78
79Install the AG Projects debian software signing key:
80
81wget http://download.ag-projects.com/agp-debian-gpg.key
82apt-key add agp-debian-gpg.key
83
84After that, run:
85
86apt-get update
87apt-get install mediaproxy-dispatcher mediaproxy-relay mediaproxy-web-sessions
88
89to install all the packages, or you can install only the packages you actually
90need on that specific system.
91
92In case you want to build your own, please look below to Packaging section.
93
94
95Installing from source
96----------------------
97
98When installing from source, first make sure the above mentioned prerequisites
99are installed. If the distribution you are running has them already packaged,
100you should install the distribution provided packages, else you'll have to
101install them from source. If you install them as packages, make sure that you
102also install the development versions for python and libnetfilter-conntrack in
103order to be able to build MediaProxy. If you have to install something from
104source, please consult the installation instructions for that specific package
105in order to find out how to install it. For python packages there is a simple
106method to install them by running easy_install (make sure to run them as root):
107
108easy_install twisted
109easy_install zope.interface
110easy_install python-application
111easy_install python-cjson
112easy_install python-gnutls # this needs libgnutls-dev >= 2.4.1 installed
113easy_install sqlobject
114easy_install pyrad
115
116All of the above should work out of the box, except python-gnutls which needs
117libgnutls-dev at least version 2.4.1 to be installed to succeed.
118
119An alternative method to install the python packages is to download, unpack
120and run (as root):
121
122./setup.py build; ./setup.py install
123
124for each of them in the directories where they were unpacked.
125
126It should be noted that this only needs to be done for the packages that are
127not provided already by your distribution, otherwise it is recommended to use
128the distribution provided packages unless they do not meet the minimum version
129requirements mentioned above or if they exhibit problems at runtime.
130
131After all the prerequisites are installed, MediaProxy can be installed either
132as a system wide package or in a standalone directory.
133
1341. To install it as a system wide package, run (as root):
135
136./setup.py build
137./setup.py install
138
139in the directory where you unpacked MediaProxy.
140
1412. To install in a standalone directory, unpack MediaProxy to the directory
142where you want it placed. Then change to that directory and run:
143
144./build_inplace
145
146After this MediaProxy components can be run from that directory.
147
148In both cases, you can use the Debian startup scripts in the Debian
149subdirectory, mediaproxy-dispatcher.init and mediaproxy-relay.init as
150examples to create your own startup scripts for your distribution.
151
152
153Packaging
154---------
155
156The MediaProxy source already includes the necessary files to build Debian
157packages. They should probably also work without changes for Ubuntu, though
158they have not been tested with it.
159
160To build Debian/Ubuntu packages, you can do the following (this is known to
161work with Debian testing and unstable and should work without changes in
162Ubuntu 8.04 Hardy as well, though they were not tested there):
163
164apt-get update
165apt-get install devscripts cdbs debhelper python-all-dev python-support \
166                libnetfilter-conntrack-dev python-application python-cjson \
167                python-gnutls python-twisted-core python-twisted-names \
168                python-zopeinterface python-pyrad python-sqlobject
169
170then unpack MediaProxy and in the directory where it was unpacked run:
171
172debuild
173
174You can safely ignore the pgp signing error at the end of the build process,
175that is only because you do not have the pgp key for the person who is listed
176as maintainer for the package. The packages are build fine even if they are
177not signed.
178
179After building them, you can find the .deb packages in the parent directory,
180from where you can install them using dpkg:
181
182cd ../
183dpkg -i mediaproxy-*.deb
184
185or you can install just the ones you need on that particular system.
186Please note that mediaproxy-dispatcher and mediaproxy-relay both depend on
187mediaproxy-common so you have to install it too along with either of them.
188
189
190Configuration file
191------------------
192
193The configuration file is named config.ini and a config.ini.sample file is
194provided in the source. You can copy config.ini.sample to config.ini and
195modify it to suit your needs. The sample configuration file is commented and
196self-explanatory. Both the dispatcher and the relay read their configuration
197from the same file but from different sections. If either of them is not
198installed on a given system, its specific sections are ignored, so you only
199need to configure the sections for the installed component(s).
200
201MediaProxy will look for both a local configuration file, which is placed in
202the same directory as the media-relay and media-dispather scripts, and a
203system configuration file which is placed in /etc/mediaproxy/
204
205Even though a local configuration file can be used in any case, it only makes
206sense to be used in the standalone installation case, where MediaProxy lives
207in its own directory and there is a reason to contain all the MediaProxy
208related files to a single directory.
209
210For system wide installations, where the media-relay and media-dispatcher
211scripts reside in /usr/bin or /usr/local/bin, it makes little sense to
212place a local configuration file there, so in this case using the system
213configuration file in /etc/mediaproxy/config.ini is recommended.
214
215When both configuration files are present, both will be read and the settings
216in the local configuration will override the ones in the system configuration.
Note: See TracBrowser for help on using the browser.