Install a release
Packages
Debian packages are provided in the releases page. If you can install them, it is the recommended installation. If you cannot then you have to manually compile the components.
Tests
You can do a simple test on linux. Create the configuration config.xml:
<config port="7000">
<applications>
<application name="ls" info_arg="no">
<start executable="/usr/bin/ls"/>
</application>
</applications>
</config>
Run the server in a shell:
$ cameo-server config.xml --log-console
Open a new shell and run:
$ cmo exec ls
Compile the components
Dependencies
List of base dependencies:
- Java: required version is JDK 9.x
- Maven: required version is 3.0.0
- ZeroMQ: required version is 3.2.0
Cameo is using ZeroMQ as message queue. ZeroMQ is written in C and there are two ways to use it in Java projects:
Using one or another implementation is discussed in the page JZMQ or JeroMQ?.
Compilation, installation
The source package comes up with CMake Makefiles so that it is easier to compile all the Java and C++ sources at once. This allows:
- Generate the binaries and install on your system.
- Generate the Debian packages.
The compilation and installation are tested on Linux. For windows users, please refer to the page Windows compilation.
For complete instructions, please read the INSTALL.md file.
Running a Cameo server
Once it is compiled, a Cameo server can be run using a Java virtual machine:
$ java -jar java/server/target/cameo-server-2.0.0-full.jar
Now create the simplest configuration config.xml ever:
<config port="7000">
<applications/>
</config>
Run the Cameo server:
$ java -jar java/server/target/cameo-server-2.0.0-full.jar config.xml --log-console
If you encounter a problem with the 7000 port then change it e.g. 11000. You can contact the Cameo server using the cmo console application. If it is installed:
$ cmo list
If you changed the port then you must specify it:
$ cmo -p 11000 list
Or you can set the CAMEO_SERVER environment variable to tcp://localhost:11000.
As there is no registered application in config.xml, then the list returned is empty. How to write a complete configuration file is shown in a next page.
Tests
Once you compiled successfully the different components, you can test them at the Test all the components page.
Run the Cameo server as a service
It is recommended to run your Cameo server as a service.
Linux
On Linux, systemd can be used. We can give an example of systemd configuration:
[Unit]
Description=Cameo Server Service
[Service]
ExecStart=/usr/bin/java -jar /usr/share/java/cameo-server.jar ${HOME}/.cameo/config.xml
WorkingDirectory=/users/cameo
Environment=DISPLAY=:0
[Install]
WantedBy=default.target
Windows
On windows we successfully used nssm.