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

Puppet: iPXE boot module

# create module structure
mkdir -p /etc/puppet/modules/ipxe/files
mkdir -p /etc/puppet/modules/ipxe/manifests

# download files
wget -q -O /etc/puppet/modules/ipxe/files/ipxe.lkrn
wget -q -O /etc/puppet/modules/ipxe/files/49_ipxe

# download module definiction
wget -q -O /etc/puppet/modules/ipxe/manifests/init.pp

class ipxe {
  file { "/boot/grub/ipxe.lkrn":
    source => "puppet:///modules/ipxe/ipxe.lkrn"

  file { "/etc/grub.d/49_ipxe":
    source => "puppet:///modules/ipxe/49_ipxe",
    mode => 700

  exec { "update-grub":
    subscribe   => File["/etc/grub.d/49_ipxe"],
    refreshonly => true

Nginx: compile with http_substitutions_filter support

# tested under CentOS release 5.11 (Final)
yum -y install rpm-build git
yum -y install gcc gcc-c++ make zlib-devel pcre-devel openssl-devel
rpm -i nginx-1.6.2-1.el5.ngx.src.rpm
git clone git://
cd /usr/src/redhat/SOURCES/
tar xzf ../nginx-1.6.2.tar.gz
cd nginx-1.6.2
./configure --add-module=/root/ngx_http_substitutions_filter_module  --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.

Check SSL/TLS server encryption support

# sslyze
wget -P /tmp/
unzip /tmp/sslyze-* -d /tmp/
/tmp/sslyze-*-linux64/sslyze/ --regular
# cipherscan
wget -P /tmp
unzip /tmp/ -d /tmp/
/tmp/cipherscan-master/ -t
# old
# Curl parameter
 -ssl2         - just use SSLv2
 -ssl3         - just use SSLv3
 -tls1         - just use TLSv1
 -tls1_1       - just use

Jenkins: install and configure JDK

# download and extract JDK
wget --continue --no-check-certificate --header "Cookie: oraclelicense=a" ${URL} -O /tmp/${URL##*/}
tar -C /var/lib/jenkins/tools/hudson.model.JDK/ -xzf /tmp/jdk-8u25-linux-x64.tar.gz

# configure JDK
JDK installations
Install automatically: check out
JAVA_HOME: /var/lib/jenkins/tools/hudson.model.JDK/jdk1.8.0_25

# create New Item
Item name: JDBCTest
check "Freestyle project"

Install Gnokii (Manage SMS on USB Stick)

# install
sudo apt-get install -y gnokii

# set permissions (TODO set permissions with udev)
sudo chmod o+rw /dev/ttyUSB0

# configure
cat < .gnokiirc
model = AT
port = /dev/ttyUSB0
connection = serial

# show sms status
gnokii --showsmsfolderstatus

# show sms
gnokii --getsms MT 0 end

# show sms and filter for "http"
gnokii --getsms MT 0 2> /dev/null | grep http

# delete sms
gnokii --deletesms MT 0

# Links


apt-get install -y squid

Configuration /etc/squid3/squid.conf
http_port 80 accel vhost
cache_peer parent 80 0 no-query login=PASS originserver name=myAccel1
acl our_sites1 dstdomain
http_access allow our_sites1
cache_peer_access myAccel1 allow our_sites1
cache_peer_access myAccel1 deny all

# reload configuration
squid3 -k reconfigure


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

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




systemctl enable docker
systemctl status docker

# Delete all containers
docker rm $(docker ps -a -q)

# Delete all images
docker rmi $(docker images -q)

# fix missing btrf storage driver
sudo rm -rf /var/lib/docker/aufs

Debug / Run test container
docker info
docker run hello-world
#docker run -it centos bash

Login to container
docker exec -it CONTAINER_ID bash

#docker run -i --rm ubuntu bash

sudo docker run -i -t --name dc-ubuntu ubuntu bash

Syndicate content