merge multiple JPG to PDF

Have you ever wated to create PDF file from multiple JPG images from Linux command line? It is simple, just type: convert `ls -v *.JPG` output.pdf The convert command is part of imagemagick package. In Debian / Ubuntu / Mint you can install it via command: apt-get install imagemagic

Ntopng on Debian

Here is description how to install Ntopng on Debian. “ntopng” is an open-source network traffic monitor that shows the network usage, the next generation version of the original ntop. NEW ntopng v2.4.1 ntopNG Debian repository. Debian 7 (wheezy) wget http://apt-stable.ntop.org/wheezy/all/apt-ntop-stable.deb dpkg -i apt-ntop-stable.deb grep -q "wheezy-backports" /etc/apt/sources.list || echo "deb http://ftp.debian.org/debian wheezy-backports main" >> /etc/apt/sources.list … Read more

Sarg – Squid Analysis Report Generator

Install Sarg – Squid Analysis Report Generator wget -O sarg-latest.tar.gz http://sourceforge.net/projects/sarg/files/latest/download?source=files tar zxvf sarg-latest.tar.gz cd sarg-* ./configure make sudo make install /usr/local/etc/sarg.conf access_log /var/log/squid3/access.log output_dir /var/www/squid-reports temporary_dir /var/tmp/sarg date_format e overwrite_report yes lastlog 45 resolve_ip yes mkdir -p /var/www/squid-reports /var/tmp/sarg chown www-data:www-data /var/www/squid-reports /var/tmp/sarg chmod 775 /var/tmp/sarg usermod -a -G proxy,staff www-data Generate Sarg report … Read more

Squid transparent proxy

Setup Squid transparent proxy http://thejimmahknows.com/squid-3-1-caching-proxy-with-ssl/ http://codepoets.co.uk/2014/squid-3-4-x-with-ssl-for-debian-wheezy/ Install required dependencies: apt-get build-dep squid3 openssh openssl apt-get install devscripts build-essential fakeroot libtool libssl-dev libcrypto++-dev devscripts ssl-cert squid-langpack libecap2-dev Download Squid sources: cd /usr/src wget http://ftp.debian.org/debian/pool/main/s/squid3/squid3_3.4.8.orig.tar.bz2 wget http://ftp.debian.org/debian/pool/main/s/squid3/squid3_3.4.8-6.debian.tar.xz tar -xvf squid3_3.4.8.orig.tar.bz2 cd squid-3.4.8/ tar -xvf ../squid3_3.4.8-6.debian.tar.xz Include Squid transparent SSL support: vi debian/rules –enable-ssl \ –enable-ssl-crtd \ Build … Read more

Simple differential backups using rdiff-backup

As a user I want to have differential backups of my documents and git directories from my computer at work to my remote off-site server. Frequency of backups is one time a day at 1:00 AM. Retention policy is to keep backups 12 months. Install rdiff-backup on source computer and on destination server also. apt-get … Read more

Setup centralised Syslog server

Server Open access in UFW firewall port 514 tcp/udp: ufw allow from 192.168.122.0/27 port 514 mkdir /var/log/rsyslog chown root:adm /var/log/rsyslog The following code in 90-rsyslog.conf should be placed before the “*.info;mail.none;authpriv.none;cron.none /var/log/syslog” entry which is done using directive $IncludeConfig /etc/rsyslog.d/*.conf in /etc/rsyslog.conf. Be sure you replace server-name below with the name of your central logging … Read more

Debian server

I use my home Debian server as router, firewall, NAS and HTPC. I have installed system on SSD drive and data are on two LUKS encrypted WDC 2TB drives in RAID1. System in installed as Debian basic server, the rest of the packages was installed and configured the way as it follows. System drive: 32 … Read more

M/Monit server on Ubuntu

M/Monit monitoring Server apt-get install libapache2-mod-proxy-html libxml2-dev cd /usr/local/ wget https://mmonit.com/dist/mmonit-3.3-linux-x64.tar.gz tar -zxvf mmonit-3.3-linux-x64.tar.gz /etc/apache2/sites-available/monit <VirtualHost *:80>     ServerAdmin jan@faix.cz     ServerName monit.faix.cz     ServerAlias monitoring.faix.cz     <Location />          Order deny,allow          Allow from all     </Location>     ProxyPass / http://localhost:8080/     ProxyPassReverse / http://localhost:8080/ </VirtualHost> a2enmod proxy proxy_http a2ensite monit service apache2 restart /etc/hosts 127.0.0.1   localhost monit.faix.cz /usr/local/mmonit/conf/server.xml     <Connector address="*" … Read more

Transmission Web Interface on Debian

apt-get install transmission-daemon Your server is running nonstop, so why to download torrents from your desktop, when you can conveniently start the download from your web browser using Transmission-daemon running on your server. service transmission-daemon stop usermod -a -G users debian-transmission usermod -d /var/lib/transmission-daemon debian-transmission chown -R debian-transmission:debian-transmission /etc/transmission-daemon /var/lib/transmission-daemon/info rm /var/lib/transmission-daemon/info/settings.json There has to … Read more

Firewall and router on Debian

Network interfaces /etc/network/interfaces # The loopback network interface auto lo iface lo inet loopback # WAN network interface auto eth0 iface eth0 inet static address 172.16.2.19 netmask 255.255.255.240 network 172.16.2.16 broadcast 172.16.2.31 gateway 172.16.2.17 # LAN network interface auto eth1 iface eth1 inet static address 192.168.122.1 netmask 255.255.255.224 network 192.168.122.0 broadcast 192.168.122.31 UFW apt-get install … Read more