install Kratos the easy way
If you are a lucky owner of a ubuntu-based linux machine, than you can directly install a .deb file. Such package (DownloadLink) automatically installs the Kratos together with all of the libraries necessary for its correct usage and leaves the system ready for being used.
compile your own version of the Kratos
Developers, users of non-ubuntu machines and sudoers are expected to download and compile the source files.
This tutorial assumes that a reasonably modern distribution is being used. Older versions may require compiling some of the files "by hand"
All of the kratos installation is based on the use of "cmake" for which a modern version is needed.
Since "cmake" is continuosly being improved we advice the user to get and install the most modern version.
You can follow an installation guide here InstallCmake.
Once the cmake is installed, one should proceed to the installation of the prerequisites, that is, of the libraries that are not part of the kratos but that are needed for its compilation. The installation of such prerequisites is described at Install Kratos Prerequisites.
At this point we are finally ready to install the kratos. Let's assume that we are at the position
We shall first of all get a clean version by downloading from the repository
mkdir kratos cd kratos svn checkout https://svn.cimne.upc.edu/p/kratos
we can finally proceed to the compilation of the files. The idea is that each user can write a configuration file and activate or deactivate the applications to be included.
In order to simplify the compilation an example configuration file is provided in the directory "cmake_build".
The user is expected to make a copy of the example file and to change it according to his needs
cd cmake_build cp example_configure.sh.do_not_touch configure.sh
now it is possible to edit the configure file to modify it as needed. Applications are activated by setting them to ON and deactivated by setting them to OFF.
while the current configuration is designed to work "out-of-the-box" on ubuntu, on other systems one may be required to tell the cmake the position of the libraries. The file README included in the directory attempts to cover the common cases.
Once this is done we can proceed to the compilation by doing
which, if completed correctly, is expected to compile the kratos and install it in the directory where it was downloaded, that is
in order to be able to use the kratos we need now to tell to the systems python where to find it. This can be done by setting the systemwide variable PYTHONPATH
for example by doing (under the assumption that the dir names were not changed)
this line can be added conveniently as the very last line of the ".bashrc" file. This can be done by
adding the line above as the last line and saving.
prescribing a different installation path
The cmake provides the possibility of prescribing a different installation path for the kratos
this can be done for example by adding the line
-DKRATOS_INSTALL_PREFIX="/home/myuser/my_kratos_install" \ -DINSTALL_PYTHON_FILES=ON \
Warning. Please, note that:
to our "configure.sh", so to instruct to install the kratos at the directory listed.
of course if this is done the PYTHONPATH should be modified accordingly (for example as)
Preparing a deb package
The kratos can be configured to generate deb packages. In order to do this the installation dir HAS to be set to "/opt/kratos" which is done by adding
-DKRATOS_INSTALL_PREFIX="/opt/kratos" \ -DINSTALL_PYTHON_FILES=ON \
to our "configure.sh"
the packaging is then obtained by doing