wiki'd

by JoKeru

Backup ESXi 5.1 VMs with ghettoVCB

This tutorial will show you how to backup your ESXi VMs using a free solution - ghettoVCB.
I'm using it on ESXi hosts that store the VMs locally.
The script is not interactive and can be setup as a cron job.

Here is the script philosophy:
- it takes snapshots of live …

Debian NFSv3 Server with static ports

VMware (ESXi 5.1) only supports NFS version 3 over TCP/IP

Setup NFS Server behind a firewall:
- rpcbind (portmapper) listens on port 111 (default)
- mountd binds to port 32767 (custom)
- nfsd listens on port 2049 (default)
- statd binds to port 32765 for incoming requests and it must answer on …

MySQL Cluster Setup

2 x Data Nodes - data01, data02
2 x MySQL Nodes - mysql01, mysql02
1 x Management Node - mgm

Data Nodes
[cc lang='bash']
\$ apt-get install libaio1 -y
\$ wget http://dev.mysql.com/get/Downloads/MySQL-Cluster-7.3/mysql-cluster-gpl-7.3.2-debian6.0-x86_64.deb/from/http://cdn.mysql.com/ -O mysql-cluster-gpl-7.3.2-debian6.0-x86_64 …

elasticsearch basics and commands

A cluster consists of one or more nodes which share the same cluster name. Each cluster has a single master node which is chosen automatically by the cluster and which can be replaced if the current master node fails.

A node is a running instance of elasticsearch which belongs to …

New Volume to Amazon EC2 Instance

Login to AWS Management Console, create new EBS Volume and attach it to the instance as /dev/sdf (the instance will see the new volume as /dev/xvdf).

[cc lang='bash']
\$ fdisk /dev/xvdf
# primary partition /dev/xvdf1
# type Linux LVM (8e)

\$ pvcreate /dev/xvdf1
\$ vgcreate VG-IMG /dev/xvdf1
\$ lvcreate …

ElasticSearch Tunning for LogStash

[cc lang='bash']
# create ext4 fs on /dev/sdb1
\$ mkfs.ext4 /dev/sdb1
# enable writeback mode, this mode will typically provide the best ext4 performance
\$ tune2fs -o journal_data_writeback /dev/sdb1
# delete has_journal option
\$ tune2fs -O \^has_journal /dev/sdb1
# required fsck
\$ e2fsck -f /dev/sdb1
# check fs options
\$ dumpe2fs /dev/sdb1 …

Centralizing Logs

Log Server
[cc lang='bash']
# prerequisites
\$ apt-get install default-jre-headless curl -y
\$ echo -e "root hard nofile 1024000\nroot soft nofile 1024000" >> /etc/security/limits.conf

# logstash 1.2.0
\$ mkdir /usr/share/logstash
\$ wget -q --no-check-certificate https://logstash.objects.dreamhost.com/release/logstash-1.2.0-flatjar.jar -O /usr/share/logstash …

Centreon install on CentOS

Centreon 2.4.4 on CentOS 5.9 (clean install, minimal, selinux disabled)

[cc lang='bash']
\$ wget http://yum.centreon.com/standard/2.2/ces-standard.repo -O /etc/yum.repos.d/ces-standard.repo
\$ cat \<\<'EOF' > /etc/pki/rpm-gpg/RPM-GPG-KEY-CES
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (GNU …

SSH Auto-Completion in BASH

[cc lang='bash']
# put any hosts you want to complete in your /etc/hosts
\$ apt-get install bash-completion
\$ vi /etc/bash.bashrc # un-comment bash completion
[/cc]