Copyright © 2007 Jurjen Bokma
Abstract
OpenQRM was not originally built on Debian, nor on AMD64. Although Debian differs only marginally from the Fedora Core it was built on, I ran into a few minor problems that make it less than trivial to do so. This document preserves the solutions to the difficulties I ran into, and may spare others some.
Table of Contents
The humble systems administrator who is charged with the task of looking after many systems that may never fall off the net faces an ever increasing workload with every machine he adds to his flock. He must have spares standing by for many systems, and they crowd his server room. He must also do the tedious configuration of all machines being reconfigured, taking the sacred names of the relatives of each new machines predecessor and writing them carefully into the config files of the newly arrived. But now there is OpenQRM, to which he may make known the structure of his network, and the names of all under his care, and it will check on his machines, and rewrite configurations when a machine is reassigned to a new task.
Wouldn it be lovely if he could get that to work on his trusty Debian box...
Procedure 1. Installation of packages
We need cvs to fetch the sources, and a whole list of other packages to ensure a succesful build.
apt-get install cvs
apt-get install gcc libdb4.3 libdb4.3-dev rpm pciutils pciutils-dev bison bzip2 iproute linux-kernel-headers zlib1g-dev portmap alien sun-java5-jdk unzip flex-old g++ ncurses-dev libgpmg1-dev
![]() | Warning |
|---|---|
By default, you must attend to this command in order to press on the legalese of the |
Procedure 2.
Installation of Maven, version 1.0.2
wget http://archive.apache.org/dist/maven/binaries/maven-1.0.2.tar.gz
tar zxf maven-1.0.2.tar.gz
mv maven-1.0.2 /usr/local
Procedure 3. Fetching the source from CVS [1]
Create a working directory, and cd into it
mkdir -p work/openqrm
cd work/openqrm
Log into the CVS repository, and fetch the base and plugins directories
cvs -d:pserver:anonymous@openqrm.cvs.sourceforge.net:/cvsroot/openqrm login
cvs -z3 -d:pserver:anonymous@openqrm.cvs.sourceforge.net:/cvsroot/openqrm co -P base/openqrm-3.1.4
cvs -z3 -d:pserver:anonymous@openqrm.cvs.sourceforge.net:/cvsroot/openqrm co -P plugins
mv plugins/* base/openqrm-3.1.4/src/plugins/
Procedure 4.
Fetching the SJP
We also need SJP installed, so we fetch it from the annoyingly protected Sun SJP download page and put it in a directory:
mkdir base/openqrm-3.1.4/packages &&
cp ~/sjp-1_0-ea-linux-i586.tar.gz base/openqrm-3.1.4/packages/
[1]
As stated on the OpenQRM sourceforge page, anonymous CVS access is available.
This is the preferred source for a new build, as the build process will download several ancillary programs, the URIs of which will be outdated in even the most recently released version.
Procedure 5. Building “base”
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.10/
export MAVEN_HOME=/usr/local/maven-1.0.2/
cd base/openqrm-3.1.4/src/
There is a tar command in base/etc/templates/qrm-create-initrd-template that expects options to be default that aren't under Debian that materializes from Make as “/bin/tar -C /var/cache/qrm/initrd/usr/share -zxf /var/cache/qrm/hwdata/”.
In the same file, the downloaded ddcxinfo-knoppix package cannot handle 64-bit architectures, and the script has been modified to exempt Opteron CPUs from this problem, but not the Intel architecture we happen to be building on.
We need to modify that file:
sed -i 's%tar -C $QRM_CACHE_DIR/initrd/usr/share -zxf $HWDATA_PKG $HWDATA_FILES1%tar -C $QRM_CACHE_DIR/initrd/usr/share -zxf $HWDATA_PKG --wildcards $HWDATA_FILES1%g' base/etc/templates/qrm-create-initrd-template
sed -i "s%Opteron%-E 'Opteron|Intel\\\(R\\\)\\\ Core\\\(TM\\\)2\\\ CPU\'%g" base/etc/templates/qrm-create-initrd-template
![]() | Warning |
|---|---|
This command is probably very particular for the version at hand, and this hack is considered a kludge.
The proper solution would consist of either the OpenQRM people giving the proper options to their tar commands, or the Debian people compiling the proper options into their version of |
The iSCSI parts allegedly do not work under Debian.
But they do pull an entire kernel in during build, and then fail because of some kernel config that uses drivers not suitable for 64-bit.
We remove them -for now-.
rm -rf plugins/iscsi/
make all PACKAGE_TYPE=deb
make install PACKAGE_TYPE=deb
make pack_deb PACKAGE_TYPE=deb
pushd ../out/amd64/
for i in `ls -1 *.deb` ; do dpkg -i $i ; done
Procedure 6. Building the “plugins”
cd ~/openqrm/openqrm-3.1.4/src/
for i in aoe apache bacula emu freebsd linxcoe lvm-mgmt nagios puppet qemu sl-ui solaris-sparc solaris-x86 sshlogin vnclogin vserver webmin webmindhcpd xen ; do cp -aRv ../../../plugins/$i plugins/ ; done
pushd plugins
cd apache
make PACKAGE_TYPE=deb
make install PACKAGE_TYPE=deb
make pack_deb PACKAGE_TYPE=deb
cd ..
And the same sequence for (at least) freebsd, lvm-mgmt, ssh-login, vnclogin, webmin
apt-get install libmysql++-dev
cd bacula && make PACKAGE_TYPE=deb && make install PACKAGE_TYPE=deb && make pack_deb PACKAGE_TYPE=deb && cd ..
![]() | Warning |
|---|---|
Building the Bacula plugin still fails while looking for mysql |
apt-get install libgnutls-dev
cd nagios && make PACKAGE_TYPE=deb && make install PACKAGE_TYPE=deb && make pack_deb PACKAGE_TYPE=deb && cd ..
![]() | Warning |
|---|---|
The Nagios plugin still fails complaining about undefined references to |
apt-get install libssl-dev libx11-dev
cd xen && make PACKAGE_TYPE=deb && make install PACKAGE_TYPE=deb && make pack_deb PACKAGE_TYPE=deb && cd ..
![]() | Warning |
|---|---|
The Xen plugin also failed, with errors in |
Procedure 7. Installing OpenQRM
Now you could install all these packages you find in ~/work/openqrm/base/openqrm-3.1.4/out/amd64/ with dpkg -i packagename, but it's much more elegant to put them in your own repository.
Read the Debian Repository HOWTO on how to do that, then do the apt-get update thing, and when all is set up as you like it, do:
apt-get install openqrm-core-base openqrm-core-upgrade openqrm-extras-local_nfs openqrm-extras-mysql openqrm-plugin-apache openqrm-plugin-dhcpd openqrm-plugin-freebsd openqrm-plugin-ldap openqrm-plugin-lvm-mgmt openqrm-plugin-sshlogin openqrm-plugin-tftpd openqrm-plugin-vnclogin openqrm-plugin-webmin openqrm-plugin-win [3]
apt-get install mysql-server-5.0
Type mysql to open a MySQL session and type: SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED; , then exit.
/etc/init.d/mysql restart
cd /opt/qrm
./qrm-installer
At the “Welcome to OpenQRM” screen, press
Check all plugins, and press
![]() | Warning |
|---|---|
To be honest, I unchecked |
![]() | Warning |
|---|---|
The “DATABASE_SOCK” is the socket to contact the |
Modify the “General setup” to your needs and press . I had to change the “SERVER_INTERFACE” (which is not eth0 on my system).
Also press on the “Component Configuration” for apache, dhcpd, freebsd, ldap, local_nfs, lvm-mgmt, mysql, sshlogin, tftpd, vnclogin, webmin, and win.
Now that the “QRM Configuration Wizard finished succesfully”, press [4]
Press on “Do you want to apply your configuration changes”
Press ENTER as you are on an Open Source license
Press y on whether you “wish to initialize the system entities”
And I suppose you want the latest manual...
Now enjoy a running server!