Linux MySQL

MySQL initial run

This serves to remind me how to initialise a new MySQL installation, if it doesn’t happen automatically. PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password ‘new-password’ /usr/bin/mysqladmin -u root -h password ‘new-password’ Alternatively you can run: […]

CentOS Debian Linux

Fix font path for gnuplot

In the console enter: In my gnuplot (bash) scripts I have: export GDFONTPATH=”/usr/share/fonts/truetype/ttf-dejavu/” export GNUPLOT_FONTPATH=”/usr/share/fonts/truetype/ttf-dejavu/” Other methods: export GDFONTPATH=”/your/font/directory/fonts/” before you start gnuplot. The fonts should be in the folder “/fonts”. To make this persistent across reboots, and to set the paths for fonts in postscript terminal, add lines similar to the ones below to […]

Linux

Some useful Linux commands

Rename files / folders with spaces: IFS=$’\n’;for f in `find .`; do file=$(echo $f | tr [:blank:] ‘_’); [ -e $f ] && [ ! -e $file ] && mv “$f” $file;done;unset IFS Rsync: rsync -r -a -v rsync://ns2/storage/www-srv /storage/ ^^^ from ns2 to new host – (run on new host) Rsync (local to remote) […]

Linux LVM

Create and manage Linux volumes (LVM)

Create the physical volume: pvcreate /dev/sdb Create the Volume Group: vgcreate vg_backuppc_storage /dev/sdb Create the logical volume: lvcreate -l +100%FREE vg_backuppc_storage Create a filesystem on the logical volume: mkfs.ext4 /dev/vg_backuppc_storage/lvol0 Resize the physical volume: (need to unmount the LV before doing this) pvresize /dev/sdb Extend the volume: lvextend -l +100%FREE -r /dev/vg_backuppc_storage/lvol0 Mount your new […]

Exchange Exchange 2013 Windows

Exchange 2013 notes

Configure a forwarding address in Exchange shell: [PS] C:\Windows\system32>Get-Mailbox “User_Name” | fl ForwardingSMTPAddress,DeliverToMailboxandForward ForwardingSmtpAddress : smtp:user@example.com DeliverToMailboxAndForward : True DeliverToMailboxandForward specifies that email is delivered both to the users’ mailbox and the SMTP address. You need to create a contact to use the SMTP address. Oddly enough – when I set this – the ForwardingSmtpAddress […]

Linux Nagios

Define a new service in Nagios

To define a new service in Nagios you need to do the following: 1) Add the necessary commands to /etc/nagios/objects/commands.cfg 2) Define the host and service in /etc/nagios/objects/templates.cfg 3) Define a host definition in /etc/nagios/objects/.cfg Command definition in commands.cfg define command{ command_name check-ssl-cert command_line $USER1$/check_ssl_certificate -H $ARG1$ -p $ARG2$ -c $ARG3$ -w $ARG4$ } The […]

Cisco Networking

Cisco inverse subnet masks

Leeched from http://www.cyberflunk.com/~nikm/cisco/masks.html (without permission) Cisco Netmasks, CIDR sizes, and Inverse Masks The address/netmask syntax of 172.16.35.0/255.255.255.0 should be familiar to anyone with some experience with IP routing, and is fairly easy to figure out address ranges given a calculator and a piece of scrap paper. There are other forms of addressing which are used […]