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

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


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


# set font size
gsettings set org.gnome.desktop.interface font-name 'Ubuntu 10'

# configure panel clock
gsettings set com.canonical.indicator.datetime show-date true
gsettings set com.canonical.indicator.datetime show-day true
gsettings set com.canonical.indicator.datetime show-week-numbers true

# configure panel sound
gsettings set com.canonical.indicator.sound visible true
gsettings set org.gnome.desktop.sound event-sounds false

# remove keyboard switch indicator from panel
gsettings set com.canonical.indicator.keyboard visible false

# configure workspaces
gsettings set org.gnome.desktop.wm.preferences num-workspaces 2

# configure session
gsettings set org.gnome.desktop.session idle-delay 600

# configure touchpad
gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false

# configure nautilus
gsettings set org.gnome.nautilus.preferences default-folder-viewer 'list-view'
gsettings set org.gnome.nautilus.list-view default-zoom-level 'smallest'

# configure caja
gsettings set org.mate.caja.preferences default-folder-viewer 'list-view'
gsettings set org.mate.caja.list-view default-zoom-level 'smallest'

# configure gedit
gsettings set org.gnome.gedit.preferences.editor display-line-numbers true
gsettings set org.gnome.gedit.preferences.editor tabs-size 4
gsettings set org.gnome.gedit.preferences.editor insert-spaces true
gsettings set org.gnome.gedit.preferences.editor bracket-matching true
gsettings set org.gnome.gedit.preferences.editor create-backup-copy false

# configure pluma
gsettings set org.mate.pluma editor-font "Ubuntu Mono 13"
gsettings set org.mate.pluma color-scheme 'classic'
gsettings set org.mate.pluma use-default-font false
gsettings set org.mate.pluma display-line-numbers true
gsettings set org.mate.pluma bracket-matching true
gsettings set org.mate.pluma insert-spaces true
gsettings set org.mate.pluma active-plugins "['docinfo', 'snippets', 'sort', 'filebrowser', 'changecase', 'quickopen', 'spell', 'time', 'modelines']"

# autostart
[ ! -d ~/.config/autostart ] && mkdir ~/.config/autostart && chmod 700 ~/.config/autostart
ln -s /usr/share/applications/chromium-browser.desktop ~/.config/autostart/
ln -s /usr/share/applications/thunderbird.desktop ~/.config/autostart/
ln -s /usr/share/applications/hamster-indicator.desktop  ~/.config/autostart/

# dont forward locale to server
sudo sed -i 's|    SendEnv LANG LC_*|#   SendEnv LANG LC_*|g' /etc/ssh/ssh_config

# set pluma as default text editor
sudo sed -i 's|text/plain=gedit.desktop|text/plain=pluma.desktop|g' /etc/gnome/defaults.list

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



systemctl enable docker
systemctl status docker

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
sudo docker start -i dc-ubuntu

# wordpress
docker run -d --name dc-mysql -e MYSQL_ROOT_PASSWORD=mysqlpwd mysql
docker run -d --name dc-wordpress --link dc-mysql:mysql -p 7894:80 wordpress

Install GitLab

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


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

# install required packages
apt-get install -y ca-certificates curl cron

#  bypass the apt-cacher-ng proxy
echo ' "DIRECT";' > /etc/apt/apt.conf.d/99_gitlab

# download GitLab installation script
curl -s | bash

# workaround for PostgreSQL shmmax issue
echo "kernel.shmmax=17179869184" >> /etc/sysctl.d/90-shmmax.conf
/sbin/sysctl -p /etc/sysctl.d/90-shmmax.conf

# install GitLab Community Edition
apt-get install -y gitlab-ce

# configure domain
sed -i "s||$(hostname -A | tr -d ' ')|g" /etc/gitlab/gitlab.rb
gitlab-ctl reconfigure

user: root
pass: 5iveL!fe

Downloads: GitLab CE Download Archives

# check instalation
gitlab-rake gitlab:check

# GitLab APT repository

# rebuild an authorized_keys file
gitlab-rake gitlab:shell:setup

# install specific version
sudo apt-get install -y gitlab-ce=7.10.1~omnibus.1-1

Links - old GitLab packages archive


apt-get install -y rsnapshot

mv /etc/rsnapshot.conf /etc/

cat < /etc/rsnapshot.conf
config_version 1.2
snapshot_root /media/backup/
logfile /var/log/rsnapshot.log
verbose 3
loglevel 3

cmd_preexec /bin/mount /media/backup
cmd_postexec /bin/umount /media/backup
#backup_script /usr/local/bin/ localhost/mysql/

cmd_rsync /usr/bin/rsync
# cmd_ssh /usr/bin/ssh

interval daily 7
interval weekly 3
interval monthly 1

#exclude dev/*
exclude lost+found/*
exclude mnt/*
exclude proc/*
exclude run/*
exclude sys/*

Tomcat configuration

wget -O - | bash -


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

# install Java JDK
wget -q -O - | bash -

# install tomcat
apt-get install -y tomcat8

echo "JAVA_HOME=/usr/lib/jvm/$(ls /usr/lib/jvm | grep oracle | tail -1)" >> /etc/default/tomcat?

# configure tomcat to linsten on port 80 instead of default 8080
sed -i 's|port="8080"|port="80"|g' /etc/tomcat?/server.xml

# bind to a privileged port
sed -i 's|#AUTHBIND=no|AUTHBIND=yes|g' /etc/default/tomcat?

# restart tomcat
service tomcat8 restart

# start
export JAVA_HOME=/usr/lib/jvm/jdk1.6.0
export JAVA_OPTS="$JAVA_OPTS -Xmx256m"

# deploy
/opt/SDK2/bin/asadmin deploy /tmp/Intranet.war

# change default port from 8080 to 80

# log directory

# redirect by default to a app
mv /var/lib/tomcat6/webapps/ROOT/index.html /var/lib/tomcat6/webapps/ROOT/index.old.html
cat < /var/lib/tomcat6/webapps/ROOT/index.html


# manager

# apache module



Syndicate content