Drush 7.x-4.4 RPM for CentOS 5.6

I am updating the RPM for CentOS 5.6 to the latest stable build as of this writing which is Drush 7.x-4.4 .

Drush rpm for CentOS 5.5 (and probably others)

While looking at how to install drush for CentOS 5.5, I was amazed that there were no RPMs available. Luckily, someone did all the hard work and created a script to build the rpm here: http://www.workhabit.com/labs/drush-rpm-form

Using their script: http://www.workhabit.com/sites/default/files/rpm_build-drush.txt, which I am reproducing here:

view plain print about
1#!/usr/bin/perl
2# 20101012-1
3
4# This script packages Drush in binary .rpm form for easy installation. It
5# will automagically set up a proper environment for building RPMs in the
6# invoker's home directory. Note that the proper rpm building package
7# (rpm-build for RHEL or CentOS for example) must be installed. This script
8# also depends on basic utilities being available (tar, wget).
9#
10# Note that the resulting package has no actual dependencies; theoretically,
11# it should probably have dependencies on PHP. We're using non-standard PHP
12# packages and I'd like to make this script public, though. ;)
13#
14# Drush itself ends up in /usr/local/drush; a symlink for 'drush' is created
15# in /usr/bin. As per standard RPM building convention, this script should NOT
16# be run as the root user.
17#
18# Syntax is: rpm_build-drush (URL for drush version to package)
19#
20# Example: rpm_build-drush http://ftp.drupal.org/files/projects/drush-6.x-3.3.tar.gz
21
22### Global Variables
23# Change this to your organization/etc.
24my $packager = "Visible Systems Team";
25
26my $home = "$ENV{HOME}";
27my ($tarball, $version, $outrider);
28my @files;
29
30
31
32
33### Check for arguments
34if(@ARGV[0] eq "")
35{
36 print "Error: You must specify the URL of the drush package to download.\n";
37 exit 1;
38}
39
40
41
42
43### Grab pertinent version info
44# Get our actual package filename
45@ARGV[0] =~ m/(drush.+\.gz)$/;
46$tarball = $1;
47
48# Get our version
49$version = $tarball;
50$version =~ s/^drush-//;
51$version =~ s/\.tar\.gz$//;
52# - is invalid in RPM versioning; replace with _
53$version =~ s/-/_/g;
54
55
56
57
58### Set up our rpm building structure
59print "...Setting up build directories...\n";
60# Some of this is unnecessary given that we're creating a binary-only
61# package through unconventional means, but we might as well set up the
62# whole shebang.
63system("/bin/mkdir -p $home/rpmbuild/{BUILD,RPMS,S{OURCE,PEC,RPM}S}");
64# If .rpmmacros exists, back it up.
65if(-e "$home/.rpmmacros")
66{
67 system("cp $home/.rpmmacros $home/.rpmmacros.old");
68}
69system("echo -e \"\%_topdir\\t\$HOME/rpmbuild\" >
$home/.rpmmacros");
70if((system("mkdir -p /tmp/drush-$version/usr/local") >> 8) != 0)
71{
72 print "Error: Could not create temporary build root\n";
73 exit 2;
74}
75
76
77
78
79### Retrieve drush
80print "...Retrieving and unpacking drush...\n";
81# Retrieve
82if((system("wget -m -nd @ARGV[0] -P /tmp") >> 8) != 0)
83{
84 print "Error: Could not retrieve drush from @ARGV[0]\n";
85 exit 3;
86}
87# Unpackage
88if((system("tar -zxf /tmp/$tarball -C /tmp/drush-$version/usr/local/") >> 8) != 0)
89{
90 print "Error: Could not unpackage $tarball\n";
91 exit 4;
92}
93
94
95
96
97### Retrieve list of files included in the drush package
98@files = `find /tmp/drush-$version/usr/local/drush -type f`;
99
100
101
102
103### Write out our .spec file
104print "...Creating .spec file...\n";
105# Open the .spec file for writing
106open(SPEC, ">$home/rpmbuild/SPECS/drush-$version.spec") || die "Error: Could not open .spec file for writing.";
107print SPEC "Summary: drush\n";
108print SPEC "Name: drush\n";
109print SPEC "Version: $version\n";
110print SPEC "Release: 1\n";
111print SPEC "License: GPL v2\n";
112print SPEC "Vendor: http://drush.ws/about\n";
113print SPEC "Packager: $packager\n";
114print SPEC "Group: Development/Tools\n";
115print SPEC "BuildArch: noarch\n";
116print SPEC "BuildRoot: /tmp/drush-$version\n\n";
117print SPEC '%description' . "\n";
118print SPEC "drush - a command line shell and scripting interface for Drupal.\n\n";
119print SPEC '%prep' . "\n\n";
120print SPEC '%build' . "\n\n";
121print SPEC '%install' . "\n\n";
122print SPEC '%post' . "\n";
123print SPEC 'ln -s /usr/local/drush/drush /usr/bin/drush' . "\n\n";
124print SPEC '%postun' . "\n";
125print SPEC 'rm -f /usr/bin/drush' . "\n\n";
126print SPEC '%clean' . "\n\n";
127print SPEC '%files' . "\n";
128print SPEC '%defattr(-,root,root)' . "\n";
129# Now, drop our files in.
130for $outrider ( @files )
131{
132 $outrider =~ s/\/tmp\/drush-$version//;
133 print SPEC $outrider;
134}
135print SPEC "\n";
136print SPEC '%changelog' . "\n";
137close(SPEC);
138
139
140
141
142### Create our binary rpm.
143print "...Building binary RPM...\n";
144if((system("rpmbuild -bb $home/rpmbuild/SPECS/drush-$version.spec") >> 8) != 0)
145{
146 print "Error: Failed to create binary .rpm\n";
147 exit 5;
148}
149
150
151
152
153### Exit cleanly.
154print "\n\nBuild complete.\n";
155print "Your package should be available at $home/rpmbuild/RPMS/noarch/drush-$version-1.noarch.rpm\n\n";
156exit 0;

You will need perl and rpmbuild if you wish to build the packages:

view plain print about
1yum install perl rpm-build

Once you've got the right tools, you can build the latest ones from http://drupal.org/project/drush

view plain print about
1# perl rpm_build-drush.pl http://ftp.drupal.org/files/projects/drush-6.x-4.0-rc9.tar.gz
2...Setting up build directories...
3...Retrieving and unpacking drush...
4--2011-01-05 13:44:31-- http://ftp.drupal.org/files/projects/drush-6.x-4.0-rc9.tar.gz
5Resolving ftp.drupal.org... 140.211.166.134
6Connecting to ftp.drupal.org|140.211.166.134|:80... connected.
7HTTP request sent, awaiting response... 200 OK
8Length: 240870 (235K) [application/x-gzip]
9Server file no newer than local file `/tmp/drush-6.x-4.0-rc9.tar.gz' -- not retrieving.
10
11...Creating .spec file...
12...Building binary RPM...
13Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.56550
14+ umask 022
15+ cd /root/rpmbuild/BUILD
16+ exit 0
17Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.56550
18+ umask 022
19+ cd /root/rpmbuild/BUILD
20+ exit 0
21Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.56550
22+ umask 022
23+ cd /root/rpmbuild/BUILD
24+ /usr/lib/rpm/brp-compress
25+ /usr/lib/rpm/brp-strip
26+ /usr/lib/rpm/brp-strip-static-archive
27+ /usr/lib/rpm/brp-strip-comment-note
28Processing files: drush-6.x_4.0_rc9-1
29Requires(interp): /bin/sh /bin/sh
30Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
31Requires(post): /bin/sh
32Requires(postun): /bin/sh
33Requires: /usr/bin/env
34Checking for unpackaged file(s): /usr/lib/rpm/check-files /tmp/drush-6.x_4.0_rc9
35Wrote: /root/rpmbuild/RPMS/noarch/drush-6.x_4.0_rc9-1.noarch.rpm
36Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.38487
37+ umask 022
38+ cd /root/rpmbuild/BUILD
39+ exit 0
40
41
42Build complete.
43Your package should be available at /root/rpmbuild/RPMS/noarch/drush-6.x_4.0_rc9-1.noarch.rpm

Now we copy it to the current folder and install it

view plain print about
1cp /root/rpmbuild/RPMS/noarch/drush-6.x_4.0_rc9-1.noarch.rpm .
2yum --nogpgcheck localinstall drush-6.x_4.0_rc9-1.noarch.rpm

I built out the latest as of this writing 4.0 rpm, which is attached:
drush-6.x_4.0_rc9-1.noarch.rpm

XenServer 5.6 - Getting Dell OpenManage Server Administrator working with Dell IT Assistant alerts

First we follow instructions on the Dell Wiki to install the OpenManage repository and install the OpenManage Server Administrator.

view plain print about
1# wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash
2Downloading GPG key: http://linux.dell.com/repo/hardware/latest/RPM-GPG-KEY-dell
3 Importing key into RPM.
4Downloading GPG key: http://linux.dell.com/repo/hardware/latest/RPM-GPG-KEY-libsmbios
5 Importing key into RPM.
6Write repository configuration
7Downloading repository RPM
8Installing repository rpm: http://linux.dell.com/repo/hardware/latest/platform_independent/rh50/prereq/dell-omsa-repository-2-5.noarch.rpm
9Installing yum plugins for system id
10Loaded plugins: fastestmirror
11Determining fastest mirrors
12citrix | 951 B 00:00
13citrix/primary | 243 B 00:00
14dell-omsa-indep | 1.9 kB 00:00
15dell-omsa-indep/primary | 74 kB 00:00
16dell-omsa-indep 525/525
17dell-omsa-specific | 1.9 kB 00:00
18dell-omsa-specific/primary | 74 kB 00:00
19dell-omsa-specific 525/525
20Setting up Install Process
21Resolving Dependencies
22
23================================================================================
24 Package Arch Version Repository Size
25================================================================================
26Installing:
27 yum-dellsysid i386 2.2.19-10.1.el5 dell-omsa-indep 15 k
28Installing for dependencies:
29 libsmbios i386 2.2.19-10.1.el5 dell-omsa-specific 1.5 M
30 python-ctypes i386 1.0.2-1.1.el5 dell-omsa-specific 211 k
31 python-smbios i386 2.2.19-10.1.el5 dell-omsa-specific 69 k
32 smbios-utils-python i386 2.2.19-10.1.el5 dell-omsa-specific 56 k
33
34Transaction Summary
35================================================================================
36Install 5 Package(s)
37Update 0 Package(s)
38Remove 0 Package(s)
39
40Total download size: 1.8 M
41Downloading Packages:
42(1/5): yum-dellsysid-2.2.19-10.1.el5.i386.rpm | 15 kB 00:00
43(2/5): smbios-utils-python-2.2.19-10.1.el5.i386.rpm | 56 kB 00:00
44(3/5): python-smbios-2.2.19-10.1.el5.i386.rpm | 69 kB 00:00
45(4/5): python-ctypes-1.0.2-1.1.el5.i386.rpm | 211 kB 00:00
46(5/5): libsmbios-2.2.19-10.1.el5.i386.rpm | 1.5 MB 00:00
47--------------------------------------------------------------------------------
48Total 1.6 MB/s | 1.8 MB 00:01
49Running rpm_check_debug
50Running Transaction Test
51Finished Transaction Test
52Transaction Test Succeeded
53Running Transaction
54 Installing : libsmbios 1/5
55 Installing : python-ctypes 2/5
56 Installing : python-smbios 3/5
57 Installing : smbios-utils-python 4/5
58 Installing : yum-dellsysid 5/5
59
60Installed:
61 yum-dellsysid.i386 0:2.2.19-10.1.el5
62
63Dependency Installed:
64 libsmbios.i386 0:2.2.19-10.1.el5
65 python-ctypes.i386 0:1.0.2-1.1.el5
66 python-smbios.i386 0:2.2.19-10.1.el5
67 smbios-utils-python.i386 0:2.2.19-10.1.el5
68
69Complete!
70Loaded plugins: dellsysid, fastestmirror
71No plugin match for: rhnplugin
72Cleaning up Everything
73Cleaning up list of fastest mirrors
74Done!

Optionally we install OpenManage Server Administrator. In order to install it, we need some packages not currently installed. Because of that, we will need to temporarily enable the CentOS base repository.

view plain print about
1# yum --enablerepo base install srvadmin-all
2Loaded plugins: dellsysid, fastestmirror
3Loading mirror speeds from cached hostfile
4 * base: ftp.lug.udel.edu
5Excluding Packages from CentOS-5 - Base
6Finished
7Setting up Install Process
8Resolving Dependencies
9-->
Running transaction check
10---> Package srvadmin-all.i386 0:6.2.0-1.5.el5 set to be updated
11--> Processing Dependency: srvadmin-webserver = 6.2.0 for package: srvadmin-all
12--> Processing Dependency: srvadmin-storageservices = 6.2.0 for package: srvadmin-all
13--> Processing Dependency: srvadmin-base = 6.2.0 for package: srvadmin-all
14--> Processing Dependency: srvadmin-idrac = 6.2.0 for package: srvadmin-all
15--> Processing Dependency: srvadmin-rac4 = 6.2.0 for package: srvadmin-all
16--> Processing Dependency: srvadmin-standardAgent = 6.2.0 for package: srvadmin-all
17--> Processing Dependency: srvadmin-rac5 = 6.2.0 for package: srvadmin-all
18--> Running transaction check
19---> Package srvadmin-base.i386 0:6.2.0-1.5.el5 set to be updated
20--> Processing Dependency: srvadmin-cm = 6.2.0 for package: srvadmin-base
21--> Processing Dependency: srvadmin-omacore = 6.2.0 for package: srvadmin-base
22--> Processing Dependency: srvadmin-smcommon = 6.2.0 for package: srvadmin-base
23---> Package srvadmin-idrac.i386 0:6.2.0-1.5.el5 set to be updated
24--> Processing Dependency: srvadmin-idracdrsc = 6.2.0 for package: srvadmin-idrac
25--> Processing Dependency: srvadmin-idracadm = 6.2.0 for package: srvadmin-idrac
26---> Package srvadmin-rac4.i386 0:6.2.0-1.5.el5 set to be updated
27--> Processing Dependency: srvadmin-racdrsc4 = 6.2.0 for package: srvadmin-rac4
28--> Processing Dependency: srvadmin-racadm4 = 6.2.0 for package: srvadmin-rac4
29--> Processing Dependency: srvadmin-racsvc = 6.2.0 for package: srvadmin-rac4
30---> Package srvadmin-rac5.i386 0:6.2.0-1.5.el5 set to be updated
31--> Processing Dependency: srvadmin-racdrsc5 = 6.2.0 for package: srvadmin-rac5
32--> Processing Dependency: srvadmin-racadm5 = 6.2.0 for package: srvadmin-rac5
33---> Package srvadmin-standardAgent.i386 0:6.2.0-1.5.el5 set to be updated
34--> Processing Dependency: srvadmin-itunnelprovider = 6.2.0 for package: srvadmin-standardAgent
35---> Package srvadmin-storageservices.i386 0:6.2.0-10.1.2.el5 set to be updated
36--> Processing Dependency: srvadmin-storelib = 6.2.0 for package: srvadmin-storageservices
37--> Processing Dependency: srvadmin-storage-populator = 6.2.0 for package: srvadmin-storageservices
38--> Processing Dependency: srvadmin-storage = 6.2.0 for package: srvadmin-storageservices
39--> Processing Dependency: srvadmin-sysfsutils = 6.2.0 for package: srvadmin-storageservices
40--> Processing Dependency: srvadmin-fsa = 6.2.0 for package: srvadmin-storageservices
41--> Processing Dependency: srvadmin-megalib = 6.2.0 for package: srvadmin-storageservices
42--> Processing Dependency: srvadmin-storelib-sysfs for package: srvadmin-storageservices
43--> Processing Dependency: srvadmin-storelib-libpci for package: srvadmin-storageservices
44---> Package srvadmin-webserver.i386 0:6.2.0-1.5.el5 set to be updated
45--> Processing Dependency: srvadmin-iws = 6.2.0 for package: srvadmin-webserver
46--> Processing Dependency: srvadmin-smweb = 6.2.0 for package: srvadmin-webserver
47--> Running transaction check
48---> Package srvadmin-cm.i386 0:6.2.0-677 set to be updated
49---> Package srvadmin-fsa.i386 0:6.2.0-1.6.el3 set to be updated
50---> Package srvadmin-idracadm.i386 0:6.2.0-677 set to be updated
51--> Processing Dependency: srvadmin-hapi = 6.2.0 for package: srvadmin-idracadm
52--> Processing Dependency: srvadmin-omilcore for package: srvadmin-idracadm
53--> Processing Dependency: srvadmin-omilcore for package: srvadmin-idracadm
54---> Package srvadmin-idracdrsc.i386 0:6.2.0-677 set to be updated
55--> Processing Dependency: srvadmin-idrac-components = 6.2.0 for package: srvadmin-idracdrsc
56--> Processing Dependency: libomacs32.so.1 for package: srvadmin-idracdrsc
57--> Processing Dependency: libdcsgen32.so.5 for package: srvadmin-idracdrsc
58--> Processing Dependency: libdcsdrs32.so for package: srvadmin-idracdrsc
59--> Processing Dependency: srvadmin-idrac-components for package: srvadmin-idracdrsc
60---> Package srvadmin-itunnelprovider.i386 0:6.2.0-1.6.el5 set to be updated
61--> Processing Dependency: openwsman-client >= 2.1.5 for package: srvadmin-itunnelprovider
62--> Processing Dependency: openwsman-server >= 2.1.5 for package: srvadmin-itunnelprovider
63--> Processing Dependency: libwsman1 >= 2.1.5 for package: srvadmin-itunnelprovider
64--> Processing Dependency: sblim-sfcb >= 1.3.2 for package: srvadmin-itunnelprovider
65--> Processing Dependency: libcmpiCppImpl0 >= 2.0.0 for package: srvadmin-itunnelprovider
66--> Processing Dependency: sblim-sfcc >= 2.1.0 for package: srvadmin-itunnelprovider
67--> Processing Dependency: libcmpiCppImpl.so.0 for package: srvadmin-itunnelprovider
68---> Package srvadmin-iws.i386 0:6.2.0-1.18.el5 set to be updated
69--> Processing Dependency: srvadmin-jre for package: srvadmin-iws
70---> Package srvadmin-megalib.i386 0:6.2.0-1.6.el3 set to be updated
71---> Package srvadmin-omacore.i386 0:6.2.0-1.18.el5 set to be updated
72--> Processing Dependency: libxmlsup.so.2 for package: srvadmin-omacore
73--> Processing Dependency: libdcship.so.5 for package: srvadmin-omacore
74---> Package srvadmin-racadm4.i386 0:6.2.0-677 set to be updated
75---> Package srvadmin-racadm5.i386 0:6.2.0-677 set to be updated
76---> Package srvadmin-racdrsc4.i386 0:6.2.0-677 set to be updated
77--> Processing Dependency: srvadmin-rac4-components = 6.2.0 for package: srvadmin-racdrsc4
78--> Processing Dependency: srvadmin-rac4-components for package: srvadmin-racdrsc4
79---> Package srvadmin-racdrsc5.i386 0:6.2.0-677 set to be updated
80--> Processing Dependency: srvadmin-rac5-components = 6.2.0 for package: srvadmin-racdrsc5
81--> Processing Dependency: srvadmin-rac5-components for package: srvadmin-racdrsc5
82---> Package srvadmin-racsvc.i386 0:6.2.0-677 set to be updated
83---> Package srvadmin-smcommon.i386 0:6.2.0-1.29.el5 set to be updated
84---> Package srvadmin-smweb.i386 0:6.2.0-1.29.el5 set to be updated
85---> Package srvadmin-storage.i386 0:6.2.0-1.29.el5 set to be updated
86---> Package srvadmin-storage-populator.i386 0:6.2.0-1.25.el3 set to be updated
87---> Package srvadmin-storelib.i386 0:6.2.0-1.11.el3 set to be updated
88---> Package srvadmin-storelib-libpci.i386 0:6.2.0-1.1.el5 set to be updated
89---> Package srvadmin-storelib-sysfs.i386 0:6.2.0-1.1.el5 set to be updated
90---> Package srvadmin-sysfsutils.i386 0:6.2.0-2.1.el5 set to be updated
91--> Running transaction check
92---> Package libcmpiCppImpl0.i386 0:2.0.0Dell-1.1.el5 set to be updated
93---> Package libwsman1.i386 0:2.1.5Dell-2.1.el5 set to be updated
94---> Package openwsman-client.i386 0:2.1.5Dell-2.1.el5 set to be updated
95---> Package openwsman-server.i386 0:2.1.5Dell-2.1.el5 set to be updated
96---> Package sblim-sfcb.i386 0:1.3.5-40.el5 set to be updated
97--> Processing Dependency: perl(LWP::UserAgent) for package: sblim-sfcb
98---> Package sblim-sfcc.i386 0:2.2.1-40.el5 set to be updated
99---> Package srvadmin-deng.i386 0:6.2.0-1.6.el5 set to be updated
100---> Package srvadmin-hapi.i386 0:6.2.0-1.17.el5 set to be updated
101---> Package srvadmin-idrac-components.i386 0:6.2.0-677 set to be updated
102---> Package srvadmin-isvc.i386 0:6.2.0-1.16.el5 set to be updated
103---> Package srvadmin-jre.i386 0:6.2.0-1.17.el5 set to be updated
104---> Package srvadmin-omcommon.i386 0:6.2.0-1.19.el5 set to be updated
105---> Package srvadmin-omilcore.noarch 0:6.2.0-1.9.el5 set to be updated
106--> Processing Dependency: smbios-utils-bin for package: srvadmin-omilcore
107---> Package srvadmin-rac4-components.i386 0:6.2.0-677 set to be updated
108---> Package srvadmin-rac5-components.i386 0:6.2.0-677 set to be updated
109---> Package srvadmin-xmlsup.i386 0:6.2.0-1.17.el5 set to be updated
110--> Processing Dependency: libxslt.so.1 for package: srvadmin-xmlsup
111--> Running transaction check
112---> Package libxslt.i386 0:1.1.17-2.el5_2.2 set to be updated
113---> Package perl-libwww-perl.noarch 0:5.805-1.1.1 set to be updated
114--> Processing Dependency: perl-HTML-Parser >= 3.33 for package: perl-libwww-perl
115--> Processing Dependency: perl(URI::URL) for package: perl-libwww-perl
116--> Processing Dependency: perl(URI) for package: perl-libwww-perl
117--> Processing Dependency: perl(HTML::Entities) for package: perl-libwww-perl
118--> Processing Dependency: perl(Compress::Zlib) for package: perl-libwww-perl
119--> Processing Dependency: perl(URI::Heuristic) for package: perl-libwww-perl
120--> Processing Dependency: perl(URI::Escape) for package: perl-libwww-perl
121---> Package smbios-utils-bin.i386 0:2.2.19-10.1.el5 set to be updated
122--> Running transaction check
123---> Package perl-Compress-Zlib.i386 0:1.42-1.fc6 set to be updated
124---> Package perl-HTML-Parser.i386 0:3.55-1.fc6 set to be updated
125--> Processing Dependency: perl-HTML-Tagset >= 3.03 for package: perl-HTML-Parser
126--> Processing Dependency: perl(HTML::Tagset) for package: perl-HTML-Parser
127---> Package perl-URI.noarch 0:1.35-3 set to be updated
128--> Running transaction check
129---> Package perl-HTML-Tagset.noarch 0:3.10-2.1.1 set to be updated
130--> Finished Dependency Resolution
131
132Dependencies Resolved
133
134===============================================================================================================================================================================================================
135 Package Arch Version Repository Size
136===============================================================================================================================================================================================================
137Installing:
138 srvadmin-all i386 6.2.0-1.5.el5 dell-omsa-indep 2.5 k
139Installing for dependencies:
140 libcmpiCppImpl0 i386 2.0.0Dell-1.1.el5 dell-omsa-indep 93 k
141 libwsman1 i386 2.1.5Dell-2.1.el5 dell-omsa-indep 211 k
142 libxslt i386 1.1.17-2.el5_2.2 base 485 k
143 openwsman-client i386 2.1.5Dell-2.1.el5 dell-omsa-indep 115 k
144 openwsman-server i386 2.1.5Dell-2.1.el5 dell-omsa-indep 146 k
145 perl-Compress-Zlib i386 1.42-1.fc6 base 52 k
146 perl-HTML-Parser i386 3.55-1.fc6 base 92 k
147 perl-HTML-Tagset noarch 3.10-2.1.1 base 15 k
148 perl-URI noarch 1.35-3 base 116 k
149 perl-libwww-perl noarch 5.805-1.1.1 base 376 k
150 sblim-sfcb i386 1.3.5-40.el5 base 1.3 M
151 sblim-sfcc i386 2.2.1-40.el5 base 101 k
152 smbios-utils-bin i386 2.2.19-10.1.el5 dell-omsa-indep 105 k
153 srvadmin-base i386 6.2.0-1.5.el5 dell-omsa-indep 2.4 k
154 srvadmin-cm i386 6.2.0-677 dell-omsa-indep 17 M
155 srvadmin-deng i386 6.2.0-1.6.el5 dell-omsa-indep 714 k
156 srvadmin-fsa i386 6.2.0-1.6.el3 dell-omsa-indep 2.6 k
157 srvadmin-hapi i386 6.2.0-1.17.el5 dell-omsa-indep 817 k
158 srvadmin-idrac i386 6.2.0-1.5.el5 dell-omsa-indep 2.4 k
159 srvadmin-idrac-components i386 6.2.0-677 dell-omsa-indep 62 k
160 srvadmin-idracadm i386 6.2.0-677 dell-omsa-indep 2.6 M
161 srvadmin-idracdrsc i386 6.2.0-677 dell-omsa-indep 17 k
162 srvadmin-isvc i386 6.2.0-1.16.el5 dell-omsa-indep 6.2 M
163 srvadmin-itunnelprovider i386 6.2.0-1.6.el5 dell-omsa-indep 2.0 M
164 srvadmin-iws i386 6.2.0-1.18.el5 dell-omsa-indep 4.9 M
165 srvadmin-jre i386 6.2.0-1.17.el5 dell-omsa-indep 40 M
166 srvadmin-megalib i386 6.2.0-1.6.el3 dell-omsa-indep 528 k
167 srvadmin-omacore i386 6.2.0-1.18.el5 dell-omsa-indep 1.7 M
168 srvadmin-omcommon i386 6.2.0-1.19.el5 dell-omsa-indep 4.1 M
169 srvadmin-omilcore noarch 6.2.0-1.9.el5 dell-omsa-indep 28 k
170 srvadmin-rac4 i386 6.2.0-1.5.el5 dell-omsa-indep 2.4 k
171 srvadmin-rac4-components i386 6.2.0-677 dell-omsa-indep 52 k
172 srvadmin-rac5 i386 6.2.0-1.5.el5 dell-omsa-indep 2.4 k
173 srvadmin-rac5-components i386 6.2.0-677 dell-omsa-indep 61 k
174 srvadmin-racadm4 i386 6.2.0-677 dell-omsa-indep 190 k
175 srvadmin-racadm5 i386 6.2.0-677 dell-omsa-indep 1.3 M
176 srvadmin-racdrsc4 i386 6.2.0-677 dell-omsa-indep 16 k
177 srvadmin-racdrsc5 i386 6.2.0-677 dell-omsa-indep 17 k
178 srvadmin-racsvc i386 6.2.0-677 dell-omsa-indep 66 k
179 srvadmin-smcommon i386 6.2.0-1.29.el5 dell-omsa-indep 592 k
180 srvadmin-smweb i386 6.2.0-1.29.el5 dell-omsa-indep 12 M
181 srvadmin-standardAgent i386 6.2.0-1.5.el5 dell-omsa-indep 2.4 k
182 srvadmin-storage i386 6.2.0-1.29.el5 dell-omsa-indep 778 k
183 srvadmin-storage-populator i386 6.2.0-1.25.el3 dell-omsa-indep 1.2 M
184 srvadmin-storageservices i386 6.2.0-10.1.2.el5 dell-omsa-indep 2.6 k
185 srvadmin-storelib i386 6.2.0-1.11.el3 dell-omsa-indep 277 k
186 srvadmin-storelib-libpci i386 6.2.0-1.1.el5 dell-omsa-indep 41 k
187 srvadmin-storelib-sysfs i386 6.2.0-1.1.el5 dell-omsa-indep 41 k
188 srvadmin-sysfsutils i386 6.2.0-2.1.el5 dell-omsa-indep 47 k
189 srvadmin-webserver i386 6.2.0-1.5.el5 dell-omsa-indep 2.4 k
190 srvadmin-xmlsup i386 6.2.0-1.17.el5 dell-omsa-indep 49 k
191
192Transaction Summary
193===============================================================================================================================================================================================================
194Install 52 Package(s)
195Update 0 Package(s)
196Remove 0 Package(s)
197
198Total download size: 101 M
199Is this ok [y/N]:y
200Downloading Packages:
201(1/52): srvadmin-base-6.2.0-1.5.el5.i386.rpm | 2.4 kB 00:00
202(2/52): srvadmin-idrac-6.2.0-1.5.el5.i386.rpm | 2.4 kB 00:00
203(3/52): srvadmin-rac5-6.2.0-1.5.el5.i386.rpm | 2.4 kB 00:00
204(4/52): srvadmin-standardAgent-6.2.0-1.5.el5.i386.rpm | 2.4 kB 00:00
205(5/52): srvadmin-rac4-6.2.0-1.5.el5.i386.rpm | 2.4 kB 00:00
206(6/52): srvadmin-webserver-6.2.0-1.5.el5.i386.rpm | 2.4 kB 00:00
207(7/52): srvadmin-all-6.2.0-1.5.el5.i386.rpm | 2.5 kB 00:00
208(8/52): srvadmin-fsa-6.2.0-1.6.el3.i386.rpm | 2.6 kB 00:00
209(9/52): srvadmin-storageservices-6.2.0-10.1.2.el5.i386.rpm | 2.6 kB 00:00
210(10/52): perl-HTML-Tagset-3.10-2.1.1.noarch.rpm | 15 kB 00:00
211(11/52): srvadmin-racdrsc4-6.2.0-677.i386.rpm | 16 kB 00:00
212(12/52): srvadmin-racdrsc5-6.2.0-677.i386.rpm | 17 kB 00:00
213(13/52): srvadmin-idracdrsc-6.2.0-677.i386.rpm | 17 kB 00:00
214(14/52): srvadmin-omilcore-6.2.0-1.9.el5.noarch.rpm | 28 kB 00:00
215(15/52): srvadmin-storelib-libpci-6.2.0-1.1.el5.i386.rpm | 41 kB 00:00
216(16/52): srvadmin-storelib-sysfs-6.2.0-1.1.el5.i386.rpm | 41 kB 00:00
217(17/52): srvadmin-sysfsutils-6.2.0-2.1.el5.i386.rpm | 47 kB 00:00
218(18/52): srvadmin-xmlsup-6.2.0-1.17.el5.i386.rpm | 49 kB 00:00
219(19/52): srvadmin-rac4-components-6.2.0-677.i386.rpm | 52 kB 00:00
220(20/52): perl-Compress-Zlib-1.42-1.fc6.i386.rpm | 52 kB 00:00
221(21/52): srvadmin-rac5-components-6.2.0-677.i386.rpm | 61 kB 00:00
222(22/52): srvadmin-idrac-components-6.2.0-677.i386.rpm | 62 kB 00:00
223(23/52): srvadmin-racsvc-6.2.0-677.i386.rpm | 66 kB 00:00
224(24/52): perl-HTML-Parser-3.55-1.fc6.i386.rpm | 92 kB 00:00
225(25/52): libcmpiCppImpl0-2.0.0Dell-1.1.el5.i386.rpm | 93 kB 00:00
226(26/52): sblim-sfcc-2.2.1-40.el5.i386.rpm | 101 kB 00:00
227(27/52): smbios-utils-bin-2.2.19-10.1.el5.i386.rpm | 105 kB 00:00
228(28/52): openwsman-client-2.1.5Dell-2.1.el5.i386.rpm | 115 kB 00:00
229(29/52): perl-URI-1.35-3.noarch.rpm | 116 kB 00:00
230(30/52): openwsman-server-2.1.5Dell-2.1.el5.i386.rpm | 146 kB 00:00
231(31/52): srvadmin-racadm4-6.2.0-677.i386.rpm | 190 kB 00:00
232(32/52): libwsman1-2.1.5Dell-2.1.el5.i386.rpm | 211 kB 00:00
233(33/52): srvadmin-storelib-6.2.0-1.11.el3.i386.rpm | 277 kB 00:00
234(34/52): perl-libwww-perl-5.805-1.1.1.noarch.rpm | 376 kB 00:00
235(35/52): libxslt-1.1.17-2.el5_2.2.i386.rpm | 485 kB 00:00
236(36/52): srvadmin-megalib-6.2.0-1.6.el3.i386.rpm | 528 kB 00:00
237(37/52): srvadmin-smcommon-6.2.0-1.29.el5.i386.rpm | 592 kB 00:00
238(38/52): srvadmin-deng-6.2.0-1.6.el5.i386.rpm | 714 kB 00:00
239(39/52): srvadmin-storage-6.2.0-1.29.el5.i386.rpm | 778 kB 00:00
240(40/52): srvadmin-hapi-6.2.0-1.17.el5.i386.rpm | 817 kB 00:00
241(41/52): srvadmin-storage-populator-6.2.0-1.25.el3.i386.rpm | 1.2 MB 00:00
242(42/52): srvadmin-racadm5-6.2.0-677.i386.rpm | 1.3 MB 00:00
243(43/52): sblim-sfcb-1.3.5-40.el5.i386.rpm | 1.3 MB 00:00
244(44/52): srvadmin-omacore-6.2.0-1.18.el5.i386.rpm | 1.7 MB 00:00
245(45/52): srvadmin-itunnelprovider-6.2.0-1.6.el5.i386.rpm | 2.0 MB 00:00
246(46/52): srvadmin-idracadm-6.2.0-677.i386.rpm | 2.6 MB 00:00
247(47/52): srvadmin-omcommon-6.2.0-1.19.el5.i386.rpm | 4.1 MB 00:01
248(48/52): srvadmin-iws-6.2.0-1.18.el5.i386.rpm | 4.9 MB 00:02
249(49/52): srvadmin-isvc-6.2.0-1.16.el5.i386.rpm | 6.2 MB 00:02
250(50/52): srvadmin-smweb-6.2.0-1.29.el5.i386.rpm | 12 MB 00:04
251(51/52): srvadmin-cm-6.2.0-677.i386.rpm | 17 MB 00:05
252(52/52): srvadmin-jre-6.2.0-1.17.el5.i386.rpm | 40 MB 00:37
253---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
254Total 1.6 MB/s | 101 MB 01:03
255warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897
256base/gpgkey | 1.5 kB 00:00
257Importing GPG key 0xE8562897 "CentOS-5 Key (CentOS 5 Official Signing Key) <centos-5-key@centos.org>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
258Is this ok [y/N]: y
259Running rpm_check_debug
260Running Transaction Test
261Finished Transaction Test
262Transaction Test Succeeded
263Running Transaction
264 Installing : srvadmin-hapi 1/52
265 Installing : libwsman1 2/52
266 Installing : openwsman-client 3/52
267 Installing : sblim-sfcc 4/52
268 Installing : srvadmin-sysfsutils 5/52
269 Installing : srvadmin-megalib 6/52
270 Installing : srvadmin-storelib 7/52
271 Installing : openwsman-server 8/52
272 Installing : srvadmin-storelib-libpci 9/52
273 Installing : libxslt 10/52
274 Installing : srvadmin-xmlsup 11/52
275 Installing : libcmpiCppImpl0 12/52
276 Installing : smbios-utils-bin 13/52
277 Installing : srvadmin-storelib-sysfs 14/52
278 Installing : perl-Compress-Zlib 15/52
279 Installing : srvadmin-omilcore 16/52
280 **********************************************************
281 After the install process completes, you may need
282 to log out and then log in again to reset the PATH
283 variable to access the Dell OpenManage CLI utilities
284
285 To start all installed services without a reboot,
286 enter the following command: srvadmin-services.sh start
287 **********************************************************
288 Installing : srvadmin-smcommon 17/52
289 Installing : srvadmin-racadm4 18/52
290 Installing : srvadmin-racsvc 19/52
291 Installing : srvadmin-racadm5 20/52
292 Installing : srvadmin-jre 21/52
293 Installing : srvadmin-idracadm 22/52
294 Installing : srvadmin-fsa 23/52
295 Installing : perl-HTML-Tagset 24/52
296 Installing : perl-URI 25/52
297 Installing : srvadmin-deng 26/52
298 Installing : srvadmin-omcommon 27/52
299 Installing : srvadmin-isvc 28/52
300 Installing : srvadmin-omacore 29/52
301 Installing : srvadmin-storage 30/52
302 Installing : srvadmin-storage-populator 31/52
303 Installing : srvadmin-iws 32/52
304 Installing : perl-HTML-Parser 33/52
305 Installing : srvadmin-idrac-components 34/52
306 Installing : srvadmin-cm 35/52
307 Installing : srvadmin-storageservices 36/52
308 Installing : srvadmin-base 37/52
309 Installing : srvadmin-idracdrsc 38/52
310 Installing : srvadmin-idrac 39/52
311 Installing : srvadmin-rac4-components 40/52
312 Installing : srvadmin-racdrsc4 41/52
313 Installing : srvadmin-rac4 42/52
314 Installing : srvadmin-rac5-components 43/52
315 Installing : srvadmin-racdrsc5 44/52
316 Installing : srvadmin-rac5 45/52
317 Installing : perl-libwww-perl 46/52
318 Installing : srvadmin-smweb 47/52
319 Installing : sblim-sfcb 48/52
320 Installing : srvadmin-webserver 49/52
321 Installing : srvadmin-itunnelprovider 50/52
322 Installing : srvadmin-standardAgent 51/52
323 Installing : srvadmin-all 52/52
324
325Installed:
326 srvadmin-all.i386 0:6.2.0-1.5.el5
327
328Dependency Installed:
329 libcmpiCppImpl0.i386 0:2.0.0Dell-1.1.el5 libwsman1.i386 0:2.1.5Dell-2.1.el5 libxslt.i386 0:1.1.17-2.el5_2.2 openwsman-client.i386 0:2.1.5Dell-2.1.el5
330 openwsman-server.i386 0:2.1.5Dell-2.1.el5 perl-Compress-Zlib.i386 0:1.42-1.fc6 perl-HTML-Parser.i386 0:3.55-1.fc6 perl-HTML-Tagset.noarch 0:3.10-2.1.1
331 perl-URI.noarch 0:1.35-3 perl-libwww-perl.noarch 0:5.805-1.1.1 sblim-sfcb.i386 0:1.3.5-40.el5 sblim-sfcc.i386 0:2.2.1-40.el5
332 smbios-utils-bin.i386 0:2.2.19-10.1.el5 srvadmin-base.i386 0:6.2.0-1.5.el5 srvadmin-cm.i386 0:6.2.0-677 srvadmin-deng.i386 0:6.2.0-1.6.el5
333 srvadmin-fsa.i386 0:6.2.0-1.6.el3 srvadmin-hapi.i386 0:6.2.0-1.17.el5 srvadmin-idrac.i386 0:6.2.0-1.5.el5 srvadmin-idrac-components.i386 0:6.2.0-677
334 srvadmin-idracadm.i386 0:6.2.0-677 srvadmin-idracdrsc.i386 0:6.2.0-677 srvadmin-isvc.i386 0:6.2.0-1.16.el5 srvadmin-itunnelprovider.i386 0:6.2.0-1.6.el5
335 srvadmin-iws.i386 0:6.2.0-1.18.el5 srvadmin-jre.i386 0:6.2.0-1.17.el5 srvadmin-megalib.i386 0:6.2.0-1.6.el3 srvadmin-omacore.i386 0:6.2.0-1.18.el5
336 srvadmin-omcommon.i386 0:6.2.0-1.19.el5 srvadmin-omilcore.noarch 0:6.2.0-1.9.el5 srvadmin-rac4.i386 0:6.2.0-1.5.el5 srvadmin-rac4-components.i386 0:6.2.0-677
337 srvadmin-rac5.i386 0:6.2.0-1.5.el5 srvadmin-rac5-components.i386 0:6.2.0-677 srvadmin-racadm4.i386 0:6.2.0-677 srvadmin-racadm5.i386 0:6.2.0-677
338 srvadmin-racdrsc4.i386 0:6.2.0-677 srvadmin-racdrsc5.i386 0:6.2.0-677 srvadmin-racsvc.i386 0:6.2.0-677 srvadmin-smcommon.i386 0:6.2.0-1.29.el5
339 srvadmin-smweb.i386 0:6.2.0-1.29.el5 srvadmin-standardAgent.i386 0:6.2.0-1.5.el5 srvadmin-storage.i386 0:6.2.0-1.29.el5 srvadmin-storage-populator.i386 0:6.2.0-1.25.el3
340 srvadmin-storageservices.i386 0:6.2.0-10.1.2.el5 srvadmin-storelib.i386 0:6.2.0-1.11.el3 srvadmin-storelib-libpci.i386 0:6.2.0-1.1.el5 srvadmin-storelib-sysfs.i386 0:6.2.0-1.1.el5
341 srvadmin-sysfsutils.i386 0:6.2.0-2.1.el5 srvadmin-webserver.i386 0:6.2.0-1.5.el5 srvadmin-xmlsup.i386 0:6.2.0-1.17.el5
342
343Complete!

Now we start up the server administrator:

view plain print about
1# /opt/dell/srvadmin/sbin/srvadmin-services.sh start
2Starting Systems Management Device Drivers:
3Starting dell_rbu: [ OK ]
4Starting ipmi driver: [ OK ]
5Starting Systems Management Device Drivers:
6Starting dell_rbu: Already started [ OK ]
7Starting ipmi driver: [ OK ]
8Starting Systems Management Data Engine:
9Starting dsm_sa_datamgrd: [ OK ]
10Starting dsm_sa_eventmgrd: [ OK ]
11Starting dsm_sa_snmpd: [ OK ]
12Starting DSM SA Shared Services: [ OK ]
13
14which: no lockfile in (/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin)
15Starting DSM SA Connection Service: invcol Error: Cannot find utilities on the system to execute Inventory Collector.
16Make sure the following utilities are in the path: tar gzip tail rm mkdir chmod ls basename wc lockfile stat
17 [ OK ]

As you can see, we're missing lockfile. Lets install it. First lets find out what package provides it.

view plain print about
1# yum --enablerepo base whatprovides "*/lockfile"
2Loaded plugins: dellsysid, fastestmirror
3Loading mirror speeds from cached hostfile
4 * base: hpc.arc.georgetown.edu
5Excluding Packages from CentOS-5 - Base
6Finished
7base/filelists_db | 3.4 MB 00:00
8citrix/filelists | 236 B 00:00
9dell-omsa-indep/filelists | 124 kB 00:00
10dell-omsa-specific/filelists | 1.2 kB 00:00
11procmail-3.22-17.1.el5.centos.i386 : The procmail mail processing program.
12Repo : base
13Matched from:
14Filename : /usr/bin/lockfile

It's in the package procmail. Lets install it.

view plain print about
1# yum --enablerepo base install procmail
2Loaded plugins: dellsysid, fastestmirror
3Loading mirror speeds from cached hostfile
4 * base: hpc.arc.georgetown.edu
5Excluding Packages from CentOS-5 - Base
6Finished
7Setting up Install Process
8Resolving Dependencies
9-->
Running transaction check
10---> Package procmail.i386 0:3.22-17.1.el5.centos set to be updated
11--> Finished Dependency Resolution
12
13Dependencies Resolved
14
15===============================================================================================================================================================================================================
16 Package Arch Version Repository Size
17===============================================================================================================================================================================================================
18Installing:
19 procmail i386 3.22-17.1.el5.centos base 166 k
20
21Transaction Summary
22===============================================================================================================================================================================================================
23Install 1 Package(s)
24Update 0 Package(s)
25Remove 0 Package(s)
26
27Total download size: 166 k
28Is this ok [y/N]: y
29Downloading Packages:
30procmail-3.22-17.1.el5.centos.i386.rpm | 166 kB 00:00
31Running rpm_check_debug
32Running Transaction Test
33Finished Transaction Test
34Transaction Test Succeeded
35Running Transaction
36 Installing : procmail 1/1
37
38Installed:
39 procmail.i386 0:3.22-17.1.el5.centos
40
41Complete!

Now lets start the services again:

view plain print about
1# /opt/dell/srvadmin/sbin/srvadmin-services.sh start
2Stopping Systems Management Data Engine:
3Stopping dsm_sa_snmpd: [ OK ]
4Stopping dsm_sa_eventmgrd: [ OK ]
5Stopping dsm_sa_datamgrd: [ OK ]
6Starting Systems Management Device Drivers:
7Starting dell_rbu: Already started [ OK ]
8Starting ipmi driver: [ OK ]
9Starting Systems Management Device Drivers:
10Starting dell_rbu: Already started [ OK ]
11Starting ipmi driver: [ OK ]
12Starting Systems Management Data Engine:
13Starting dsm_sa_datamgrd: [ OK ]
14Starting dsm_sa_eventmgrd: [ OK ]
15Starting dsm_sa_snmpd: [ OK ]
16Stopping Systems Management Data Engine:
17Stopping dsm_sa_snmpd: [ OK ]
18Stopping dsm_sa_eventmgrd: [ OK ]
19Stopping dsm_sa_datamgrd: [ OK ]
20Starting Systems Management Device Drivers:
21Starting dell_rbu: Already started [ OK ]
22Starting ipmi driver: [ OK ]
23Starting Systems Management Device Drivers:
24Starting dell_rbu: Already started [ OK ]
25Starting ipmi driver: [ OK ]
26Starting Systems Management Data Engine:
27Starting dsm_sa_datamgrd: [ OK ]
28Starting dsm_sa_eventmgrd: [ OK ]
29Starting dsm_sa_snmpd: [ OK ]
30Starting Systems Management Data Engine:
31Starting dsm_sa_datamgrd: Already started [ OK ]
32Starting dsm_sa_eventmgrd: Already started [ OK ]
33Starting dsm_sa_snmpd: Already started [ OK ]
34DSM SA Shared Services is already started
35DSM SA Connection Service is already started

Now we follow the Dell IT Assistant User's Guide to set up the SNMP alerts. For this guide, I will assume that you already have a working Dell ITA installation. Following the instructions on page 252 of the PDF:

view plain print about
1# vi /etc/snmp/snmpd.conf

You should see the following file:

view plain print about
1###############################################################################
2# Access Control
3###############################################################################
4
5# As shipped, the snmpd demon will only respond to queries on the
6# system mib group until this file is replaced or modified for
7# security purposes.
8
9####
10# First, map the community name "public" into a "security name"
11
12# sec.name source community
13com2sec notConfigUser default public
14
15####
16# Second, map the security name into a group name:
17
18# groupName securityModel securityName
19group notConfigGroup v1 notConfigUser
20group notConfigGroup v2c notConfigUser
21
22####
23# Third, create a view for us to let the group have rights to:
24
25# name incl/excl subtree mask(optional)
26view systemview included system
27view systemview included interfaces
28view systemview included at
29view systemview included ip
30view systemview included icmp
31view systemview included tcp
32view systemview included udp
33view systemview included snmp
34
35####
36# XenServer control domain does not support IPv6.
37#
38view systemview excluded ipv6InterfaceTableLastChange
39view systemview excluded icmpStatsInErrors.ipv6
40view systemview excluded icmpStatsInMsgs.ipv6
41view systemview excluded icmpStatsOutErrors.ipv6
42view systemview excluded icmpStatsOutMsgs.ipv6
43view systemview excluded icmpMsgStatsInPkts.ipv6
44view systemview excluded icmpMsgStatsOutPkts.ipv6
45
46####
47# Finally, grant the group read-only access to the systemview view.
48
49# group context sec.model sec.level prefix read write notif
50access notConfigGroup "" any noauth exact systemview none none
51
52
53###############################################################################
54# System contact information
55#
56
57syslocation Unknown (edit /etc/snmp/snmpd.conf)
58syscontact Root <root@localhost> (edit /etc/snmp/snmpd.conf)

First we follow step one and add a community name. Community name is like a password. Lets use a random password generator to create one:

Change the line that says:

view plain print about
1# sec.name source community
2com2sec notConfigUser default public

to something like this

view plain print about
1# sec.name source community
2com2sec notConfigUser default 6bs2m9j-ZwUvdq?x@HyFq2Fapt!CUQX@

At the end of the file add

view plain print about
1trapsink 192.168.1.88 6bs2m9j-ZwUvdq?x@HyFq2Fapt!CUQX@

Now we enable the SNMPd service and start it

view plain print about
1# chkconfig snmpd on
2# service snmpd start
3Starting snmpd: [ OK ]

Replace 192.168.1.88 with the IP address of your Dell ITA Server and 6bs2m9j-ZwUvdq?x@HyFq2Fapt!CUQX@ with the community string you set up earlier.

Now we will are going to follow Citrix KB Article CTX122337 to add the proper firewall rules.

view plain print about
1# vi /etc/sysconfig/iptables

You should see something like the following:

view plain print about
1# Firewall configuration written by system-config-securitylevel
2# Manual customization of this file is not recommended.
3*filter
4:INPUT ACCEPT [0:0]
5:FORWARD ACCEPT [0:0]
6:OUTPUT ACCEPT [0:0]
7:RH-Firewall-1-INPUT - [0:0]
8-A INPUT -j RH-Firewall-1-INPUT
9-A FORWARD -j RH-Firewall-1-INPUT
10-A RH-Firewall-1-INPUT -i lo -j ACCEPT
11-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
12-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
13-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
14-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
15-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
16-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
17-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
18-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 694 -j ACCEPT
19-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
20-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
21-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
22-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
23COMMIT

Add the following right after "-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT". Unlike the XenServer document, dell ITA requires port 162 to be open in addition to 161. It also needs port 1311 open if you are have install System Administrator.

view plain print about
1-A RH-Firewall-1-INPUT -p udp --dport 161 -j ACCEPT
2-A RH-Firewall-1-INPUT -p udp --dport 162 -j ACCEPT
3-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 1311 --tcp-flags SYN,RST,ACK SYN -j ACCEPT

The whole file should now look like:

view plain print about
1# Firewall configuration written by system-config-securitylevel
2# Manual customization of this file is not recommended.
3*filter
4:INPUT ACCEPT [0:0]
5:FORWARD ACCEPT [0:0]
6:OUTPUT ACCEPT [0:0]
7:RH-Firewall-1-INPUT - [0:0]
8-A INPUT -j RH-Firewall-1-INPUT
9-A FORWARD -j RH-Firewall-1-INPUT
10-A RH-Firewall-1-INPUT -i lo -j ACCEPT
11-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
12-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
13-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
14-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
15-A RH-Firewall-1-INPUT -p udp --dport 161 -j ACCEPT
16-A RH-Firewall-1-INPUT -p udp --dport 162 -j ACCEPT
17-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 1311 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
18-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
19-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
20-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
21-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 694 -j ACCEPT
22-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
23-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
24-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
25-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
26COMMIT

Now we refresh the firewall rules:

view plain print about
1# service iptables restart
2Flushing firewall rules: [ OK ]
3Setting chains to policy ACCEPT: filter [ OK ]
4Unloading iptables modules: [ OK ]
5Applying iptables firewall rules: [ OK ]

Now log into Dell ITA server and test the connectivity. Go to Tools->Troubleshooting tool and put in the IP Address (or Host Name) of your Xen Server and click "Get Text Configuration". Now select SNMP Connectivity and click "Configure". Put in "6bs2m9j-ZwUvdq?x@HyFq2Fapt!CUQX@" for the Get Community and keep the Set Community blank and click "OK". Now click "Run Selected Test(s)". You should see something like the following:

view plain print about
1Result of SNMP Connectivity test
2
3IP Address Used :
4192.168.1.188
5Result :
6  Connected using the Get Community Names - 6bs2m9j-ZwUvdq?x@HyFq2Fapt!CUQX@
7
8  Connected to the agent software(s) - [mib2, NA]
9Time of Execution :
10Thursday, June 17, 2010 2:51:03 PM EDT

Now lets add the IP of this server to the ranges (if it's not already covered by an existing range). Click on "Discovery and Monitoring->Ranges". If the range is not already covered, right click on "Include Ranges" and then select "New Include Range". Put in the IP address of your Xen server and "255.255.255.255" for the subnet mask, if you just want to add just the specific IP of this server. Click "Next", and then again click "Next" and put in "6bs2m9j-ZwUvdq?x@HyFq2Fapt!CUQX@" or the community string you set up earlier under "Get Community". Click "Next" a bunch of times until you get to step 7 and then change the option to "Perform both Discovery and Inventory". Click "Next" and "Finish".

Now right click on the IP that we've just added under the "Include Ranges" and click "Perform Discovery and Inventory Now". Pick the "View Progress" from the dialog box that pops up. Once you see that the current task is 100% complete, click on "View->View Devices" and the server should show up under "Servers".

XenServer 5.6 - Converting Local Storage to ext3 (and thereby enabling sparse provisioning)

Since XenServer 5.6 has some sort of bug which won't let it boot when you have linux raid partition, and I haven't found a way around it, I'm going to make this short and sweet. We will just delete the existing LVM SR and recreate it as ext3. This will allow us to do sparse provisioning.

First we will need to delete the current Local Storage, which involves quite a few steps.

view plain print about
1# xe pbd-list
2uuid ( RO) : 4960a8ab-d46f-270c-645d-c697263972c4
3 host-uuid ( RO): d805a419-6dab-437a-ab3c-abba07209574
4 sr-uuid ( RO): e768c14b-e452-78fa-4fc6-7b2bbafd3fd4
5 device-config (MRO): location: /opt/xensource/packages/iso; legacy_mode: true
6 currently-attached ( RO): true
7
8
9uuid ( RO) : a71c0a52-4d5a-fb22-01f7-63924ce0066f
10 host-uuid ( RO): d805a419-6dab-437a-ab3c-abba07209574
11 sr-uuid ( RO): 01655c83-5668-c05b-7031-c33c032d7af0
12 device-config (MRO): device: /dev/disk/by-id/scsi-3600137206653cb001394e1bf5e3adfc5-part3
13 currently-attached ( RO): true
14
15
16uuid ( RO) : c00deda7-a064-903e-19cc-657a16eb1a1a
17 host-uuid ( RO): d805a419-6dab-437a-ab3c-abba07209574
18 sr-uuid ( RO): cf8f5d45-2c85-e4c4-49bf-c6dab40a1e29
19 device-config (MRO): location: /dev/xapi/block
20 currently-attached ( RO): true
21
22
23uuid ( RO) : e2e20fa4-0d5b-acf9-2f22-5d3a3cd89593
24 host-uuid ( RO): d805a419-6dab-437a-ab3c-abba07209574
25 sr-uuid ( RO): 9cb77bf4-1ccf-53bb-0a8b-ddc8ec9c3ee4
26 device-config (MRO): location: /dev/xapi/cd
27 currently-attached ( RO): true

As you can see it's the second one on the list (the one that start with /dev/disk/by-id). Now we unplug it and destroy it.

view plain print about
1# xe pbd-unplug uuid=a71c0a52-4d5a-fb22-01f7-63924ce0066f
2# xe pbd-destroy uuid=a71c0a52-4d5a-fb22-01f7-63924ce0066f

Now lets destroy the storage repository attached to it. First we get a list of the repositories.

view plain print about
1# xe sr-list
2# xe sr-list
3uuid ( RO) : 01655c83-5668-c05b-7031-c33c032d7af0
4 name-label ( RW): Local storage
5 name-description ( RW):
6 host ( RO): <not in database>
7 type ( RO): lvm
8 content-type ( RO): user
9
10
11uuid ( RO) : 9cb77bf4-1ccf-53bb-0a8b-ddc8ec9c3ee4
12 name-label ( RW): DVD drives
13 name-description ( RW): Physical DVD drives
14 host ( RO): xen2
15 type ( RO): udev
16 content-type ( RO): iso
17
18
19uuid ( RO) : cf8f5d45-2c85-e4c4-49bf-c6dab40a1e29
20 name-label ( RW): Removable storage
21 name-description ( RW):
22 host ( RO): xen2
23 type ( RO): udev
24 content-type ( RO): disk
25
26
27uuid ( RO) : e768c14b-e452-78fa-4fc6-7b2bbafd3fd4
28 name-label ( RW): XenServer Tools
29 name-description ( RW): XenServer Tools ISOs
30 host ( RO): xen2
31 type ( RO): iso
32 content-type ( RO): iso

We will delete the one called local storage.

view plain print about
1# xe sr-forget uuid=01655c83-5668-c05b-7031-c33c032d7af0

At this point it will be forgotten and disappear from XenCenter.

Now, lets delete it from LVM.

view plain print about
1# vgdisplay
2 --- Volume group ---
3 VG Name VG_XenStorage-01655c83-5668-c05b-7031-c33c032d7af0
4 System ID
5 Format lvm2
6 Metadata Areas 1
7 Metadata Sequence No 3
8 VG Access read/write
9 VG Status resizable
10 MAX LV 0
11 Cur LV 1
12 Open LV 0
13 Max PV 0
14 Cur PV 1
15 Act PV 1
16 VG Size 1.81 TB
17 PE Size 4.00 MB
18 Total PE 474747
19 Alloc PE / Size 1 / 4.00 MB
20 Free PE / Size 474746 / 1.81 TB
21 VG UUID sR7JWl-k6sF-QU0Z-2Tkh-XNX5-mfuE-Pr7uKF

Now lets remove it.

view plain print about
1# vgremove VG_XenStorage-01655c83-5668-c05b-7031-c33c032d7af0
2Do you really want to remove volume group "VG_XenStorage-01655c83-5668-c05b-7031-c33c032d7af0" containing 1 logical volumes? [y/n]: y
3 Logical volume "MGT" successfully removed
4 Volume group "VG_XenStorage-01655c83-5668-c05b-7031-c33c032d7af0" successfully removed

Now we remove the physical volume.

view plain print about
1# pvdisplay
2 "/dev/sda3" is a new physical volume of "1.81 TB"
3 --- NEW Physical volume ---
4 PV Name /dev/sda3
5 VG Name
6 PV Size 1.81 TB
7 Allocatable NO
8 PE Size (KByte) 0
9 Total PE 0
10 Free PE 0
11 Allocated PE 0
12 PV UUID 3KA4t0-rX04-0aa9-mP6c-EkOr-rPmg-BiGncU

view plain print about
1# pvremove /dev/sda3
2 Labels on physical volume "/dev/sda3" successfully wiped

Now we change the partition type to Linux.

view plain print about
1# fdisk /dev/sda
2
3The number of cylinders for this disk is set to 243133.
4There is nothing wrong with that, but this is larger than 1024,
5and could in certain setups cause problems with:
61) software that runs at boot time (e.g., old versions of LILO)
72) booting and partitioning software from other OSs
8 (e.g., DOS FDISK, OS/2 FDISK)
9
10Command (m for help): p
11
12Disk /dev/sda: 1999.8 GB, 1999844147200 bytes
13255 heads, 63 sectors/track, 243133 cylinders
14Units = cylinders of 16065 * 512 = 8225280 bytes
15
16 Device Boot Start End Blocks Id System
17/dev/sda1 * 1 523 4194304 83 Linux
18Partition 1 does not end on cylinder boundary.
19/dev/sda2 523 1045 4194304 83 Linux
20/dev/sda3 1045 243133 1944577183 8e Linux LVM
21
22Command (m for help): t
23Partition number (1-4): 3
24Hex code (type L to list codes): L
25
26 0 Empty 1e Hidden W95 FAT1 80 Old Minix bf Solaris
27 1 FAT12 24 NEC DOS 81 Minix / old Lin c1 DRDOS/sec (FAT-
28 2 XENIX root 39 Plan 9 82 Linux swap / So c4 DRDOS/sec (FAT-
29 3 XENIX usr 3c PartitionMagic 83 Linux c6 DRDOS/sec (FAT-
30 4 FAT16 <32M 40 Venix 80286 84 OS/2 hidden C: c7 Syrinx
31 5 Extended 41 PPC PReP Boot 85 Linux extended da Non-FS data
32 6 FAT16 42 SFS 86 NTFS volume set db CP/M / CTOS / .
33 7 HPFS/NTFS 4d QNX4.x 87 NTFS volume set de Dell Utility
34 8 AIX 4e QNX4.x 2nd part 88 Linux plaintext df BootIt
35 9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM e1 DOS access
36 a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e3 DOS R/O
37 b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e4 SpeedStor
38 c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS eb BeOS fs
39 e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi ee EFI GPT
40 f W95 Ext'd (LBA) 54 OnTrackDM6 a5 FreeBSD ef EFI (FAT-12/16/
4110 OPUS 55 EZ-Drive a6 OpenBSD f0 Linux/PA-RISC b
4211 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f1 SpeedStor
4312 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f4 SpeedStor
4414 Hidden FAT16 <3 61 SpeedStor a9 NetBSD f2 DOS secondary
4516 Hidden FAT16 63 GNU HURD or Sys ab Darwin boot fb VMware VMFS
4617 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE
4718 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux raid auto
481b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep
491c Hidden W95 FAT3 75 PC/IX be Solaris boot ff BBT
50Hex code (type L to list codes): 83
51Changed system type of partition 3 to 83 (Linux)
52
53Command (m for help): p
54
55Disk /dev/sda: 1999.8 GB, 1999844147200 bytes
56255 heads, 63 sectors/track, 243133 cylinders
57Units = cylinders of 16065 * 512 = 8225280 bytes
58
59 Device Boot Start End Blocks Id System
60/dev/sda1 * 1 523 4194304 83 Linux
61Partition 1 does not end on cylinder boundary.
62/dev/sda2 523 1045 4194304 83 Linux
63/dev/sda3 1045 243133 1944577183 83 Linux
64
65Command (m for help): w
66The partition table has been altered!
67
68Calling ioctl() to re-read partition table.
69
70WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
71The kernel still uses the old table.
72The new table will be used at the next reboot.
73Syncing disks.

Now we reboot to make sure that the kernel picks up our changes.

view plain print about
1#reboot
Now lets add it to XenServer.
view plain print about
1# xe sr-create host-uuid=d805a419-6dab-437a-ab3c-abba07209574 content-type=user name-label="Local SR" shared=false device-config:device=/dev/sda3 type=ext
2fece93d6-503e-991c-2076-ac4e148f8630

Now we reboot and everything should come up fine.

Get rid of the temp files generated by ColdFusion Builder.

When opening an html file with CFBuilder, it was generating a temp file in my workspace - that wasn't going away when you closed the file. Digging into the issue, it turns out that Aptana - which is CFBuilder's HTML editor, does this. To get rid of this behavior, uncheck the following option:

view plain print about
1Window->Preferences->HTML->Editors->HTML->Preview->Generate temporary files for browser previews.

Urchin 5 on CentOS 5 (RHEL 5) - ERROR: (7066-211-368)

After installing Urchin, I got the following error when trying to update _domaindb.

view plain print about
1ERROR: (7066-211-368) Domain DB update failed DETAIL: (6) Couldn't resolve host 'download.urchin.com'

Now the DNS was configured properly and download.urchin.com was pinging normally.

Turns out that urchin needs the nscd service enabled.

view plain print about
1#yum install nscd
2#chkconfig nscd on
3#service nscd start
4#ln -s /var/run/nscd/socket /var/run/.nscd_socket

After doing this, the update should work fine.

XenServer 5.5 - Converting Local Storage to ext3 (and thereby enabling sparse provisioning)

After I wrote my earlier post about setting up local NFS and enabling sparse provisioning, I was having some performance issues with NFS. It turns out that you can still have sparse provisioning with local storage when it's set up as ext, instead of lvm.

XenServer will create sparse disks for your VMs only on NFS based volumes or locally formatted ext volumes. If you are using ISCSI or lvm based local storage, it will fully allocate each disk. This is less of a problem when you have a thinly provisioned ISCSI volume which is also compressed (such as those provided by Nexenta/OpenSolaris), but when you have a limited amount of local storage, it's unfortunate that XenServer doesn't give you the option to create sparse disks out of the box.

Luckily, we can convert the storage to ext3 and enable thin provisioning.

First we will need to delete the current Local Storage, which involves quite a few steps.

view plain print about
1#lvdisplay
2 --- Logical volume ---
3 LV Name /dev/VG_XenStorage-877a1f66-59dd-b1ba-0de3-d8a753d0a0b2/MGT
4 VG Name VG_XenStorage-877a1f66-59dd-b1ba-0de3-d8a753d0a0b2
5 LV UUID HlifV3-7B6J-rVCp-pAxP-Rc7e-viEQ-Tt819a
6 LV Write Access read/write
7 LV Status NOT available
8 LV Size 4.00 MB
9 Current LE 1
10 Segments 1
11 Allocation inherit
12 Read ahead sectors auto
Now we run xe pbd-list and find the one that matches our local SR.
view plain print about
1#xe pbd-list
2uuid ( RO) : e06a37a5-e1e6-4415-134e-f5ae4f7f7c17
3 host-uuid ( RO): 99ae2c2e-b992-4b4d-a09d-15cba5483225
4 sr-uuid ( RO): fc8c8fc5-4a06-18b9-517d-f19a18e50820
5 device-config (MRO): location: /dev/xapi/cd
6 currently-attached ( RO): true
7
8
9uuid ( RO) : 7a75d1b9-9aa5-d5f7-6b85-50d1175054c8
10 host-uuid ( RO): 99ae2c2e-b992-4b4d-a09d-15cba5483225
11 sr-uuid ( RO): a6db482a-5446-3fc3-6513-6933eb9d7915
12 device-config (MRO): location: /dev/xapi/block
13 currently-attached ( RO): true
14
15
16uuid ( RO) : 6c1eeeb0-3c05-fbee-4dca-e7490e007504
17 host-uuid ( RO): 99ae2c2e-b992-4b4d-a09d-15cba5483225
18 sr-uuid ( RO): f663b0ec-56b0-72dc-d546-4e0fc9be7ef6
19 device-config (MRO): location: /opt/xensource/packages/iso; legacy_mode: true
20 currently-attached ( RO): true
21uuid ( RO) : 825bc0eb-8ec9-01ab-e249-21146d66dd9a
22 host-uuid ( RO): 99ae2c2e-b992-4b4d-a09d-15cba5483225
23 sr-uuid ( RO): 877a1f66-59dd-b1ba-0de3-d8a753d0a0b2
24 device-config (MRO): device: /dev/disk/by-id/scsi-SATA_WDC_WD800JD-75M_WD-WMAM9AJ38489-part3
25 currently-attached ( RO): true

As we can see, it's the last one. Now we unplug it and destroy it.

view plain print about
1#xe pbd-unplug uuid=825bc0eb-8ec9-01ab-e249-21146d66dd9a
2#xe pbd-destroy uuid=825bc0eb-8ec9-01ab-e249-21146d66dd9a

Now lets destroy the storage repository attached to it. First we get a list of the repositories.

view plain print about
1#xe sr-list
2uuid ( RO) : a6db482a-5446-3fc3-6513-6933eb9d7915
3 name-label ( RW): Removable storage
4 name-description ( RW):
5 host ( RO): xenserver-ueyqfddq
6 type ( RO): udev
7 content-type ( RO): disk
8
9
10uuid ( RO) : fc8c8fc5-4a06-18b9-517d-f19a18e50820
11 name-label ( RW): DVD drives
12 name-description ( RW): Physical DVD drives
13 host ( RO): xenserver-ueyqfddq
14 type ( RO): udev
15 content-type ( RO): iso
16
17
18uuid ( RO) : 877a1f66-59dd-b1ba-0de3-d8a753d0a0b2
19 name-label ( RW): Local storage
20 name-description ( RW):
21 host ( RO): <not in database>
22 type ( RO): lvm
23 content-type ( RO): user
24
25
26uuid ( RO) : f663b0ec-56b0-72dc-d546-4e0fc9be7ef6
27 name-label ( RW): XenServer Tools
28 name-description ( RW): XenServer Tools ISOs
29 host ( RO): xenserver-ueyqfddq
30 type ( RO): iso
31 content-type ( RO): iso
We will delete the one called local storage.

view plain print about
1#xe sr-forget uuid=877a1f66-59dd-b1ba-0de3-d8a753d0a0b2

At this point it will be forgotten and disappear from XenCenter.

Now, lets delete it from LVM.

view plain print about
1#vgdisplay
2 --- Volume group ---
3 VG Name VG_XenStorage-877a1f66-59dd-b1ba-0de3-d8a753d0a0b2
4 System ID
5 Format lvm2
6 Metadata Areas 1
7 Metadata Sequence No 3
8 VG Access read/write
9 VG Status resizable
10 MAX LV 0
11 Cur LV 1
12 Open LV 0
13 Max PV 0
14 Cur PV 1
15 Act PV 1
16 VG Size 66.85 GB
17 PE Size 4.00 MB
18 Total PE 17113
19 Alloc PE / Size 1 / 4.00 MB
20 Free PE / Size 17112 / 66.84 GB
21 VG UUID 2PJJkR-ULpa-1F6f-8H65-N22A-o11C-f0KkGa

Now lets remove it.

view plain print about
1#vgremove VG_XenStorage-877a1f66-59dd-b1ba-0de3-d8a753d0a0b2
2Do you really want to remove volume group "VG_XenStorage-877a1f66-59dd-b1ba-0de3-d8a753d0a0b2" containing 1 logical volumes? [y/n]: y
3 Logical volume "MGT" successfully removed
4 Volume group "VG_XenStorage-877a1f66-59dd-b1ba-0de3-d8a753d0a0b2" successfully removed

view plain print about
1#pvdisplay
2 "/dev/sda3" is a new physical volume of "66.86 GB"
3 --- NEW Physical volume ---
4 PV Name /dev/sda3
5 VG Name
6 PV Size 66.86 GB
7 Allocatable NO
8 PE Size (KByte) 0
9 Total PE 0
10 Free PE 0
11 Allocated PE 0
12 PV UUID ZK23c0-UvDg-A4MB-TWKi-YfNW-hWUK-uoyqdo
Now we remove the physical volume from LVM.
view plain print about
1#pvremove /dev/sda3
2 Labels on physical volume "/dev/sda3" successfully wiped

The instructions that follow use a different system, and a different hard disk.

I am using a 2TB disk and will create 2 888GB partitions for local storage and one 200GB for ISOs.

Since XenServer will only allow a single SR on a drive, we'll need to create a fake raid array on the second data partition. To this end we need to change the type of the partition to "Linux raid autodetect", so that it's automounted on boot.

view plain print about
1# fdisk /dev/sda
2
3The number of cylinders for this disk is set to 243133.
4There is nothing wrong with that, but this is larger than 1024,
5and could in certain setups cause problems with:
61) software that runs at boot time (e.g., old versions of LILO)
72) booting and partitioning software from other OSs
8 (e.g., DOS FDISK, OS/2 FDISK)
9
10Command (m for help): m
11Command action
12 a toggle a bootable flag
13 b edit bsd disklabel
14 c toggle the dos compatibility flag
15 d delete a partition
16 l list known partition types
17 m print this menu
18 n add a new partition
19 o create a new empty DOS partition table
20 p print the partition table
21 q quit without saving changes
22 s create a new empty Sun disklabel
23 t change a partition's system id
24 u change display/entry units
25 v verify the partition table
26 w write table to disk and exit
27 x extra functionality (experts only)
28
29Command (m for help): p
30
31Disk /dev/sda: 1999.8 GB, 1999844147200 bytes
32255 heads, 63 sectors/track, 243133 cylinders
33Units = cylinders of 16065 * 512 = 8225280 bytes
34
35 Device Boot Start End Blocks Id System
36/dev/sda1 * 1 499 4008186 83 Linux
37/dev/sda2 500 998 4008217+ 83 Linux
38/dev/sda3 999 243133 1944949387+ 83 Linux
39
40Command (m for help): d
41Partition number (1-4): 3
42
43Command (m for help): p
44
45Disk /dev/sda: 1999.8 GB, 1999844147200 bytes
46255 heads, 63 sectors/track, 243133 cylinders
47Units = cylinders of 16065 * 512 = 8225280 bytes
48
49 Device Boot Start End Blocks Id System
50/dev/sda1 * 1 499 4008186 83 Linux
51/dev/sda2 500 998 4008217+ 83 Linux
52
53Command (m for help): n
54Command action
55 e extended
56 p primary partition (1-4)
57e
58Partition number (1-4): 3
59First cylinder (999-243133, default 999):
60Using default value 999
61Last cylinder or +size or +sizeM or +sizeK (999-243133, default 243133):
62Using default value 243133
63
64Command (m for help): p
65
66Disk /dev/sda: 1999.8 GB, 1999844147200 bytes
67255 heads, 63 sectors/track, 243133 cylinders
68Units = cylinders of 16065 * 512 = 8225280 bytes
69
70 Device Boot Start End Blocks Id System
71/dev/sda1 * 1 499 4008186 83 Linux
72/dev/sda2 500 998 4008217+ 83 Linux
73/dev/sda3 999 243133 1944949387+ 5 Extended
74
75Command (m for help): n
76Command action
77 l logical (5 or over)
78 p primary partition (1-4)
79l
80First cylinder (999-243133, default 999):
81Using default value 999
82Last cylinder or +size or +sizeM or +sizeK (999-243133, default 243133): +888G
83
84Command (m for help): n
85Command action
86 l logical (5 or over)
87 p primary partition (1-4)
88l
89First cylinder (108960-243133, default 108960):
90Using default value 108960
91Last cylinder or +size or +sizeM or +sizeK (108960-243133, default 243133): 888G
92Value out of range.
93Last cylinder or +size or +sizeM or +sizeK (108960-243133, default 243133): +888G
94
95Command (m for help): n
96Command action
97 l logical (5 or over)
98 p primary partition (1-4)
99l
100First cylinder (216921-243133, default 216921):
101Using default value 216921
102Last cylinder or +size or +sizeM or +sizeK (216921-243133, default 243133):
103Using default value 243133
104
105Command (m for help): p
106
107Disk /dev/sda: 1999.8 GB, 1999844147200 bytes
108255 heads, 63 sectors/track, 243133 cylinders
109Units = cylinders of 16065 * 512 = 8225280 bytes
110
111 Device Boot Start End Blocks Id System
112/dev/sda1 * 1 499 4008186 83 Linux
113/dev/sda2 500 998 4008217+ 83 Linux
114/dev/sda3 999 243133 1944949387+ 5 Extended
115/dev/sda5 999 108959 867196701 83 Linux
116/dev/sda6 108960 216920 867196701 83 Linux
117/dev/sda7 216921 243133 210555891 83 Linux
118
119Command (m for help): t
120Partition number (1-7): 6
121Hex code (type L to list codes): fd
122Changed system type of partition 6 to fd (Linux raid autodetect)
123
124Command (m for help): p
125
126Disk /dev/sda: 1999.8 GB, 1999844147200 bytes
127255 heads, 63 sectors/track, 243133 cylinders
128Units = cylinders of 16065 * 512 = 8225280 bytes
129
130 Device Boot Start End Blocks Id System
131/dev/sda1 * 1 499 4008186 83 Linux
132/dev/sda2 500 998 4008217+ 83 Linux
133/dev/sda3 999 243133 1944949387+ 5 Extended
134/dev/sda5 999 108959 867196701 83 Linux
135/dev/sda6 108960 216920 867196701 fd Linux raid autodetect
136/dev/sda7 216921 243133 210555891 83 Linux
137
138Command (m for help): w
139The partition table has been altered!
140
141Calling ioctl() to re-read partition table.
142
143WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
144The kernel still uses the old table.
145The new table will be used at the next reboot.
146Syncing disks.
At this point I had to reboot the server because of the warning above. You may or may not get this warning and need to reboot before proceeding.

First lets set up our ISO repository.

view plain print about
1# mkfs.ext3 -m 0 /dev/sda7
2mke2fs 1.39 (29-May-2006)
3Filesystem label=
4OS type: Linux
5Block size=4096 (log=2)
6Fragment size=4096 (log=2)
726329088 inodes, 52638972 blocks
80 blocks (0.00%) reserved for the super user
9First data block=0
10Maximum filesystem blocks=0
111607 block groups
1232768 blocks per group, 32768 fragments per group
1316384 inodes per group
14Superblock backups stored on blocks:
15 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
16 4096000, 7962624, 11239424, 20480000, 23887872
17
18Writing inode tables: done
19Creating journal (32768 blocks): done
20Writing superblocks and filesystem accounting information: done
21
22This filesystem will be automatically checked every 36 mounts or
23180 days, whichever comes first. Use tune2fs -c or -i to override.

Now lets set up a folder for it and make sure it gets mounted at boot time.

view plain print about
1#mkdir /data

view plain print about
1#vi /etc/fstab
2LABEL=root-cjfffcbq /ext3 defaults 1 1
3/var/swap/swap.001swap swap defaults 0 0
4none/dev/pts devpts defaults 0 0
5none/dev/shm tmpfs defaults 0 0
6none/proc proc defaults 0 0
7none/sys sysfs defaults 0 0

We need to add our directory to automatically mount at boot time. Lets add this entry

view plain print about
1/dev/sda7 /data ext3 defaults 1 2

This is how my file looked like at the end.

view plain print about
1/ext3 defaults 1 1
2/var/swap/swap.001swap swap defaults 0 0
3none/dev/pts devpts defaults 0 0
4none/dev/shm tmpfs defaults 0 0
5none/proc proc defaults 0 0
6none/sys sysfs defaults 0 0
7/dev/sda7 /data ext3 defaults 1 2

Now lets try mounting it.

view plain print about
1#mount /data

If you get no output, that means it probably worked.

Lets check that it mounted successfully.

view plain print about
1#ls /data
2lost+found

Now lets create our directory that we will export.

view plain print about
1#mkdir /data/iso

Lets edit the exports file.

view plain print about
1#vi /etc/exports
The file should initially be empty. Lets add our entries.
view plain print about
1/data/iso 127.0.0.1(ro,no_root_squash,sync)

Save the file, and now lets start the nfs and portmap services.

view plain print about
1#service nfs start
2Starting NFS services: [ OK ]
3Starting NFS daemon: [ OK ]
4Starting NFS mountd: [ OK ]
5#service portmap start
6Starting portmap: [ OK ]

Lets make sure that the portmap and nfs services start at boot.

view plain print about
1#chkconfig --level 345 nfs on
2#chkconfig --level 345 portmap on

Lets verify that our directory is being exported.

view plain print about
1#exportfs
2/data/iso 127.0.0.1

Lets add an ISO SR as well. Right click on the server in XenCenter, and click "New Storage Repository". Select "NFS ISO" as the type, and enter the following parameters.

view plain print about
1Name: NFS Local ISO library
2Share Name: 127.0.0.1:/data/iso
3Click "Finish".

Now we will create the actual Storage Repositories to keep our VMs. I have decided to split mine in two as a way to short stroke the disk - I will try to use mostly the first SR, and maybe put in VMs that are not used often into the second SR, as the first SR should have slightly faster speed and better average seek time. You may choose to only have a single SR, so you'll need to modify your fdisk config earlier.

First we create our ext3 filesystems.

view plain print about
1# mkfs.ext3 -m 0 /dev/sda5
2mke2fs 1.39 (29-May-2006)
3Filesystem label=
4OS type: Linux
5Block size=4096 (log=2)
6Fragment size=4096 (log=2)
7108412928 inodes, 216799175 blocks
80 blocks (0.00%) reserved for the super user
9First data block=0
10Maximum filesystem blocks=0
116617 block groups
1232768 blocks per group, 32768 fragments per group
1316384 inodes per group
14Superblock backups stored on blocks:
15 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
16 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
17 102400000, 214990848
18
19Writing inode tables: done
20Creating journal (32768 blocks): done
21Writing superblocks and filesystem accounting information: done
22
23This filesystem will be automatically checked every 22 mounts or
24180 days, whichever comes first. Use tune2fs -c or -i to override.
view plain print about
1# mkfs.ext3 -m 0 /dev/sda6
2mke2fs 1.39 (29-May-2006)
3Filesystem label=
4OS type: Linux
5Block size=4096 (log=2)
6Fragment size=4096 (log=2)
7108412928 inodes, 216799175 blocks
80 blocks (0.00%) reserved for the super user
9First data block=0
10Maximum filesystem blocks=0
116617 block groups
1232768 blocks per group, 32768 fragments per group
1316384 inodes per group
14Superblock backups stored on blocks:
15 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
16 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
17 102400000, 214990848
18
19Writing inode tables: done
20Creating journal (32768 blocks): done
21Writing superblocks and filesystem accounting information: done
22
23This filesystem will be automatically checked every 30 mounts or
24180 days, whichever comes first. Use tune2fs -c or -i to override.

Update (6/8/2010): Turns out it's not necessary to make the ext3 partitions yourself, as XenServer does it for you.
Now we will create the storage repositories on these ext partitions. As I mentioned earlier, we need to create a fake raid on top of the second partition, otherwise XenServer won't us use it.

Update (6/10/2010): Looks like XenServer 5.6 has some sort of bug which prevents it from booting with any partitions set to type "fd". If you are using 5.6 - DO NOT CREATE an md device. Instead just partition it so that there is only a single data device.

view plain print about
1# mdadm --create /dev/md0 --level=1 --raid-devices=1 /dev/sda6 --force
2mdadm: array /dev/md0 started.

Now lets set up our Storage Repositories. This will take several minutes (about 15 minutes for me for a 1TB repo), so don't panic if you don't see any progress for a while.

view plain print about
1# xe sr-create host-uuid=999847a4-d895-4e30-a703-1a20f9930cfd content-type=user name-label="Local SR1" shared=false device-config:device=/dev/sda5 type=ext
20414bfc6-bad9-81ed-ead9-9d3c42f19b61

Now we set up a Storage Repository on top of the fake array.

view plain print about
1#xe sr-create host-uuid=999847a4-d895-4e30-a703-1a20f9930cfd content-type=user name-label="Local SR2" shared=false device-config:device=/dev/md0 type=ext
2037fb965-61c5-1345-4d73-b7f9736133ad

Now we reboot and if everything comes back up, we are done. Now when we create VMs, the Virtual Hard Disks will be allocated sparsely, and VMs created from templates, will all use the same base VHD and only store the changes in their own disk.

Railo on Tomcat on Windows x64 - Part III

Now that we've got Tomcat, Railo and Apache httpd up and running, lets connect Tomcat and Apache.

For this we will need a mod_jk connector. The binary can be found here.

There is no x64 connector as there is no x64 official release of Apache httpd, so we will be using the x32 connector. In my case I downloaded mod_jk-1.2.28-httpd-2.2.3.so from the win32 folder. Download this file and put it in C:\Apache2\modules. Now rename it to mod_jk.so

Create a file in c:\Apache2\conf\extra called workers.properties and put this into the file

view plain print about
1# Define 1 real worker using ajp13
2 worker.list=worker1
3 # Set properties for worker1 (ajp13)
4 worker.worker1.type=ajp13
5 worker.worker1.host=localhost
6 worker.worker1.port=8009

Now lets download Railo and lets set it up. We want to get the custom one, the jars, in my case "railo-3.1.2.001-jars.zip (34 MB)". Create a Railo folder in the Tomcat folder, in my case "C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0".

Now open up the railo zip file and put the jar files from the railo-3.1.2.001-jars into the railo folder we just created.

Now edit the catalina.properties file that was in Tomcat conf folder, in my case "C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0\conf". Find the line that says "common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar" and edit it to say "common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/railo/*.jar"

Now open tomcat-users.xml and change the encoding to utf-8. At the top where it says "<?xml version='1.0' encoding='cp1252'?>" and change it to "<?xml version='1.0' encoding='utf-8'?>" This is needed due to some weird Tomcat bug on windows.

Now lets open web.xml in the Tomcat's conf directory. Just before the "Built In Servlet Mappings" add the following:

view plain print about
1<servlet>
2 <servlet-name>RailoCFMLServlet</servlet-name>
3 <description>CFML runtime Engine</description>
4 <servlet-class>railo.loader.servlet.CFMLServlet</servlet-class>
5 <init-param>
6<param-name>configuration</param-name>
7<param-value>/WEB-INF/railo</param-value>
8<description>Configuration directory</description>
9</init-param>
10 <!-- init-param>
11<param-name>railo-server-root</param-name>
12<param-value>.</param-value>
13<description>directory where railo root directory is stored</description>
14</init-param -->

15 <load-on-startup>1</load-on-startup>
16</servlet>
17<servlet>
18 <servlet-name>RailoAMFServlet</servlet-name>
19 <description>AMF Servlet for flash remoting</description>
20 <servlet-class>railo.loader.servlet.AMFServlet</servlet-class>
21 <load-on-startup>1</load-on-startup>
22</servlet>
23<servlet>
24 <servlet-name>RailoFileServlet</servlet-name>
25 <description>File Servlet for simple files</description>
26 <servlet-class>railo.loader.servlet.FileServlet</servlet-class>
27 <load-on-startup>2</load-on-startup>
28</servlet>

Now at the end of the servlet mapping section, add the following

view plain print about
1<servlet-mapping>
2 <servlet-name>RailoCFMLServlet</servlet-name>
3 <url-pattern>*.cfm</url-pattern>
4</servlet-mapping>
5<servlet-mapping>
6 <servlet-name>RailoCFMLServlet</servlet-name>
7 <url-pattern>*.cfml</url-pattern>
8</servlet-mapping>
9<servlet-mapping>
10 <servlet-name>RailoCFMLServlet</servlet-name>
11 <url-pattern>*.cfc</url-pattern>
12</servlet-mapping>
13<servlet-mapping>
14 <servlet-name>RailoAMFServlet</servlet-name>
15 <url-pattern>/flashservices/gateway/*</url-pattern>
16</servlet-mapping>
17<servlet-mapping>
18 <!-- could be RailoFileServlet -->
19 <servlet-name>default</servlet-name>
20 <url-pattern>/</url-pattern>
21</servlet-mapping>

Now open up server.xml and at the end of the file inside the Engine tag, we'll add a new host definition.

view plain print about
1<Host name="railotest" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
2 <Context path="" docBase="c:/websites/railotest" />
3</Host>

Now lets go back to our httpd-vhosts.conf Apache file. We need to add the following (I do this outside of any virtualhost definitions.

view plain print about
1# Load mod_jk module
2LoadModule jk_module modules/mod_jk.so
3# Where to find workers.properties
4JkWorkersFile conf/extra/workers.properties
5# Where to put jk shared memory
6JkShmFile logs/mod_jk.shm
7# Where to put jk logs
8JkLogFile logs/mod_jk.log
9# Set the jk log level [debug/error/info]
10JkLogLevel info
11# Select the timestamp log format
12JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

We also need to add the following to the VirtualHost definition

view plain print about
1# Send requests for cfm files to worker named worker1
2    JkMount /*.cfm     worker1

The full virtualhost definition should look like

view plain print about
1<VirtualHost *:80>
2    DocumentRoot "C:/websites/railotest"
3    ServerName railotest
4    ErrorLog "logs/railotest.com-error.log"
5    CustomLog "logs/railotest-access.log" common
6    # Send requests for cfm files to worker named worker1
7    JkMount /*.cfm     worker1
8</VirtualHost>

Now if we restart Tomcat and Apache we should be able to hit http://railotest in our browser and see the debugging info. We will also see a WEB-INF folder created inside c:\websites\railotest.

Now lets put in an alias for the railo-context so that we can get to the admin. Inside the virtual host add

view plain print about
1Alias /railo-context C:\websites\railotest\WEB-INF\railo\context

Now restart Apache and we should be able to get to the Web Administrator for this host by going to http://railotest/railo-context/admin.cfm

Railo on Tomcat on Windows x64 - Part II

In the previous two parts we installed Tomcat. Now lets set up Apache httpd server.

I suggest downloading Apache from Apache Lounge. The nice thing about Apache Lounge's builds is that they include mod_rewrite and mod_ssl.

The latest version at the time of this writing is 2.2.14. Download httpd-2.2.14-win32-x86-ssl.zip and open it in your favorite archiver (mine is WinRar).

I recommend taking the Apache2 folder inside the zip file and placing it on c:\. After you've done this you should have a c:\Apache2 folder with many files and subfolders in it.

Open c:\Apache2\conf\httpd.conf file in your favorite text editor. I recommend Textpad.

I usually change a few things from the defaults. Your configuration may differ.

Change

view plain print about
1ServerAdmin admin@example.com
to your email address.

Uncomment the following modules:

view plain print about
1#LoadModule proxy_module modules/mod_proxy.so
2#LoadModule proxy_http_module modules/mod_proxy_http.so
3#LoadModule rewrite_module modules/mod_rewrite.so
by removing the # sign in front of the line.

Find the line that says

view plain print about
1<Directory "c:/Apache2/htdocs">

After closing directory tag lets add one allowing access to our web root. I usually set up a folder or a new drive for it. Lets say we set up a webroot of "c:\websites". Create a folder websites on c: and then inside it create another folder called railotest. We will use this to set up our test site.

After the closing tag, add a new one allowing access to our web root.

view plain print about
1<Directory "c:/websites">
2 Options Indexes FollowSymLinks
3 AllowOverride None
4 Order allow,deny
5 Allow from all
6</Directory>

This will allow Apache to serve from anywhere inside c:\websites. Alternatively, you can set up a new directory entry for every site that you create, but I find that this makes things easier without significantly impacting security.

Find the line that says

view plain print about
1DirectoryIndex index.html

and add index.cfm to that list

view plain print about
1DirectoryIndex index.html index.cfm

Uncomment the line that says

view plain print about
1#Include conf/extra/httpd-vhosts.conf
by removing the # sign.

Now open up httpd-vhosts.conf file that is located in "C:\Apache2\conf\extra".

There are two sample virtual hosts defined. Lets comment them both out. Alternatively you can just delete them.

view plain print about
1<VirtualHost *:80>
2 ServerAdmin webmaster@dummy-host.example.com
3 DocumentRoot "c:/Apache2/docs/dummy-host.example.com"
4 ServerName dummy-host.example.com
5 ServerAlias www.dummy-host.example.com
6 ErrorLog "logs/dummy-host.example.com-error.log"
7 CustomLog "logs/dummy-host.example.com-access.log" common
8</VirtualHost>
9
10<VirtualHost *:80>
11 ServerAdmin webmaster@dummy-host2.example.com
12 DocumentRoot "c:/Apache2/docs/dummy-host2.example.com"
13 ServerName dummy-host2.example.com
14 ErrorLog "logs/dummy-host2.example.com-error.log"
15 CustomLog "logs/dummy-host2.example.com-access.log" common
16</VirtualHost>
should look like this:

view plain print about
1#<VirtualHost *:80>
2# ServerAdmin webmaster@dummy-host.example.com
3# DocumentRoot "c:/Apache2/docs/dummy-host.example.com"
4# ServerName dummy-host.example.com
5# ServerAlias www.dummy-host.example.com
6# ErrorLog "logs/dummy-host.example.com-error.log"
7# CustomLog "logs/dummy-host.example.com-access.log" common
8#</VirtualHost>
9#
10#<VirtualHost *:80>
11# ServerAdmin webmaster@dummy-host2.example.com
12# DocumentRoot "c:/Apache2/docs/dummy-host2.example.com"
13# ServerName dummy-host2.example.com
14# ErrorLog "logs/dummy-host2.example.com-error.log"
15# CustomLog "logs/dummy-host2.example.com-access.log" common
16#</VirtualHost>

Now lets add a new entry for our test server

view plain print about
1<VirtualHost *:80>
2 DocumentRoot "C:/websites/railotest"
3 ServerName railotest
4 ErrorLog "logs/railotest.com-error.log"
5 CustomLog "logs/railotest-access.log" common
6</VirtualHost>

Now save the files and lets try running apache and see if it worked. Open up command prompt (Start -> Run -> cmd.exe)

view plain print about
1Microsoft Windows [Version 5.2.3790]
2(C) Copyright 1985-2003 Microsoft Corp.
3
4C:\Documents and Settings\Administrator>
cd \apache2\bin
5
6C:\Apache2\bin>httpd
7httpd: Could not reliably determine the server's fully qualified domain name, using xxx.xxx.xxx.xxx for ServerName
We can ignore that warning since we don't care about the default configuration.

Now we will need to define a host called railotest using windows hosts file. Open up "C:\windows\system32\drivers\etc\hosts" file in your favorite text editor.

After a bunch of comments, you should see

view plain print about
1127.0.0.1 localhost

Lets add an entry for railotest

view plain print about
1127.0.0.1 railotest

Now this computer knows that railotest points to 127.0.0.1.

Lets put a test cfm file in the webroot for railotest. Create a new file called index.cfm and put it in c:\websites\railotest.

Inside the file lets put some basic cf code

view plain print about
1<cfdump var="#server#">

If you still have apache running and put in http://railotest in your browser you should see the code being output. It is not being interpreted yet because we have not hooked up Apache httpd to Railo. We will do this in Part IV.

For now lets set up apache to run as a service.

First stop the httpd that you ran earlier by entering ctrl-c and do the following.

view plain print about
1C:\Apache2\bin>httpd -k install
2Installing the Apache2.2 service
3The Apache2.2 service is successfully installed.
4Testing httpd.conf....
5Errors reported here must be corrected before the service can be started.
6httpd: Could not reliably determine the server's fully qualified domain name, using xxx.xxx.xxx.xxx for ServerName

The Apache service is now installed. I recommend also adding the "Apache Monitor" app to your startup folder.

Click Start->All Programs and right click on Startup. Now click "Explore All Users". In another explorer window open up C:\Apache2\Bin and right drag ApacheMonitor.exe to the Startup folder. Let go of the right mouse button and select "Create shortcut here".

Double click on the shortcut and the monitor App should appear in your taskbar next to the clock and next to Tomcat's icon.

Double click it to open it and click start. Now you have a working Apache installation that will start as a service.

If you enter http://railotest in your browser, you should see the code we wrote earlier. This will persist across reboots.

In the next part, we'll hook it up to Railo and be able to actually execute this code.

Railo on Tomcat on Windows x64 - Part I

I tried following Sean Corfield's excellent post on how to get Railo running on Tomcat, but ran into a few snags on my x64 windows system.

First download Tomcat 6 from the Apache Foundation. I picked the "Windows Service Installer" of the Core.

Start up the installer and hit next a few times until you get to the "Choose Components" section. Select Full install and then uncheck the Examples item as we won't be needing it.

Pick the installation folder, and the default port, and set a password for the administrator. At the next step it will ask for a path to a J2SE 5.0 JRE installation. Finding this on Sun's site is a bit of a pain, so here is a link to the J2SE 5.0 Update 22, which is the latest as of this writing.

Download it, install it and make a note of what folder it installs in. In my case it was "C:\Program Files\Java\jre1.5.0_22". This is the path I provided to Tomcat installer.

Finish the tomcat installation and you will see that the service is installed, but will not start. This is because we need the 64bit service wrapper

The only file that should be in there is tomcat6.exe. Download it and replace the one in your tomcat's installation bin folder. In my case that folder is "C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0\bin".

Now if you go to "http://localhost:8080/", you should see The Tomcat default start page.

In part II, we will cover getting setting up Apache.

More Entries