How to install MediaProxy on CentOS
Okay, today I'll show you how to install Mediaproxy on CentOS. The installation is pretty straightforward, so anyone can have MediaProxy up and running from stratch within 15 minutes. So let's see how to install MediaProxy on CentOS.
Fasten your seatbelt, and let's begin the installation Make sure that you have RPMForge repo added. If not you can find the instructions here. Let's see the necessary packages what you will need to install:
For me it is much easier to have everything installed from source, I'm not big fan of yum. In case if you going to install the necessary packages, here you can find the required ones: Python-cjson Python-application Python-gnutls Twisted Please look at the prerequisities of building MediaProxy In order to build and install, MediaProxy has the following requirements: - Linux (at least 2.6.18) with the following features compiled in: - netfilter support - connection tracking support - connection tracking netlink interface - connection tracking event notification API - netfilter "NOTRACK" target support - netfilter "CONNMARK" target support - netfilter "connmark" match support - IPv4 connection tracking support - IP tables support - IP tables Full NAT support Distribution provided kernel images should normally provide of all these features as modules. The Debian kernel images have all these features available and can be used out of the box. - libnetfilter-conntrack (at least version 0.0.89) Most of the Linux distributions separate a library package into runtime and development packages. To build MediaProxy, the development version is needed (it usually has a -devel suffix in the package name). - iptables (at least version 1.4.3) To build MediaProxy, the development version is needed (usually has a -dev suffix in the package name). For running the development package is not needed, only plain iptables is enough. - Python (at least 2.5) http://python.org - Twisted framework (at least 2.5.0 with epollreactor support) http://twistedmatrix.com - python-zopeinterface (this is also a requirement for twisted) http://zope.org/Products/ZopeInterface - python-application (at least 1.2.8) http://pypi.python.org/pypi/python-application - GNU-TLS http://www.gnu.org/software/gnutls - python-gnutls (at least 1.1.8) http://pypi.python.org/pypi/python-gnutls - python-cjson http://pypi.python.org/pypi/python-cjson For python packages there is a simple method to install them by running easy_install (make sure to run them as root): easy_install twisted easy_install zope.interface easy_install python-application easy_install python-cjson easy_install python-gnutls # this needs libgnutls-dev >= 2.4.1 installed easy_install sqlobject easy_install pyrad All of the above should work out of the box, except python-gnutls which needs libgnutls-dev at least version 2.4.1 to be installed to succeed. An alternative method to install the python packages is to download, unpack and run (as root): ./setup.py build; ./setup.py install for each of them in the directories where they were unpacked. It should be noted that this only needs to be done for the packages that are not provided already by your distribution, otherwise it is recommended to use the distribution provided packages unless they do not meet the minimum version requirements mentioned above or if they exhibit problems at runtime. After all the prerequisites are installed, MediaProxy can be installed either as a system wide package or in a standalone directory. 1. To install it as a system wide package, run (as root): ./setup.py build ./setup.py install in the directory where you unpacked MediaProxy. 2. To install in a standalone directory, unpack MediaProxy to the directory where you want it placed. Then change to that directory and run: ./build_inplace After this MediaProxy components can be run from that directory. The configuration file is named config.ini and a config.ini.sample file is provided in the source. You can copy config.ini.sample to config.ini and modify it to suit your needs. The sample configuration file is commented and self-explanatory. Both the dispatcher and the relay read their configuration from the same file but from different sections. If either of them is not installed on a given system, its specific sections are ignored, so you only need to configure the sections for the installed component(s). MediaProxy will look for both a local configuration file, which is placed in the same directory as the media-relay and media-dispather scripts, and a system configuration file which is placed in /etc/mediaproxy/ Even though a local configuration file can be used in any case, it only makes sense to be used in the standalone installation case, where MediaProxy lives in its own directory and there is a reason to contain all the MediaProxy related files to a single directory. For system wide installations, where the media-relay and media-dispatcher scripts reside in /usr/bin or /usr/local/bin, it makes little sense to place a local configuration file there, so in this case using the system configuration file in /etc/mediaproxy/config.ini is recommended. When both configuration files are present, both will be read and the settings in the local configuration will override the ones in the system configuration.
Aug 08, 2013 by Klaus F.
Most of the people are using it under Debian. It's the time to see it on Centos, thank you!