install

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

Ubuntu: Install Gnome classic

wget https://raw.githubusercontent.com/panticz/installit/master/install.gnome-fallback.sh -O - | bash -

#!/bin/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
http://www.elasticsearch.org/overview/elkdownloads/

#
# 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 https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.2.deb -P /tmp
dpkg -i /tmp/elasticsearch-1.3.2.deb

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

Install Jenkins

Install
wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/installit/master/install.jenkins.sh -O - | bash -

#!/bin/bash

# install required packages
apt-get install -y wget

# add repository key
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add -

# add repository
echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list
apt-get update

# install jenkins
apt-get install -y jenkins

Manuall plugins download
http://updates.jenkins-ci.org/download/plugins

disk-usage plugin
apt-get install -y fontconfig
https://wiki.jenkins-ci.org/display/JENKINS/Disk+Usage+Plugin

workspace
/var/lib/jenkins/workspace

manual update
wget http://updates.jenkins-ci.org/download/war/latest/jenkins.war -O /usr/share/jenkins/jenkins.war
/etc/init.d/jenkins restart
tail -f /var/log/jenkins/jenkins.log

Jenkins CLI
http://www.panticz.de/jenkins-cli

Plugins
# configure plugins
http://YOUR_JENKINS_IP:8080/pluginManager/available

# Locale plugin
https://wiki.jenkins-ci.org/display/JENKINS/Locale+Plugin
Manage Jenkins > Configure System
Locale
Default Language: en
Ignore browser preference and force this language to all users (check)

# Git plugin
https://wiki.jenkins-ci.org/display/JENKINS/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 http://cdn.mysql.com/Downloads/Connector-J/mysql-connector-java-5.1.33.tar.gz -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) {
println("$item.name")
}

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

# port forward
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu

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

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

Links
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
http://pkg.jenkins-ci.org/debian/

Ubuntu: Install Nemo file manager

wget https://raw.githubusercontent.com/panticz/installit/master/install.nemo.sh -O - | bash -

#!/bin/bash

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

Links
http://www.webupd8.org/2013/10/install-nemo-with-unity-patches-and.html

Install LXC (Linux Containers) under Ubuntu

Installation
http://www.panticz.de/install_lxc

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

Installation
wget https://raw.githubusercontent.com/panticz/installit/master/install.obnam.sh -O - | bash -

#!/bin/bash

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

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

# install obnam
apt-get install -y obnam

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

# add ssh keys
ssh-keygen
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
http://www.heise.de/artikel-archiv/ct/2013/23/170_Gut-gesichert - Gut gesichert: Verschlüsselte Datensicherung unter Linux mit Obnam

Debian: Install Puppet on client

Install Puppet client (agent)
wget https://raw.githubusercontent.com/panticz/installit/master/install.puppet-client.sh -O - | bash -

#!/bin/bash

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

# 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
else
  # puppet 2.x
  [ -f /etc/default/puppet ] && sed -i 's|START=no|START=yes|g' /etc/default/puppet
fi

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
OR
puppet agent --test --server puppet.lab --waitforcert 60 --verbose
#--no-daemonize

change update interwal in seconds (default 30min.)
vi /etc/puppet/puppet.conf
[main]
runinterval=300

puppet version
puppet --version

Links
http://docs.puppetlabs.com/learning/agent_master_basic.html

Install icinga srver

wget https://raw.githubusercontent.com/panticz/installit/master/install.icinga.sh -O - | bash -

#!/bin/bash

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

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
EOF

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

# 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
http://YOUR_IP/icinga/
user: icingaadmin
pass: icingaadmin

Icinga Apache configuration
/etc/apache2/conf-available/icinga.conf

Icinga repository
http://packages.icinga.org/

Enable automatic updates
# http://www.panticz.de/debian-ubuntu-automatic-upgrades
wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/scripts/master/enable_auto_update.sh -O - | bash -

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

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

plugins
http://www.panticz.de/Icinga-plugins

LDAP
a2enmod authnz_ldap

echo "pass1234" > /etc/apache2/ldap_password.inc
chmod 600 /etc/apache2/ldap_password.inc

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

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

service apache2 restart

# config
https://wiki.icinga.org/display/Dev/Icinga+Core+Debug+Config

# cgi
http://docs.icinga.org/latest/de/cgiparams.html#cgiparams-ahas
http://icinga.example.com/cgi-bin/icinga/status.cgi?servicestatustypes=20&noheader=1

Links
http://www.debmon.org/ - Debian Monitoring Project
http://packages.debian.org/wheezy/icinga
http://packages.icinga.org/debian/ - Icinga repository
https://www.icinga.org/icinga2/ - Icinga 2 preview
http://www.sysadminslife.com/monitoring-2/icinga-1-9-installation-unter-debian-squeeze-wheezy-aktuellste-version/

Install Spotify under Linux / Ubuntu

wget https://raw.githubusercontent.com/panticz/installit/master/install.spotify.sh -O - | bash -

#!/bin/bash

# add repository
sudo add-apt-repository "deb http://repository.spotify.com stable non-free"

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 94558F59 D2C19886

# update
sudo apt-get update -qq

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

Fix "GLIBC_2.14 not found"on Debian Wheezy
http://www.random-dev.de/fix-version-glibc_2-14-found-error/

Install MySql Workbench under Ubuntu

wget https://raw.githubusercontent.com/panticz/installit/master/install.mysql-workbench.sh -O - | bash -

#!/bin/bash

# add repository
. /etc/os-release
echo "deb http://repo.mysql.com/apt/${ID}/ $(lsb_release -cs) workbench-6.3" | sudo tee -a /etc/apt/sources.list.d/mysql.list

# update package list
sudo apt-get update

# install MySQL Workbench Community edition
sudo apt-get install -y mysql-workbench-community

# test
. /etc/os-release
cat < /etc/apt/sources.list.d/mysql.list
deb http://repo.mysql.com/apt/${ID}/ $(lsb_release -cs) mysql-apt-config
deb http://repo.mysql.com/apt/${ID}/ $(lsb_release -cs) workbench-6.3
EOF

# fix utopic ?
sed -i 's|utopic|trusty|g' /etc/apt/sources.list.d/mysql.list

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 5072E1F5

sudo apt-get update

debconf-set-selections <<\EOF
mysql-apt-config mysql-apt-config/select-workbench select workbench-6.2
EOF

sudo apt-get install -y mysql-apt-config

# sudo apt-get install libmysqlclient18
sudo apt-get install -y mysql-workbench-community

# test 2
# dpkg --force-all
# sudo apt-get install libaio1
# sudo apt-get install libcairo2

# cat /etc/apt/sources.list.d/mysql.list
deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-apt-config
deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-5.6
deb http://repo.mysql.com/apt/ubuntu/ trusty workbench-6.2
# deb http://repo.mysql.com/apt/ubuntu/ trusty connector-python-2.0
# deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-utilities-1.5

apt-get update
sudo apt-get install -y mysql-workbench-community

# deb-src http://repo.mysql.com/apt/ubuntu/ trusty mysql-5.6

# ssh tunnl error
http://bugs.mysql.com/bug.php?id=75764

# admin mysql client
#audo apt-get -y install mysql-admin
#audo apt-get -y install mysql-query-browser

Links
http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/
http://dev.mysql.com/downloads/workbench
http://wiki.ubuntuusers.de/MySQL/Werkzeuge

Syndicate content