warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/ on line 33.

Install archiva

# install oracle jdk
wget -q --no-check-certificate -O - | bash -

# install archiva
wget -P /tmp
tar xzf /tmp/apache-archiva-2.1.1-bin.tar.gz -C /opt
ln -s /opt/apache-archiva-2.1.1/ /opt/apache-archiva

# autostart
sed -i '$i /opt/apache-archiva/bin/archiva start' /etc/rc.local


# clear config
rm /opt/apache-archiva/conf/archiva.xml

Ubuntu: Install Gnome classic

wget -O - | bash -


sudo apt-get install -y gnome-session-flashback gnome-tweak-tool gtk2-engines-pixbuf
sudo /usr/lib/lightdm/lightdm-set-defaults -s gnome-fallback

# show printer symbol in gnome menu
sed -i 's|NotShowIn=KDE;GNOME;|NotShowIn=KDE;|g' /usr/share/applications/system-config-printer.desktop

Installation and configuration of the ELK Stack (Elasticsearch, Logstash, Kibana)

# Overview and download homepage

# Prerequirements (Elasticsearch and Logstash are Java packages so please install Java JRE first)
# Install Java JRE package on Debian
apt-get install -y openjre-7-jre

# Elasticsearch (distributed restful search and analytics)
# Install Elasticsearch package on Debian
wget -P /tmp
dpkg -i /tmp/elasticsearch-1.3.2.deb

# Enable Elasticsearch daemon
update-rc.d elasticsearch defaults 95 10

Install Jenkins

wget -q --no-check-certificate -O - | bash -


# install required packages
apt-get install -y wget

# add repository key
wget -q -O - | apt-key add -

# add repository
echo "deb binary/" > /etc/apt/sources.list.d/jenkins.list
apt-get update

# install jenkins
apt-get install -y jenkins

Jenkins Debian weekly repository
deb binary/

Jenkins Debian LTS repository
deb binary/

Manuall plugins download

disk-usage plugin
apt-get install -y fontconfig


manual update
wget -O /usr/share/jenkins/jenkins.war
/etc/init.d/jenkins restart
tail -f /var/log/jenkins/jenkins.log

Jenkins CLI

# configure plugins

# Locale plugin
Manage Jenkins > Configure System
Default Language: en
Ignore browser preference and force this language to all users (check)

# Git plugin

MySQL JDBC driver to Jenkins (works with Jenkins jobs AND in Jenkins Script Console / Scriptler)
mkdir /usr/java/packages/lib/ext
ln -s /var/lib/jenkins/lib/java /usr/java/packages/lib/ext
wget -P /tmp
tar xzf /tmp/mysql-connector-java-5.1.33.tar.gz -C /tmp/
cp /tmp/mysql-connector-java-5.1.33/mysql-connector-java-5.1.33-bin.jar /var/lib/jenkins/lib/java/

