Clone this wiki locally
We remind you that Cumulus is licensed under the GNU General Public License, so CumulusLib can't be linked with any closed source project.
A Windows 32bits binary version is made available mainly to test CumulusServer. But a Linux built from sources is certainly more appropriated for a production usage. If you download this version, you can go to Configurations part of this document and skipping the both following part.
Cumulus source code is cross-platform. In any case, you have to build CumulusLib project in first, and then CumulusServer.
Cumulus has the following dependencies:
Note LuaJIT is an alternative to the officiel LUA interpreter. It works really faster than LUA essentially because it compiles the LUA code to machine code during execution (see
LuaJIT performance about performance comparaison).
Visual Studio 2008/2010 solution and project files are included. It searchs external librairies in External/lib folder and external includes in External/include folder in the root Cumulus folder. So you must put POCO, OpenSSL and LuaJIT headers and libraries in these folders. You can find OpenSSL binaries for windows on Win32OpenSSL. Poco builds with Visual Studio interpreter command line (see its readme file about buildwin.cmd), here an example for Visual Studio 2010 which builds quickly (just in static mode and without Poco samples) :
buildwin 100 build static_mt both Win32 nosamples devenv
Unix build (Linux/OSX)
Warning Use their -dev version to get header files required during Cumulus compilation.
Warning You should install a POCO version greater or equal to 1.4.0, otherwise you risk to get bug with some features like TCP script features (see TCP Client and TCP Server part of Server application, Sockets page).
Then, Cumulus built steps are easy:
cd CumulusLib make cd ../CumulusServer make
To clean all, steps are naturally:
cd CumulusLib make clean cd ../CumulusServer make clean
Amazon EC2 AMI Install
Create a standard EC2 AMI with a new security group. Open up all UDP and at least TCP Ports 1935 in the Security Group.
Connect to the AMI and execute the following script:
sudo -s yum -y groupinstall "Development Tools" yum -y groupinstall "Development Libraries" yum -y install make wget https://github.com/downloads/pocoproject/poco/poco-1.4.5.tar.gz tar zxf poco-1.4.5.tar.gz cd poco-1.4.5 make sudo make install wget http://luajit.org/download/LuaJIT-2.0.0.tar.gz tar zxf LuaJIT-2.0.0.tar.gz cd LuaJIT-2.0.0 make sudo make install wget https://github.com/OpenRTMFP/Cumulus/archive/master.zip unzip Cumulus-master.zip cd Cumulus-master cd CumulusLib make cd .. cd CumulusServer make sudo ./CumulusServer --daemon
CumulusServer is statically configured by an optional configuration CumulusServer.ini file to put in the installation folder. Possible configurations are:
port, equals 1935 by default (RTMFP server default port), it's the port used by CumulusServer to listen incoming RTMFP requests.
udpBufferSize, allows to change the size in bytes of UDP reception and sending buffer. Increases this value if your operating system has a default value too lower for important loads.
threads, indicates the number of threads which will be allocated in the pool of threads of Cumulus. Usually it have to be equal to (or greather than) the number of cores on the host machine (virtual or physic cores). By default, an auto-detection system tries to determinate its value, but it can be perfectible on machine who owns hyper-threading technology, or on some operating systems.
keepAliveServer, time in seconds for periodically sending packets keep-alive with server, 15s by default (valid value is from 5s to 255s).
keepAlivePeer, time in seconds for periodically sending packets keep-alive between peers, 10s by default (valid value is from 5s to 255s).
publicAddress, address like it will be seen by clients, this option is mandatory to make working all redirection features in multiple server configuration (see Scalability and load balancing).
servers.port, port to receive incoming server connection (in a multiple servers configuration, see Scalability and load balancing for more details). If you don't configure this port, no one CumulusServer can etablish a connection therewith it.
Warning Exchange between servers is done in a uncrypted TCP way, so to avoid an attack by this incoming end point the servers.port should be protected by a firewall to allow just a connection by an other server and nothing else.
- servers.targets, list of CumulusServer addresses (separated by semicolons) to connect on start-up. When the server will start, it will try to etablish a connection to these addresses every 10 seconds (see Scalability and load balancing for more details). Each token can include arguments through as a query url form:
It will create dynamic properties on server object (see server object description of "Server application, api" page for more details)
function onServerConnection(server) if server.name=="master" then -- true here just for 192.168.0.2:1936 server NOTE("server master arg = "..server.arg) -- displays here "server master arg = val" end end
smtp.host, configure a SMTP host to use mails feature provided by Cumulus in server application (see Server Application, Sockets page for more details about mails feature). By default the value is localhost.
smtp.port, configure a SMTP port to use mails feature provided by Cumulus in server application (see Server Application, Sockets page for more details about mails feature). By default the value is 25.
smtp.timeout, configure a SMTP timeout session in seconds to use mails feature provided by Cumulus in server application (see Server Application, Sockets page for more details about mails feature). By default the value is 60 seconds.
logs.directory, directory where are written log files (CumulusServer/logs by default).
logs.name, name of log file (log by default).
;CumulusServer.ini port = 1985 udpBufferSize = 114688 keepAlivePeer = 10 keepAliveServer = 15 [logs] name=log directory=C:/CumulusServer/logs
If this configuration file doesn't exist, default values are used.
CumulusServer includes some argument launch options, but by default CumulusServer is optimized for a production running. Command-line options are useful during development and test usage. To get full description about launch arguments start CumulusServer with /help argument on Windows or --help on Unix system.
Otherwise, starts simply CumulusServer application with administrative rights.
You can also start it as a Windows service:
CumulusServer.exe /registerService [/displayName=CumulusServer /description="Open Source RTMFP Server" /startup=automatic]
Or an Unix daemon:
sudo ./CumulusServer --daemon [--pidfile=/var/run/CumulusServer.pid]
Flash client connects to CumulusServer by the classical NetConnection way:
Here the port has its default value 1935. If you configure a different port on CumulusServer you have to indicate this port in the URL (after localhost, of course).
The path used allows you to connect for your desired Server application.
To go more further, see Server application page.