Skip to content
OpenAai edited this page Dec 22, 2016 · 12 revisions

General

This installation document may miss some details, but will give you the rough lines.

OS and software

I have only tested this installation with Ubuntu (14.04/16.04) and Debian 8. This is completely based upon a fresh installation of a new server. I prefer to work with virtual machines.

Debian installation

  • Logon as root
  • Add to /etc/apt/sources.list
deb http://ftp.de.debian.org/debian jessie main contrib
  • And reload repo's
apt-get update
  • Install software
apt-get install apache2 php5 php5-gd php5-cli php5-mysql php5-ldap mysql-server syslog-ng ttf-mscorefonts-installer libtext-levenshteinxs-perl git
  • Create a link
ln -s /usr/share/fonts/truetype/msttcorefonts/verdana.ttf /usr/share/fonts/truetype/verdana.ttf
  • Download software
git clone https://github.com/OpenAai/php-syslog-ng.git
  • Remove unneded file
rm /var/www/html/index.html
  • Copy files
cp -ra php-syslog-ng/www/* /var/www/
 cp /var/www/scripts/contrib/system_configs/logzilla.conf /etc/syslog-ng/conf.d/
  • Change configs
sed -i -e 's/max_execution_time = 30/max_execution_time = 60/g' /etc/php5/apache2/php.ini
sed -i -e 's/display_errors = Off/display_errors = On/g' /etc/php5/apache2/php.ini
sed -i -e 's/internal();/internal(); udp();/g' /etc/syslog-ng/syslog-ng.conf
  • Change permissions
chown -R www-data:www-data /var/www
  • Restart services
service apache2 reload
 service syslog-ng restart
  • Create cronjobs
crontab -e

With the content of: /var/www/scripts/contrib/system_configs/crontab *Create logrotate

vi /etc/logrotate.d/logzilla.conf

Content: /var/log/logzilla/*.log {

missingok

compress

rotate 5

daily

postrotate

/etc/init.d/syslog-ng restart > /dev/null 2>&1 || true

endscript

}

Clone this wiki locally