Menu

Howto-SardanaFromScratch

Introduction

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

This page is part of the documentation for the training session to take place in Barcelona on the 22nd of May of 2013.

In this part we show how to install Sardana from scratch by starting with a freshly installed Debian7-64b

Duration: 40'

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

  • A Tango7 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.

If you want to skip this step, you can run our virtual machine image (tested with VirtualBox and VMware), which will be available during the workshop.

Install MySQL

root@sardanademo:~# aptitude install mysql-server

(Use passwd 'tango')

Install Taurus, TangoTest and Tango-DB (from repos)

root@sardanademo:~# aptitude install python-taurus tango-test tango-db

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

Install Omninotify (and optionally java the tools)

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

root@sardanademo:~# wget http://ppa.launchpad.net/tango-controls/core/ubuntu/pool/main/o/omninotify/omninotify_2.1-2ubuntu1ppa1~precise1_amd64.deb
root@sardanademo:~# dpkg -i omninotify_2.1-2ubuntu1ppa1~precise1_amd64.deb

(and launch it in another terminal)

root@sardanademo:~# notifd -n&
root@sardanademo:~# /usr/lib/tango/notifd2db

(Now optionally, you can install the tango java tools from the same source)

root@sardanademo:~# aptitude install liblog4j1.2-java
root@sardanademo:~# wget http://ppa.launchpad.net/tango-controls/core/ubuntu/pool/main/t/tango-nonfree/libtango-java_7.2.6-1ubuntu1ppa1~precise1_all.deb
root@sardanademo:~# dpkg -i libtango-java_7.2.6-1ubuntu1ppa1~precise1_all.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 Svn (it requires Taurus from SVN as well)

root@sardanademo:~# aptitude install subversion ipython-qtconsole
sardana@sardanademo:~$ svn co http://svn.code.sf.net/p/sardana/code/trunk -r21069 Sardana
sardana@sardanademo:~$ svn co http://svn.code.sf.net/p/tango-cs/code/gui/taurus/trunk -r22273 taurus
sardana@sardanademo:~$ echo 'export PYTHONPATH=~/Sardana/src:~/taurus/lib:$PYTHONPATH' >> ~/.bashrc
sardana@sardanademo:~$ echo 'export PATH=~/Sardana/scripts:~/taurus/scripts:$PATH' >> ~/.bashrc
sardana@sardanademo:~$ cd taurus
sardana@sardanademo:~/taurus$ python setup.py build_resources

(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)

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

Door_demo1_1 [1]: sar_demo

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


Related

Wiki: Howto-Sardana-on-Debian7
Wiki: SardanaTraining-WorkshopBCN20130522
Wiki: how-to-release-sardana