Grow disk, lvm, partitions

If you increase the disk size (block copy to a biggest disk, or size increase when virtual disk), you’ll need to notice the change to the OS, so it can use the extra space. In this scenario, we increased the virtual disk /dev/sda from 5 To 20Gb. The…

Read this article

Apache redirections

Apache redirection based on request host This example redirects requests from www.dev.domain.com to www.dev.newdomain.com: ServerName www.dev.domain.com ServerAlias www.dev.newdomain.com DocumentRoot /var/www/ RewriteEngine on RewriteCond %{HTTP_HOST} ^([^.]+)*\.([^.]+)*\.domain\.com$ [NC] RewriteRule ^(.*)$ http://%1.%2.newdomain.com [R=301,L]…

Read this article

CSR generation

Buying an SSL certificate requires you send an .csr (Certificate signing request) to your SSL reseller. Here are the steps to generate one. mkdir -p ~/newcert cd ~/newcert # Generate a RSA key without password openssl genrsa -out cert.key 2048 chmod 400 cert.key # Generate the csr openssl req -new…

Read this article

Configure snmp traps with ESXi 5.1 and Debian

Read the current configuration of SNMP ESX_SERVER # esxcli system snmp get Authentication: Communities: Enable: false Engineid: Hwsrc: indications Loglevel: info Notraps: Port: 161 Privacy: Remoteusers: Syscontact: Syslocation: Targets: Users: V3targets: Configure traps, and enable snmp service ~ # esxcli system snmp set --targets=destination_server@162/yourcommunity ~ # esxcli system snmp set…

Read this article

GNU Screen customisation

Screen is a great tool to multiplex consoles. I like to have the hard status bar at the bottom : caption always “%{+b rk}%H%{gk} |%c %{yk}%d.%m.%Y | %72=Load: %l %{wk}” hardstatus alwayslastline “%?%{yk}%-Lw%?%{wb}%n*%f %t%?(%u)%?%?%{yk}%+Lw%?”…

Read this article