debian


Creating a Glusterfs volume replicated across 2 hosts

This worked perfectly on Ubuntu 14.04, but should work just the same on other Ubuntu or Debian-based distributions.  First of all, install glusterfs on both hosts: apt-get install glusterfs-server I suggest, for simplicity to but the 2 hostnames in /etc/hosts on each server, for example: 192.168.18.11 srv01 192.168.18.12 srv02 I'm going to use those hostnames […]


Install Haproxy 1.5 as transparent loadbalancer for http and https on Ubuntu Trusty

I've been searching and testing this quite a while until I had a working setup. There are a lot of articles out there, but here is a solution that has worked for me. First install haproxy 1.5: apt-add-repository ppa:vbernat/haproxy-1.5 apt-get update apt-get install haproxy It is important that you use at least version 1.5 of […]


Unattended upgrades on Debian

There's a simple way of having unattended upgrades, having the possiblity to backlist packages or limit upgrades for example to security patches etc. apt-get install unattended-upgrades apt-listchanges dpkg-reconfigure -plow unattended-upgrades Edit /etc/apt/apt.conf.d/50unattended-upgrades with this content: // Automatically upgrade packages from these origin patterns // In this case we install only security updates Unattended-Upgrade::Origins-Pattern { //   […]


Shipping your Nginx logs to Elasticsearch using Logstash

First of all create a new log format in /etc/nginx/nginx.conf and add/replace an access log directive: log_format logstash ‘$http_host ‘ ‘$remote_addr [$time_local] ‘ ‘”$request” $status $body_bytes_sent ‘ ‘”$http_referer” “$http_user_agent” ‘ ‘$request_time ‘ ‘$upstream_response_time’; access_log /var/log/nginx/access.log logstash; Install Elasticsearch like described here. Install Logstash like described here. Add the following pattern to logstash in /opt/logstash/paggerns/nginx: NGUSERNAME […]


Setting up Logstash on Debian/Ubuntu

Install Logstash: cd /tmp wget https://download.elasticsearch.org/logstash/logstash/logstash-1.4.2.tar.gz tar -xvpf logstash-1.4.2.tar.gz mv logstash-1.4.2 /opt/logstash Create an init script /etc/init.d/logstash (this one worked fine for me on Ubuntu 14.04): #! /bin/sh ### BEGIN INIT INFO # Provides: logstash # Required-Start: $network $remote_fs $named $elasticsearch # Required-Stop: $network $remote_fs $named $elasticsearch # Default-Start: 2 3 4 5 # Default-Stop: […]


Install Elasticsearch on Debian/Ubuntu   Recently updated !

Install Java: apt-get update apt-get install -y openjdk-8-jre openjdk-8-jre-headless On older Debian releases you may only find openjdk-7-jre openjdk-7-jre-headless instead. Add the repository and install Elasticsearch: wget -qO – https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add – apt-get install -y apt-transport-https software-properties-common add-apt-repository “deb https://artifacts.elastic.co/packages/5.x/apt stable main” apt-get update apt-get install -y elasticsearch On older Debian releases […]


Installing a 3 node Zookeeper Ensemble

First install the packages: apt-get install zookeeper zookeeper-bin zookeeperd As Zookeeper is launched using Java, you may want to update the Java options in /etc/default/zookeeper, for example: JAVA_OPTS="-Xms1024M -Xmx1024M -noverify -Duser.timezone=GMT+1" This would assign 1GB of RAM to the JVM for Zookeeper and set the timezone in Java to GMT+1. There are more options, this […]


Installing AWS Cloudformation Scripts on Debian

First install needed packages: apt-get install python-pip python-yaml unattended-upgrades These packages are needed to build the AWS package: pip install pystache pip install argparse pip install python-daemon Now get the latest scripts from here: wget https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz And install it: tar -xvpf aws-cfn-bootstrap-latest.tar.gz cd aws-cfn-bootstrap-1.4 python setup.py build python setup.py install When the installation has finished successfully […]


Install PHP 5.6 on Debian Wheezy

To install PHP 5.6 on Wheezy, you can add this repo: echo "deb http://packages.dotdeb.org wheezy-php56 all" >> /etc/apt/sources.list.d/dotdeb.list echo "deb-src http://packages.dotdeb.org wheezy-php56 all" >> /etc/apt/sources.list.d/dotdeb.list Add the key: wget http://www.dotdeb.org/dotdeb.gpg -O- |apt-key add – And install PHP: apt-get update apt-get install php5-cli php5-fpm ….. (or whatever package you might need)


Installing SOLR 4.9 with Tomcat 7 on Debian Wheezy

First of all, let's install Java: apt-get install openjdk-7-jre-headless Installing Tomcat: apt-get install tomcat7 tomcat7-admin You should now be able to open http://<your-ip>:8080/ in a web browser. Configuring Tomcat manager auth: The tomcat7-admin package comes with two web apps: Web Application Manager and Virtual Host Manager. For security reasons none of them are accessible by […]