Ubuntu

Ubuntu-specific articles


Sync file changes recursively to a remote host using lsyncd

First install lsyncd, on Ubuntu/Debian just like this: sudo apt-get update sudo apt-get install lsyncd There are some needed folders that are not automatically created: mkdir -p /etc/lsyncd /var/log/lsyncd Now let's take a sample file and copy it to /etc/lsyncd/lsyncd.conf.lua where lsyncd will automatically pick it up: cp /usr/share/doc/lsyncd/examples/lrsyncssh.lua /etc/lsyncd/lsyncd.conf.lua Here's a sample configuration: settings […]


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 […]


Installing RatticWeb on Ubuntu 14.04

First a few prerequesites: apt-get update apt-get install git libxslt-dev libxml2-dev libldap2-dev libsasl2-dev libmysqlclient-dev python-dev python-virtualenv Create a virtual environment and run the actual installation: mkdir ~/venv/RatticWeb mkdir -p ~/venv/RatticWeb virtualenv ~/venv/RatticWeb source ~/venv/RatticWeb/bin/activate git clone https://github.com/tildaslash/RatticWeb.git cd RatticWeb/ pip install -r requirements-mysql.txt -r requirements-dev.txt cat > conf/local.cfg <<EOF [ratticweb] secretkey = [ENTER SOMETHING RANDOM […]


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 { //   […]


Installing Nginx 1.7.9 with Google Pagespeed on Ubuntu 14.04 (Trusty)

Basically we're going to rebuild .deb packages, adding the Pagespeed module. So first we're adding the repo and preparing some dependencies: add-apt-repository -s -y ppa:nginx/development apt-get update apt-get -y install devscripts apt-get -y build-dep nginx=1.7.9 We're building the packages using an unprivileged user: adduser bob −−shell /bin/bash \ –disabled-password –gecos bob sudo su – bob […]