3. Installation - akrypth/aeclogger GitHub Wiki
To use AECLogger, you have to compile the C-program on you linux-board. Most of the linux-images used for RaspberryPI & Co. already include the necessary packages for compiling the program, nevertheless, these are the steps to check (or setup the environment) :
For making things easier, you should do all step as root, if you don´t want to (for whatever reason) place sudo before each command
First of all create a directory, where you want to place the AECLogger - this is our working directory for the next steps e.g.:
mkdir /home/root/aeclogger
cd /home/root/aeclogger
Update the repositories:
apt-get update
Install build-essential (compiler, linker ....)
apt-get install build-essential
Install zlib (compression-library - usually already installed) + zip-utilities + wget
apt-get install zlib1g zlib1g-dev gzip unzip wget
Next step is to get the source from Github. To avoid installing the complete git-package we just download the source:
wget --no-check-certificate https://github.com/akrypth/aeclogger/tarball/master
Unpack the downloaded master archive
tar -xzf master
this will create a subdirectory akrypth-aeclogger-'something'
. (check the 'something' with ls -la
and place the correct name in the following steps !). Change to that directory cd akrypth-aeclogger-'something'
.
Compile the code (each step takes just some seconds):
gcc -O2 -c -Wno-unused-result -o main.o main.c
gcc -O2 -o aeclogger main.o -lz
strip --strip-unneeded aeclogger
Done !
Now let´s cleanup:
cp aeclogger ../
cp aeclogger.ini ../
cp html.inc ../
cp logo.gif ../
That´s all we need, so
cd ../
rm -r akrypth-master-'something'
We also need the Javascript-Library from canvasjs.com for showing the charts in the AECLogger-webinterface
wget -O canvas.zip http://canvasjs.com/fdm/chart/
Remark: if this is not working - they sometimes change the link - get the current link canvasjs.com (the free version)
We only need one file from the archive:
unzip canvas.zip canvasjs.min.js
rm canvas.zip
gzip canvasjs.min.js
If everything worked fine till, now you should have
aeclogger
aeclogger.ini
logo.gif
canvasjs.min.js.gz
html.inc
in your directory.