5 Easy steps to Xen Virtualization

  1. Make sure you have virtualization-capable hardware (Reference 1) and OS (Reference 2)
  2. Install Xen – (Centos 5.3  – sudo yum install xen, sudo yum install kernel_xen)
  3. Obtain pre-generated virtual machine image (Reference 3), domU ram disk and kernel images (Reference 4). Copy images to /boot.
  4. In Xen configuration directory (/etc/xen by default) copy and edit one of the sample configurations to point to the domU ram disk and kernel images in /boot, and to the virtual disk image (from 3 above).
  5. sudo xm create <config-file> – name of configuration file (from 4 above).  Use sudo xm list to confirm that everything worked, sudo xm console <domain_id> to connect and start to poke around.

You’re done!

References

  1. Hardware Virtualization particularly Intel-VT and AMD-V.
  2. OS Virtualization
  3. Centos 5.3 Virtual Image
  4. Xen domainU Kernel (vmlinuz) and initial ram disk (initrd)

Notes

These instructions have been confirmed using the following components and settings.

  • Dell PowerEdge 805 – 2 x QuadCore AMD Opteron 2354
  • Centos 5.3  x86_64 – MD5 checksums
  • Xen xen.x86_64 3.0.3-80.el5_3.3 (Centos yum install xen includes kernel_xen automatically)
  • centos.5-3.x86-64.20090606.img.tar.bz2 md5 a578dd82ea7d4ce86ec202bbc24fbc48
  • 62634c97165423d0e76a94962382e5fd  md5sum initrd.img, eb15eaf5d938d513d34ca45c5753c099  md5sum vmlinuz
  • Xen domain-0 configuration xend-config and domain-U configuration example1 (rename example1.txt to example1)

Centos 5.3 and Xen Virtualization

Centos 5.3 and Xen Virtualization

See Centos instructions.

  • sudo yum install xen
  • sudo yum install kernel-xen

Then, change to boot Zen kernel

  • sudo vi /boot/grub/grub.conf
  • list all the entries – An entry starts with a ‘title’ element
  • Entries are numbered from 0
  • Change the line ‘default=<x>’ to reflect the entry you want to boot
  • sudo reboot
  • That’s it!

Installing an SSL Certificate on Apache 2

Installing an SSL Certificate on Apache 2

  • First, create a Certificate Signing Request (CSR) and submit to a CA to get a signed Certificate
  • In $APACHE2_HOME/conf/httpd.conf, ensure that the line Include conf/extra/httpd-ssl.conf is not commented out
  • In $APACHE2_HOME/conf/extra/httpd-ssl.conf make the following changes at a minimum:
    • Download the signed certificate (typically .crt) and key file (typically .key) to somewhere in the $APACHE2_HOME/conf structure – e.g. $APACHE2_HOME/conf/ssl
    • Change the line ServerName www.example.com:443 to reflect the real domain name used in the CSR
    • Change the line SSLCertificateFile “/usr/local/apache2/conf/server.crt” to reflect the true location of the signed certificate file
    • Change the line SSLCertificateKeyFile “/usr/local/apache2/conf/server.key” to reflect the true location of the server key file
    • If you were supplied a CA certificate chain, change the lines SSLCertificateChainFile “/usr/local/apache2/conf/server-ca.crt” and possibly  SSLCACertificatePath “/usr/local/apache2/conf/ssl.crt” . At a minimum, you should read the comments in http-ssl.conf for further information.
  • Restart the server – you should now be able to access https:yourdomain.com.

See also CaCert – Open Source Certificates

How to generate a Certificate Signing Request (CSR)

How to generate a Certificate Signing Request (CSR). There are useful references all over. A good one for web servers is Certificate Signing Request

The skinny (for *nix):

  • Make sure you have OpenSSL installed (OpenSSL home and OpenSSL installation instructions)
  • openssl genrsa -des3 -out domainname.key.crypt 1024
  • openssl rsa -in domainname.key.crypt -out domainname.key
  • openssl req -new -key domainname.key -out domainname.csr
  • Submit CSR to a Certificate Authority to get a Signed CSR and CA certificate chain back

See also Installing the Certificate in Apache 2 and CaCert – Open Source Certificates.

Adding a DNS nameserver to OS X Leopard

To add a DNS nameserver to OS X Leopard

Summarized from these excellent articles, Overriding DHCP- or VPN-assigned DNS servers in Mac OS X Leopard, Updating OS X Network Settings to Use a Local DNS Server, and Using a Local DNS Server in Leopard

In OS X (Leopard and later) DNS entries are arranged as a hierarchy – general to specific. You need the most specific applicable entry. Order – general to specific. Output is from scutil list command.

  • State:/Network/Global/DNS
  • Setup:/Network/Service/0/DNS (Fixed Network Adapter)
  • State:/Network/Service/B5DD6BDA-F1B3-40C7-9CEC-03CF97DE7B0A/DNS (Airport Connection)
  • State:/Network/Service/com.cisco.VPN/DNS (CISCO VPN)

So, now for the commands to adjust everything

sudo scutil
list State:/Network/Service/[^/]+/DNS
[Pick the appropriate service]
show State:/Network/Service/com.cisco.VPN/DNS
[
 {
  ServerAddresses :  {
    0 : 10.1.10.211
    1 : 10.1.10.100
  }
}
]
d.init
get State:/Network/Service/com.cisco.VPN/DNS
d.add ServerAddresses 10.1.10.74 10.1.10.211 10.1.10.100
d.show
[
 {
  ServerAddresses :  {
    0 : 10.1.10.74
    1 : 10.1.10.211
    2 : 10.1.10.100
  }
}
]
set State:/Network/Service/com.cisco.VPN/DNS
^D

Remember to flush your local DNS cache after all is said and done:

(Leopard and later) dscacheutil -flushcache

Grails + Autobase

See “Cry for Help on OpenSource projects

Grails 1.1.1 + Autobase 0.8.5 (LiquiBase 1.9.3)

Patch to make Autobase work

In ~/.grails/1.1.1/projects/[project]/plugins/autobase-0.8.5

Edit files

scripts/CreateMigration.groovy, scripts/CreateGroovyMigration.groovy

Comment out line 2

//import liquibase.dsl.properties.LbdslProperties as Props

Below line 7 add

includeTargets << grailsScript(“Compile”)
compile()
def LbdslProperties = Class.forName(“liquibase.dsl.properties.LbdslProperties”, true, this.class.classLoader)
assert LbdslProperties
includeTargets << new File ( “${grailsHome}/scripts/Init.groovy” )
includeTargets << new File ( “${autobasePluginDir}/scripts/_MigrationBase.groovy” )

Experiments in Grails

Assumed – Netbeans > 6.5.1, Groovy 1.6.0, Grails 1.1.1

Installing jsecurity plugin

grails install-plugin jsecurity

Defaults to ~/.grails, not global plugin location, or plugin location inside project directory.

WordPress Themes