Archive for the ‘linux’ Category

The right software on the wrong platform…

Tuesday, March 11th, 2008

Now, Im one of those admins who despises running certain open source software packages on Windows. It just bugs me. Just because a certain application runs on Windows, or is reported to run on Windows (if you follow the 101 step procedure to the t and don’t stumble on any gotchas because your trying to accomplish something slightly different then what is documented), doesn’t mean that it should be run on Windows, especially for production applications. Take the LAMP stack for example Apache HTTP Server, PHP/PERL, MySQL. All these run on the Windows platform and thats great and all. It makes it very convenient to set up a development environment on windows machines. But in my very humble opinion, these projects were made to be ran in a *nix environment. Just look at the configuration files and you can easily see the developers have intended these to be run under a *nix platform. Installation is usually a breeze with these apps under *nix. Now I must admit that the Apache Group, MySQl, and ActiveState have done a very great job with there windows installation packages, but have you ever installed PHP on IIS? Tell me that wasn’t a headache the first time you tried that? Didn’t it seem kind of hackish? And the performance, how was it for you? Now, I haven’t tried the PHP “friendly” IIS 7 but I’m hoping this has improved some. Now, the lamp stack is just my example, but theres a multitude of open source software out there that just should not be run under windows. Installation and configuration usually involve some sort of two-bit hack and integration and/or troubleshooting is typically dreadful and time-consuming. And it goes both ways. I would never try to install IIS or MSSQL on a *nix platform but good luck to you if you dare! Let me know how that goes for you. And did someone say emulators? Yah, I “hear” wine has made some great strides in the past few years, especially thanks to the folks at google, but if your gonna run linux as your desktop, cant you make the full commitment and just run OpenOffice or Gimp? And please don’t even mention the word “cygwin” to me!

But “business requirements” are “business requirements” after all, aren’t they.

Xen - Disk based Dom-U Cloning

Thursday, February 28th, 2008

Heres a quick little script for automating the creation of Dom-U’s and there corresponding configuration files. Nothing to fancy, but it helps for users who may be unfamiliar with the process or just need to fire up a new Dom-U quickly without going thru an installation process.

This script assumes that when you first build a Dom-U either by d’bootstrapping or windows installation or whatever it may be, you shut the Dom-U down and move the “template” to /home/xen/templates and that your running Dom-U’s are running from /home/xen/domains . Lastly make sure the template configuration file has the <> strings so sed can replace them with your intended variables. This can be extended as you see fit, if you need to change values for networking, kernel, etc… Happy cloning.

./clone.sh

#!/bin/bash

function syntax {
           echo "Syntax: ./clone.sh source_image destination_image memory(mb)"
           echo " where source_image is the name of the directory in this folder                                                              "
           echo "  destination_image is the name of your new DomU "
           echo "  and memory(mb) is the ammount of memory you want to provision                                                              ."
           echo ""
           echo "Example: ./clone.sh debian_etch_x86 v-debian-etch-x 512"
           echo "Example: ./clone.sh winxp_pro_x86 v-winxp-pro-x 512"
}

if [ $1 ]; then
        if [ $2 ]; then
                if [ $3 ]; then
                        echo "Cloning Template $1 to DomU $2 with $3 MB of memor                                                              y."

                        echo "Copyig Disk Images... This will take a few minutes                                                              ..."
                        cp -R /home/xen/templates/$1 /home/xen/domains/$2

                        echo "Creating Configuration file."
                        sed 's/<domU>/'"$2"'/' /home/xen/templates/$1/$1.cfg > /                                                              home/xen/domains/$2/$2.cfg.tmp
                        sed 's/<domU-mem>/'"$3"'/' /home/xen/domains/$2/$2.cfg.t                                                              mp > /home/xen/domains/$2/$2.cfg
                        echo "Cleaning up temporary files..."
                        rm /home/xen/domains/$2/$2.cfg.tmp
                        rm /home/xen/domains/$2/$1.cfg
                        echo "All Done."
                else
                        syntax
                fi
        else
                syntax
        fi
else
        syntax
fi

./template.cfg

kernel = ‘/boot/vmlinuz-2.6.18-5-xen-vserver-amd64′
ramdisk = ‘/boot/initrd.img-2.6.18-5-xen-vserver-amd64′
memory = ‘<domU-mem>’
root = ‘/dev/sda1 ro’
disk = [ ‘file:/home/xen/domains/<domU>/disk.img,sda1,w’,
‘file:/home/xen/domains/<domU>/swap.img,sda2,w’ ]
name = ‘<domU>’
dhcp = ‘dhcp’
vif = [ ” ]
on_poweroff = ‘destroy’
on_reboot = ‘restart’
on_crash = ‘restart’

So what do I run…

Monday, November 26th, 2007

With that said… (see previous post)

I use Windows XP Pro as my desktop operating system of choice and haven’t seen the reason to make the move to Vista yet, although I will be investigating more in the near future with Windows Server 2008 looming around the corner. I find myself to be more efficient and comfortable, in a windows desktop environment than I do in either GNOME or KDE, although I feel right at home in a GNOME enviornment. Although Mac was probably the first OS I ever used, I grew up using W indows and it feels like home to me. However, I do tend to run unix-like virtual machines on top of my desktop to allow me some flexibility. Also, I run a dual booting, Windows XP/linux configuration on my laptops. Never know when your gonna need what. I like to keep my options open.

I have run a MacOSX laptop in the past but at the present I have not had the luxury.

On the server side of things, I run both Windows and Unix-Like, depending on the situation, client, customer, requirements, etc. On the Windows side I run Windows Server 2003, of course, in its different flavors. On the Unix-Like side my Linux OS of choice for production is Debian, however I am a linux hobbyist and have ran most major Linux flavors including Ubuntu, Slackware, Gentoo, Suse, and Redhat based operating systems at one point or another. My BSD of choice for servers is FreeBSD, but I use OpenBSD for the network infrastructure such as routers and firewalls.

Again, I have closed commenting on this page as to not insite a flame war. This is what I run.

Ideology: Microsoft vs Unix-Like

Monday, November 26th, 2007

I figured I’d start my first blog postings with some of my ideologies. One of the most fundamental ideological rifts is in the operating system of choice among IT veterans. Mainly Microsoft vs Unix-like. I say Unix-Like because of the many “Unix-Like” platforms we have to choose from nowadays, from Linux to the BSD’s to the Mac OSX, each with there own unique characteristics, pros, and cons, but all essentially “unix” minus the trademark.

I use both Microsoft and Unix-like operating systems as do a lot of us, so its hard for me to choose one over the other, maybe impossible. Its almost as if one of my children asked me who my favorite child was. I would lie and say I have no favorite, even if I did. Although one may give me less headache and grief, I can’t function without either. They both have a place in my world.

As I would not like to be host to a flame war, I have closed commenting on this post. This is my ideology, not yours.