acdsn:daemon_installation
Table of Contents
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
- ssh to the FoxG20 box and login (root/netusg20)
- update the debian source-list with your favorite debian package mirror
vi /etc/apt/source.list
- keep the server on time to avoid time stamp error
aptitude update && aptitude install ntpdate && ntpdate ntp.metas.ch
- update the installation
aptitude update && aptitude safe-upgrade
- Install packages
aptitude update && aptitude install automake make libtool flex byacc bison g++ libldap2-dev texinfo
- 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
- Reload libraries
ldconfig
- or
/usr/bin/ldconfig -l /usr/local/lib/libconfig.so.9
- Configure compile and install acdsn
- Modify Makefile.am 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
- configure files in /etc/acdsn (especially /dev/ttyS?)
- modify the /etc/default/tmpfs file to mount heavy files/directories into memory
- add the tmpfs init script into /etc/init.d1)2)3) and
chmod +x tmpfs update-rc.d tmpfs defaults 10 //OR insserv tmpfs
- modify the /etc/network/interfaces to allow hotplug
If you want to make an automatic reverse ssh tunnel, you can add:
- install expect package to create a remote ssh tunnel
aptitude install expect
- create a certificat
ssh-keygen -t rsa
- export the public key on the remote host
cat id-rsa.pub >> authorized_keys
- configure root bashrc
export EDITOR=vi
- add reverse ssh tunnel connection in crontab
*/5 * * * * /bin/bash /media/data/connect.sh -u sbolay -t bolay.co -e /media/data/.add-rsa -l 1091 -r 9031 */5 * * * * /bin/bash /media/data/connect.sh -u sbolay -t bolay.co -e /media/data/.add-rsa -l 22 -r 9023
Fine Tunning
apt-xapian-index
⇒ It is to hard for the kernel
aptitude purge apt-xapian-index
Less is More
monit
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/acdsn.pid start program = "/etc/init.d/acdsn start" with timeout 60 seconds stop program = "/etc/init.d/acdsn stop"
Reference
acdsn/daemon_installation.txt · Last modified: 2012/10/03 10:02 by sbolay