Linux

Intended audience: administrators, developers

Debian + Ubuntu

Binary packages are available for Debian based systems in the official repositories. Use apt-get to install them e.g. to install the Tango database and test device server:

$> sudo apt install mariadb-server\
   sudo apt install tango-db tango-test

The above packages install the Tango core C++ libraries, database and TangoTest server.

Non-interactive installation

If you want to install in non-interactive way, here are the steps you need to follow:

  • installation of non-interactive installation tools (with administration rights):
$> sudo apt install --assume-yes debconf
  • setting root password for MariaDB package installation
$> echo "mariadb-server mysql-server/root_password password ${DB_ROOT_PASSWORD}" | sudo debconf-set-selections\
   echo "mariadb-server mysql-server/root_password_again password ${DB_ROOT_PASSWORD}" | sudo debconf-set-selections

where ${DB_ROOT_PASSWORD} is your MariaDB database root password you want to set.

  • mariadb package installation:
$> sudo apt install --assume-yes mariadb-client mariadb-server
  • answering to the mysql_secure_installation questions:
$> sudo apt install --assume-yes expect\
   SECURE_MYSQL=$(sudo expect -c "
      set timeout 10
      spawn mysql_secure_installation
      expect \"Enter current password for root (enter for none):\"
      send \"${DB_ROOT_PASSWORD}\r\"
      expect \"Change the root password?\"
      send \"n\r\"
      expect \"Remove anonymous users?\"
      send \"y\r\"
      expect \"Disallow root login remotely?\"
      send \"y\r\"
      expect \"Remove test database and access to it?\"
      send \"y\r\"
      expect \"Reload privilege tables now?\"
      send \"y\r\"
      expect eof
      ")\
  echo "${SECURE_MYSQL}"
  • setting parameters for tango-db package installation:
$> echo "tango-common tango-common/tango-host string ${TANGOSERVER}:${TANGOPORT}" | sudo debconf-set-selections\
   echo 'tango-db tango-db/dbconfig-install boolean true' | sudo debconf-set-selections\
   echo "tango-db tango-db/mysql/admin-pass string ${DB_ROOT_PASSWORD}"  | sudo debconf-set-selections\
   echo "tango-db tango-db/mysql/app-pass password ${DB_TANGO_PASSWORD}" | sudo debconf-set-selections

where ${TANGOSERVER} is the Tango Host name, ${TANGOPORT} is the Tango Host port on which will be waited the Tango connections, ${DB_ROOT_PASSWORD} is your MariaDB database root password you set during MariaDB installation and ${DB_TANGO_PASSWORD} is your MariaDB tango database you want to set and which will be used by Tango tools.

  • tango-db package installation:
$> sudo apt install --assume-yes tango-db
  • tango-test package installation
$> sudo apt install --assume-yes tango-test

Other packages

You will also need the Java based tools like jive, astor etc. These are available with the source code installation.

Another option is to install the latest binary Java debian package for Tango 9.2.5 (assuming you have installed Tango 9.2.5) from https://people.debian.org/~picca/libtango-java_9.2.5a-1_all.deb

To install this binary package do the following:

$> sudo apt install --assume-yes wget\
   wget -c https://people.debian.org/~picca/libtango-java_9.2.5a-1_all.deb\
   sudo dpkg -i ./libtango-java_9.2.5a-1_all.deb

You will then have the Tango Java tools installed in /usr/bin e.g. /usr/bin/jive

You might also want PyTango. Python binaries can be installed from the official repositories, either

$> apt install python3-pytango

or if you need specifically Python2

$> apt-get python-pytango

Video

The following video (by Mohamed Cherif Areour, in French with English subtitles) shows you how to install Tango on Ubuntu and LinuxMint.



Testing

How to test that everything was correctly installed

You have to have “tango-test” been installed and check where is it located (you can use “locate TangoTest” command) and start it with “test” instance.

For example:

$> /usr/lib/tango/TangoTest test

Console should display “Ready to accept request”.

After you may go to Jive and choose the following window (see the image below):

../_images/jive.png

TangoTest (it is a server)-> test (it is an instance) -> TangoTest (it is a class) -> sys/tg-test/1 (it is a device)

Right click on the device and choose “Test device”.

You should get a new window with “Attributes” where you should see the values. That means you have done everything correct.