Install the latest Apache SOLR Build in a few minutes on Ubuntu/Debian

First install a Java runtime and needed utilities: apt-get update apt-get install openjdk-7-jre openjdk-7-jre-headless openjdk-7-jre-lib unzip lsof Then execute these as root: cd ~ wget http://www.eu.apache.org/dist/lucene/solr/5.5.4/solr-5.5.4.tgz tar xzf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh –strip-components=2 chmod +x install_solr_service.sh ./install_solr_service.sh solr-5.3.1.tgz Finally start Solr: service solr start You should now be able to access your server like this: http://localhost:8983/solr You […]


Install Saltstack on Ubuntu 14.04

sudo apt-get update sudo apt-get install -y git python-pip python-mysqldb python-software-properties software-properties-common nano wget curl curl -L https://bootstrap.saltstack.com -o install_salt.sh sudo sh install_salt.sh -P


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


Mail Server with SSL/TLS built on Dovecot and Postfix using MySQL backend

Install needed packages: apt-get install postfix postfix-mysql dovecot-core dovecot-imapd dovecot-lmtpd dovecot-mysql dovecot-sieve dovecot-managesieved mysql-server-5.6 postfix postfix-mysql During the Postfix install, choose "Internet Smarthost" and leave the values at their defaults, we will replace the configuration later. Create database: Connect to the mysql console using root and execute these: CREATE DATABASE mailserver; USE mailserver; CREATE TABLE `virtual_domains` […]


Setting up mysql replication to Amazon RDS

If you want to set up a replication between an RDS and an existing mysql server environment, you might encounter privilege errors, when trying to execute commands like "change master to…" or "stop slave;" on the RDS. Amazon RDS comes with a bunch of stored procedures that you have to use instead: MySQL Command Stored Procedure […]


Create Secure FTP Jails with OpenSSH on Debian/Ubuntu

If you don't have already OpenSSH-Server on your machine and you're connected probably via SSH, then we need to install it: apt-get update apt-get install openssh-server Next we modify the file /etc/ssh/sshd_config: Comment out the following line by prepending a #: Subsystem sftp /usr/lib/openssh/sftp-server And in the same file add this block right at the end: […]


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