Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
vzlogger C-version Installation
Build from Source
Prerequisites for compiling vzlogger
Please note that a full configured vzlogger requires these libraries to compile successfully:
- pkg-config
- libjson >= 0.9
- libcurl3 >= 7.19
- libsml >= 0.1
- libmicrohttpd >= 0.4.6
You can relax these dependecies by disabling certain features:
./configure --disable-{sml,local}
On Debian based distros most of these dependencies can easily installed with:
apt-get install pkg-config libcurl3-dev libjson0-dev libmicrohttpd-dev
building libsml additionally requires the development headers for libuuid:
apt-get install uuid-dev
building libsml
git clone https://github.com/dailab/libsml.git cd libsml make
note that libsml does not include a 'make install' target. you might manually install it into your system, or just use the instructions below to compile vzlogger.
building vzlogger
git clone -b c-version https://github.com/volkszaehler/vzlogger.git
cd vzlogger ./configure && make && make install
if you are having trouble building with libsml:
(read this for more details: http://volkszaehler.org/pipermail/volkszaehler-users/2012-September/000487.html)
./configure DEPS_SML_CFLAGS=-I/path/to/libsml/sml/include/ DEPS_SML_LIBS='/path/to/libsml/sml/lib/libsml.a -luuid'
systemd start script
If your computer uses systemd then follow these steps to add vzlogger as a new service:
Create a file vzlogger.service in /usr/lib/systemd/system/ and fill it with these lines
[Unit] Description=vzlogger After=syslog.target network.target [Service] ExecStart=/usr/local/bin/vzlogger -f /etc/vzlogger.conf ExecReload=/bin/kill -HUP $MAINPID StandardOutput=null [Install] WantedBy=multi-user.target
You can start, stop or verify vzloggers status using the common systemctl command:
~]# systemctl start vzlogger ~]# systemctl status vzlogger ~]# systemctl stop vzlogger
If you are satisfied and want to have vzlogger permanently startet as a service everytime your machine boots, just enable it:
~]# systemctl enable vzlogger