# howtos
for (item in Hudson.instance.items) {

java -jar hudson-cli.jar -s http://your_Hudson_server/ copy-job myjob copy-myjob

# port forward

# ssl
# /etc/default/jenkins
JENKINS_ARGS="--webroot=/var/cache/$NAME/war --httpsPort=8443 --httpsCertificate=/etc/ssl/certs/ --httpsPrivateKey=/etc/ssl/"

iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443


Ubuntu: Install Nemo file manager

wget -O - | bash -


sudo add-apt-repository -y ppa:webupd8team/nemo
sudo apt-get update
sudo apt-get install -y nemo


Install LXC (Linux Containers) under Ubuntu


Create container
export LANG=en_US.UTF-8
export CONTAINER=wheezy

sudo sudo lxc-destroy -n ${CONTAINER}
sudo lxc-create -t debian -n ${CONTAINER}
sudo lxc-start -d -n ${CONTAINER}

echo 'Acquire::http::Proxy "http://apt-cacher:3142/";' | sudo tee /var/lib/lxc/${CONTAINER}/rootfs/etc/apt/apt.conf

sudo lxc-attach -n ${CONTAINER} -- apt-get clean
sudo lxc-attach -n ${CONTAINER} -- apt-get update
sudo lxc-attach -n ${CONTAINER} -- apt-get dist-upgrade -y

Install Obnam

wget -O - | bash -


# ensure that this script is run by root
if [ $(id -u) -ne 0 ]; then
  sudo $0

# install the latest version 
if [ "$1" == "-n" ]; then
  # add repository
  echo "deb wheezy main" > /etc/apt/sources.list.d/obnam.list
  wget -q -O - | apt-key add -
  apt-get update

# install obnam
apt-get install -y obnam

# config
cat < /root/.obnam.conf
repository = sftp://root@itdev/backup/
root = /var/www
log = /var/log/obnam.log

# add ssh keys
ssh-copy-id root@itdev

# backup
obnam backup

# commands
obnam ls
obnam ls --generation=2
obnam diff 2 5

# mount
apt-get install python-fuse #fuse

obnam mount --to /mnt/

Links - Gut gesichert: Verschlüsselte Datensicherung unter Linux mit Obnam

Debian: Install Puppet on client

Install Puppet client (agent)
wget -O - | bash -


# ensure that this script is run by root
if [ $(id -u) -ne 0 ]; then
  sudo $0

# install
apt-get install -qq -y puppet
# configure to autostart puppet on boot
if [ $(puppet --version | cut -d "." -f1) -ge 3 ]; then
  # puppet 3.x
  /etc/init.d/puppet stop
  puppet agent --enable
  # puppet 2.x
  [ -f /etc/default/puppet ] && sed -i 's|START=no|START=yes|g' /etc/default/puppet

enabling pluginsync
sed -i '/\[main\]/a\pluginsync=true\' /etc/puppet/puppet.conf
sed -i '/\[main\]/a\runinterval=10\' /etc/puppet/puppet.conf

test connection to pupet server
puppet agent --test
puppet agent --test --server puppet.lab --waitforcert 60 --verbose

change update interwal in seconds (default 30min.)
vi /etc/puppet/puppet.conf

puppet version
puppet --version


Install icinga srver

wget -O - | bash -


# ensure that this script is run by root
if [ $(id -u) -ne 0 ]; then
  sudo $0

debconf-set-selections <<\EOF
postfix postfix/mailname string $(hostname)
postfix postfix/main_mailer_type select Internet Site
icinga-common icinga/check_external_commands select false
icinga-cgi icinga/adminpassword-repeat string icingaadmin
icinga-cgi icinga/adminpassword string icingaadmin
icinga-cgi icinga/httpd select apache2

# install the latest version 
. /etc/os-release
if [ "${ID}" == "debian" ]; then
  # add Icinga repository
  DIST=$(grep PRETTY_NAME /etc/os-release | cut -d "(" -f2 | cut -d ")" -f1)
  echo "deb debmon-${DIST} main" > /etc/apt/sources.list.d/debmon.list
  wget -q -O - | apt-key add -
  apt-get update

# install icinga
apt-get install -y icinga

# disable double log output to syslog
sed -i 's|use_syslog=1|use_syslog=0|g' /etc/icinga/icinga.cfg

# show 1000 results by default
sed -i 's|result_limit=50|result_limit=1000|g' /etc/icinga/cgi.cfg

# restart icinga
/etc/init.d/icinga restart

# redirect by default to /icinga/
echo 'RedirectMatch "^/$" "/icinga/"' >> /etc/apache2/conf-available/icinga.conf

# allow "Re-schedule Next Host Check" from Icinga webgui
sed -i 's|check_external_commands=0|check_external_commands=1|g' /etc/icinga/icinga.cfg
chmod 2710 /var/lib/icinga/rw

# restart werbserver
service apache2 restart

Admin login
user: icingaadmin
pass: icingaadmin

Icinga Apache configuration

Icinga repository

Enable automatic updates
wget -q --no-check-certificate -O - | bash -

configure contact
sed -i 's|root@localhost||g' /etc/icinga/objects/contacts_icinga.cfg

change password
htpasswd -c /etc/icinga/htpasswd.users icingaadmin


a2enmod authnz_ldap

echo "pass1234" > /etc/apache2/
chmod 600 /etc/apache2/

sed -i 's|=icingaadmin|=*|g' /etc/icinga/cgi.cfg

- AuthUserFile /etc/icinga/htpasswd.users
+ AuthBasicProvider ldap
+ AuthLDAPBindDN ""
+ AuthLDAPBindPassword "exec:/bin/cat /etc/apache2/"
+ AuthLDAPURL "ldap://,dc=com?sAMAccountName?sub?(objectClass=*)" NONE
+ AuthLDAPRemoteUserIsDN off
+ Require ldap-group CN=IPG.DevOps,OU=_IntranetPermissionGroups,DC=example,DC=com

service apache2 restart

# config

# cgi

Links - Debian Monitoring Project - Icinga repository - Icinga 2 preview

Install Spotify under Linux / Ubuntu

wget -O - | bash -


# add repository
sudo add-apt-repository "deb stable non-free"

sudo apt-key adv --keyserver hkp:// --recv-keys 94558F59 D2C19886

# update
sudo apt-get update -qq

# install spotify
sudo apt-get install -y spotify-client

# install from snap
snap install spotify

Fix "GLIBC_2.14 not found"on Debian Wheezy

Syndicate content