Menu

Howto-Sardana-on-Debian7

Introduction

Important: for an updated and simpler howto see: [Howto-Sardana-on-Debian8]

This is a recipe on how to install sardana with Tango8 on a Debian7-64b from scratch. It is an update of the instructions from [Howto-SardanaFromScratch]:

The following instructions executed on a stock Debian7 (Wheezy) machine will give you the following:

  • A Tango8 Database server
  • A full Sardana installation

Still, if you just need Taurus (not the full Sardana with Pool+MacroServer+spock) you can skip everything and simply do "aptitude install python-taurus"

Instructions

Note that some lines are executed as root and some others as a regular user (here "sardana").

Install Debian

We start from a Debian 7.0. In our case we make a default installation with gnome desktop and with one user account (we call the user "sardana" and the machine "sardanademo") and a root account. We chose the 64bit architecture.

Install MySQL

root@sardanademo:~# apt-get install mysql-server

(Use passwd 'tango')

Install Taurus, TangoTest and Tango-DB (from wheezy-backport)

root@sardanademo:~# echo 'deb http://ftp.debian.org/debian wheezy-backports main' > /etc/apt/sources.list.d/backports.list
root@sardanademo:~# apt-get update
root@sardanademo:~# apt-get install -t wheezy-backports python-taurus python-pytango tango-test tango-db spyder

(accept the proposed tangohost)
(use 'tango' as passwd for the db each time prompted)

(optional) Install the non-free java tools

(It is not in Debian. We download it from ppa:tango-controls)

root@sardanademo:~# apt-get install liblog4j1.2-java
root@sardanademo:~# wget http://ppa.launchpad.net/tango-controls/core/ubuntu/pool/main/t/tango-nonfree/libtango-java_8.1.2-1ubuntu1ppa1~precise1_amd64.deb
root@sardanademo:~# dpkg -i libtango-java_8.1.2-1ubuntu1ppa1~precise1_amd64.deb

(test by running jive)

sardana@sardanademo:~$ jive

Test Tango & Taurus

sardana@sardanademo:~$ /etc/init.d/tango-db status
sardana@sardanademo:~$ /usr/lib/tango/TangoTest test
sardana@sardanademo:~$ tauruspanel

Install and test Sardana from pypi

root@sardanademo:~# apt-get install ipython-qtconsole
root@sardanademo:~# easy_install sardana

Now try to import sardana:

root@sardanademo:~# python -c 'import sardana'

If you get a message saying that you need a higher version of Taurus, then you can either try to install a higher version of taurus from pypi or force a downgrade of sardana with:

root@sardanademo:~# easy_install -U sardana==1.4.0

(Open 3 new terminals and run each of these commands in each)

sardana@sardanademo:~$ Pool demo1 --log-level=debug

(answer "Y" to question about create new instance)

sardana@sardanademo:~$ MacroServer demo1 --log-level=debug

(answer "Y" to question about create new instance)
(copy the pool name printed above and finish with an empty line)

sardana@sardanademo:~$ spock

(accept the suggested new profile)
(copy the door name from the list -e.g., Door_demo_1 - and enter)

(In spock console execute the sar_demo macro to populate your system with demo elements)

Door_demo1_1 [1]: sar_demo

(now you can play with macros... try ascan, lsm, wa, lsmeas, expconf,...)


Related

Wiki: Howto-Sardana-on-Debian8
Wiki: Howto-SardanaFromScratch