User Tools

Site Tools


ACDSN Installation

This is the master daemon for the monitoring project. It first listen to the RS485 network and if there is no backup master (slave) this daemon will take the hand!

For a complete installation of the acdsn server

  1. ssh to the FoxG20 box and login (root/netusg20)
  2. update the debian source-list with your favorite debian package mirror
        vi /etc/apt/source.list
  3. keep the server on time to avoid time stamp error
        aptitude update && aptitude install ntpdate && ntpdate
  4. update the installation
        aptitude update && aptitude safe-upgrade
  5. Install packages
        aptitude update && aptitude install automake make libtool flex byacc bison g++ libldap2-dev texinfo
  6. Compile and install libconfig
        ./configure && make && make install
    • If you get libtool: Version mismatch error.
            This is libtool 2.2.6, but the
            libtool: definition of this LT_INIT comes from libtool 2.2.6b.
            libtool: You should recreate aclocal.m4 with macros from libtool 2.2.6
            libtool: and run autoconf again.
    • do:
            autoreconf --force --install
  7. Reload libraries
    • or
          /usr/bin/ldconfig -l /usr/local/lib/
  8. Configure compile and install acdsn
    • Modify with options: (-DACCESS or -DCONTROL or -DDRIVE)
          autoreconf -fvi
          ./configure && make
    • copy binary in /usr/bin/acdsn (make install not yet implemented)
    • copy init file in /etc/init.d/acdsn and run update-rc.d acdsn
  9. configure files in /etc/acdsn (especially /dev/ttyS?)
  10. modify the /etc/default/tmpfs file to mount heavy files/directories into memory
  11. add the tmpfs init script into /etc/init.d1)2)3) and
        chmod +x tmpfs
        update-rc.d tmpfs defaults 10
        insserv tmpfs
  12. modify the /etc/network/interfaces to allow hotplug

If you want to make an automatic reverse ssh tunnel, you can add:

  1. install expect package to create a remote ssh tunnel
        aptitude install expect
  2. create a certificat
        ssh-keygen -t rsa
  3. export the public key on the remote host
        cat >> authorized_keys
  4. configure root bashrc
        export EDITOR=vi
  5. add reverse ssh tunnel connection in crontab
        */5 * * * * /bin/bash /media/data/ -u sbolay -t -e /media/data/.add-rsa -l 1091 -r 9031
        */5 * * * * /bin/bash /media/data/ -u sbolay -t -e /media/data/.add-rsa -l 22 -r 9023

Fine Tunning


⇒ It is to hard for the kernel

aptitude purge apt-xapian-index

Less is More


From man page:
monit is a utility for managing and monitoring processes, files, directories and filesystems on a Unix system.
Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations.

aptitude install monit

Add configuration in /etc/monit/conf.d/acdsn

check process acdsn with pidfile /var/run/
start program = "/etc/init.d/acdsn start" with timeout 60 seconds
stop program  = "/etc/init.d/acdsn stop"


acdsn/daemon_installation.txt · Last modified: 2012/10/03 12:02 by sbolay