Migrating Ubuntu to Linux Mint 10

Posted on Tue 22 February 2011 in Linux • Tagged with Debian, Linux, notepad, ubuntu, linux mint • 1 min read

Here are some random notes for the migration from ubuntu to linux mint 10 (julia) !

/etc/apt/sources.list

deb http://packages.linuxmint.com/ julia main upstream import
deb http://archive.ubuntu.com/ubuntu/ maverick main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ maverick-updates main restricted universe multiverse …

Continue reading

Linux Virtual Tape Library

Posted on Mon 14 February 2011 in Linux • Tagged with Backup, Linux, Server, notepad • 1 min read

to save for later...

mhvtl - A Linux Virtual Tape Library

That could be a really nice backup solution.


ARD (Video)-Podcast Downloader

Posted on Wed 24 November 2010 in Linux • Tagged with Linux, Perl, Code • 1 min read

#!/usr/bin/perl -w
#
# ARD tagesschau podcast url
$url = "http://www.tagesschau.de/export/video-podcast/webl/tagesschau/";
#
# wget parameter
$wgetopts = "--quiet";
$targetpath = "/tmp";
#
# Enable verbose output
$verbose = 0;
#
#############################

use XML::Simple;
use LWP::Simple;

sub output{
        my $msg = shift;
        if ($verbose) { printf STDERR "$msg\n"; }
}

$xmlcontent = get($url);

my $xml …

Continue reading

Nagios plugin for JBoss monitoring - check_ajp

Posted on Fri 05 November 2010 in Linux • Tagged with JBoss, Nagios, Perl, Server, linux, notepad, plugin • 1 min read

Released check_ajp v1 - see download

md5sum: bfd5c249a1f44123062a0485c3af524c

Usage: ./check_ajp --app 10.10.10.10

$ ./check_ajp --app 10.28.10.80; echo "return: $?"
OK - AJP - 0.00294 seconds response time|time=0.002943s;;;0.000000;10.000000
return: 0
default setting
port 8009
warning 1.5 seconds
critical 3 seconds
timeout …

Continue reading

jstat - jvm memory stats

Posted on Wed 27 October 2010 in Linux • Tagged with java, tools, linux, notepad • 1 min read

/usr/java/jdk1.5.0_22/bin/jstat -gcutil 18703 1s 10

gcutil = Summary of Garbage Collection Statistics (mandatory)
18703 = process id (mandatory)
1s = refresh interval (optional)
10 = counter (optional)

$ /usr/java/jdk1.5.0_22/bin/jstat -gcutil 25532 1s 10
  S0     S1     E      O      P     YGC     YGCT    FGC    FGCT     GCT …

Continue reading

Create a shared disk for VMware ESX guests

Posted on Mon 11 October 2010 in Linux • Tagged with drbd8, ocfs2, Server, VMware, linux, work, howto • 1 min read

To create a shared disk between two or more VMs, login into one of your ESX hosts and create a disk image.

cd /vmfs/volumes/#volume-name#/#vm-name#/;
vmkfstools -d thick -a lsilogic -c 50G shareddisk.vmdk;

Add the new hardrive to the guest(s) and select a new SCSI bus …


Continue reading

Apache Tomcat & logrotate

Posted on Tue 31 August 2010 in Linux • Tagged with Server, SUSE Linux Enterprise Server, Linux, work, notepad • 1 min read

Some linux distribution are shiped without a config for the catalina.out (Tomcat application server) ;)

$ cat /etc/logrotate.d/tomcat
/var/log/tomcat/base/catalina.out {
    compress
    copytruncate
    create 644 tomcat tomcat
    rotate 30
    size 4M
}

The catalina.out will be rotated after 4 mb and stored for 30 days …


Continue reading

Linux routing basics

Posted on Fri 27 August 2010 in Linux • Tagged with Network, Router, Server, linux, routing • 1 min read

You getting from your ISP a subnet like this 172.30.26.16/28,
and your router has the ip 172.30.26.17 !

You need to enable the ip forwarding in the kernel

sysctl -w net.ipv4.ip_forward=1

And we need to enable proxy arp! This is necessary …


Continue reading

Ubuntu PHP hardening with Suhosin

Posted on Wed 28 July 2010 in Linux • Tagged with Debian, Security, Server, php • 1 min read

Ubuntu includes the php suhosin patches....

Install suhosin extension

aptitude install php5-suhosin

/etc/php5/{apache2,cli,cgi}/php.ini

; suhosin parameters
suhosin.executor.include.max_traversal = 4
suhosin.executor.disable_eval = On
suhosin.executor.disable_emodifier = On
suhosin.mail.protect = 2
suhosin.sql.bailout_on_error = On

Restart apache

service apache2 restart

Sometimes it could …


Continue reading

Postfix as relayhost with SASL auth

Posted on Wed 21 July 2010 in Linux • Tagged with Debian, Postfix, Server, mail, sasl • 1 min read

Client configuration (notebook, workstation what ever)

  1. Edit your /etc/postfix/main.cf
  2. Create your passwordmap - /etc/postfix/sasl_passwords
  3. Run postmap for /etc/postfix/sasl_passwords

Server configuration

  1. Nothing if you have already a working mail server. That the user (/etc/postfix/sasl_passwords) must exists on the server is plausible ? Check your …

Continue reading