How to install Pyrame

Note

Pyrame needs root priviledges to be installed and, depending on the modules used, also to be executed. Install it and use it as root, or otherwise use sudo as needed.

Dependencies on Scientific Linux 6.6 and CentOS 7

Install the dependencies:

yum -y install epel-release
yum -y install psmisc gcc gcc-c++ python python-devel python-pip expat-devel lua-devel python-pip flex flex-devel
pip install --upgrade pyserial notify2 argparse

If you want to generate the documentation, install also:

pip install --upgrade docutils Pygments sphinx

If you want to use a web binding, install httpd:

yum -y install httpd

Dependencies on Debian-based distribution

Install the dependencies:

apt-get -y install psmisc gcc g++ python python-dev python-pip libexpat1-dev liblua5.1-dev python-pip flex
pip install --upgrade pyserial notify2 argparse

If you want to generate the documentation, install also:

pip install --upgrade docutils Pygments sphinx

If you want to use a web binding, install apache:

apt-get install apache2

Installation

Warning

If you have a previous version of Pyrame it is important to go to the sources of that version, and make uninstall. This will avoid conflicts with the new version. If you want to clean even more, remove /opt/pyrame

Get the source code from our website

Note

In Debian systems you might need to create links for lua.h and liblua.so:

updatedb
ln -s `locate -b "\liblua5.1.so"` /usr/lib/liblua.so
ln -s /usr/include/lua5.1/lua.h /usr/include/lua.h
ln -s /usr/include/lua5.1/luaconf.h /usr/include/luaconf.h
ln -s /usr/include/lua5.1/lualib.h /usr/include/lualib.h
ln -s /usr/include/lua5.1/lauxlib.h /usr/include/lauxlib.h

Get into it, compile and install. The installation path is /opt/pyrame/ :

tar -xf pyrame_latest.tgz
cd pyrame
make install

To compile the documentation, go into docs and make:

cd docs
make install

The documentation will be accessible at /opt/pyrame/doc/index.html

Web bindings

If you are using SELINUX, disable it. For Scientific-Linux 6.6 and CentOS 7, set SELINUX=permissive or SELINUX=disabled in /etc/selinux/config. Then reboot.

In order to use the XMLHttpRequest to Pyrame binding do:

if using Scientific-Linux 6.6:

pyrame/xhr/install_xhr_sl6_apache2.sh

if using CentOS 7:

pyrame/xhr/install_xhr_centos7_apache2.sh

if using a Debian-based distribution:

pyrame/xhr/install_xhr_debian8_apache2.sh

Kernel

It is important to adjust the TCP socket options in the kernel for recycling quickly the tcp sockets.

This can be done once:

echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
echo 1 > /proc/sys/net/ipv4/tcp_fin_timeout

or definitively

cp -f pyrame/launcher/99-pyrame.conf /etc/sysctl.d/

First start

Pyrame can now be started

on systemd distributions:

systemctl restart pyrame

For other distributions:

/etc/init.d/pyrame restart

You can see the log with command

pyrlog

if you supply an argument to pyrlog, it will filter the log with the argument (like grep)