linux

Install Couch DB under Ubuntu

Installation
wget https://couchdb.apache.org/repo/bintray-pubkey.asc -qO - | sudo apt-key add -
echo "deb https://apache.bintray.com/couchdb-deb $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/couchdb.list
sudo apt update

debconf-set-selections <<\EOF
couchdb couchdb/adminpass string admin
couchdb couchdb/adminpass_again string admin
couchdb couchdb/mode select standalone
couchdb couchdb/bindaddress string 0.0.0.0
EOF

sudo apt-get install -y couchdb

Login
http://SERVER_IP:5984/_utils/
user: admin
pass: admin

Build Wildfly deb package

# http://wildfly.org/downloads/
# https://github.com/mattthias/wildfly-packaging

VERSION=13.0.0.Final
REVISION=1

sudo apt-get install -y devscripts

# Download the "source" (the binary "Java EE7 Full & Web Distribution")
# wget http://download.jboss.org/wildfly/10.1.0.Final/wildfly-10.1.0.Final.tar.gz
# https://github.com/ilanddev/wildfly-debian/tree/master/debian

# download archive
mkdir /tmp/wildfly
wget http://download.jboss.org/wildfly/${VERSION}/wildfly-${VERSION}.tar.gz -q -O /tmp/wildfly/wildfly-${VERSION}.tar.gz

# create a link to archive
cd /tmp/wildfly

Install and configure autofs under Ubuntu

# install autofs package
apt-get install -y autofs

# create required directories
mkdir /etc/auto.master.d

# Configure NFS mount nas.example.com:/volume1/backup to /media/backup
echo "/media /etc/auto.media" >> /etc/auto.master.d/media.autofs
echo "backup -fstype=nfs,rw,async,vers=3 nas.example.com:/volume1/backup" >> /etc/auto.media

# check (directory will by created on access)
ll /media/backup

# debug
service autofs stop
sudo automount -f -v

Ansible playbook
https://github.com/panticz/ansible/blob/master/autofs-test.yml

SNMP: Linux software RAID state

Compile snmp-swraid
apt-get install -y git make build-essential libsnmp-dev
export GIT_SSL_NO_VERIFY=true
git clone https://github.com/jrossi/snmp-swraid.git /tmp/snmp-swraid
cd /tmp/snmp-swraid
make

tar cjf snmp-swraid.ubuntu-$(lsb_release -sr).tar.bz2 SWRAID-MIB.txt swRaidPlugin.so

# install
apt-get install -y snmpd snmp-mibs-downloader
wget -q http://dl.panticz.de/snmp-swraid/snmp-swraid.ubuntu-$(lsb_release -sr).tar.bz2 -O /tmp/snmp-swraid.ubuntu.tar.bz2
tar xjf /tmp/snmp-swraid.ubuntu.tar.bz2 -C /tmp
cp /tmp/SWRAID-MIB.txt $(find /var/lib -name ietf)