You can download OpenQM directly from here: http://www.geneb.org/qm/qmsrc_2-6-6.tgz 1. Make a directory to work in: mkdir qmwork 2. Unpack the qmsrc_2-n-n.tgz file into your work directory: cd qmwork tar xvfz ../qmsrc_2-n-n-tgz 3. Change to the newly created "qm.gplsys" directory cd qm.gplsys 4. You need to make a small change to the build script that compiles OpenQM. As shipped it uses the -Werror compiler directive that forces the compiler to treat warnings as errors. Since the warnings issued during compilation are non-fatal, it's ok to turn them off. The old line looks like this: QM_GCC_OPTIONS="-Wall -Werror -DLINUX -D_FILE_OFFSET_BITS=64 -DGPL -g" The new line should look like this: QM_GCC_OPTIONS="-Wall -DLINUX -D_FILE_OFFSET_BITS=64 -DGPL -g" Edit the "buildgpl" file with your favorite editor and make the change. 5. Compile OpenQM! ./buildgpl 6. When the compile is complete, you need to create a special user and group that will "own" the OpenQM installation. sudo /usr/sbin/useradd qmsys sudo /usr/sbin/groupadd qmusers Any of the people that will be using OpenQM through an interactive shell (where OpenQM doesn't control the login process) will need to be part of the group "qmusers" for things to work properly. You can do this with the usermod command: sudo /usr/sbin/usermod -a -G qmusers Make sure that you don't forget to add root as well! sudo /usr/sbin/usermod -a -G qmusers root This will help prevent the dreaded "00000A9B: Error -3018 deleting record in $LOGIN" error. 7. Now you need to move your installation to it's permament home. change to the top of your temp directory - when you do "ls -l" it should look something like this: [geneb@qm qmwork]$ ls -l total 4 drwxr-xr-x 32 geneb geneb 4096 2008-11-05 15:16 gpl.qmsys [geneb@qm qmwork]$ Now move it to its new home: sudo mv gpl.qmsys /usr/qmsys 8. Next, you need to change the ownership and permissions of /usr/qmsys and the files underneath it. cd /usr sudo chgrp -R qmusers qmsys sudo chmod -R 775 qmsys sudo chown -R qmsys qmsys chgrp changes the group for the qmsys directory to "qmusers" and -R ensures that this change will happen recursively to all files and directories that lie under /usr/qmsys. chmod -R recursively changes the permissions of qmsys and everything below it so that the owner and group has read/write/execute permissions and "everyone" has read/execute permissions. chown -R recursively changes the ownership of qmsys and everything below it to the "qmsys" user you created earlier. 9. Next, we need to create a simple configuration file for OpenQM in /etc: In your favorite editor create "qmconfig" in the /etc directory and add the following to it: [qm] QMSYS=/usr/qmsys NUMUSERS=16 ...and save it. Note that NUMUSERS can be set to any figure you need it to be. 10. Now let's create a "home" directory where all your accounts and data can live. For this example, we'll put it in the /home subdirectory. cd /home sudo mkdir qm sudo chgrp qmusers qm sudo chmod g+s qm The above makes the new directory and changes it's group to qmusers. The chmod command ensures that any new files created under /home/qm are of the group "qmusers". That's the basics of getting OpenQM up and running on a typical Fedora or RedHat system. There are two more steps you can take if you would like to allow OpenQM to directly handle inbound telnet sessions or if you've got software that utilizes QMClient to talk with OpenQM. The first thing you should do is make sure you've got xinetd installed on your system. The simplest way to do this is: sudo yum install xinetd If you've already got it installed, you'll be told. If not, the system will install it for you. For setting up direct telnet access to OpenQM, you'll need to create a configuration file that xinetd can use to process the incoming connection. Crank up your favorite editor and create a file called "qmsrvr" in /etc/xinetd.d and paste the following in to it: service qmsrvr { id = qmsrvr4242 type = UNLISTED port = 4242 bind = protocol = tcp flags = REUSE socket_type = stream wait = no groups = yes user = root group = qmusers umask = 002 server = /usr/qmsys/bin/qm server_args = -n log_on_failure += USERID disable = NO } If you want OpenQM to accept connections on the traditional telnet port, change the port parameter above from 4242 to 23. If you'd also like to support access from QMClient, create a file in /etc/xinetd.d called "qmclient" and add the below to it: service qmclient { id = qmclient4243 type = UNLISTED port = 4243 bind = protocol = tcp flags = REUSE socket_type = stream wait = no groups = yes user = root group = qmusers umask = 002 server = /usr/qmsys/bin/qm server_args = -n -q log_on_failure += USERID disable = NO } If you'd like OpenQM network activity to show up by name in programs like netstat, you can add the following two entries to your /etc/services file: qmsrvr 4242/tcp #QMSrvr qmclient 4243/tcp #QMClient The last thing you may want to do is set up OpenQM so that it can be started up at boot time. To do this, you'll need to create a file called "qm" in the /etc/init.d directory and put the following in it: #! /bin/sh # # Provides: OpenQM # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 # Short-Description: Init script for OpenQM # Description: Starts & stops OpenQM at startup/shutdown PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/qmsys/bin DESC="OpenQM Database" NAME=qm DAEMON=/usr/qmsys/bin/qmlnxd PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME [ -x "$DAEMON" ] || exit 0 case "$1" in start) echo "Starting OpenQM database." >&2 qm -start -quiet ;; stop) echo "Stopping OpenQM database." >&2 qm -stop -quiet ;; restart|force-reload) echo "Restarting OpenQM database." >&2 qm -restart -quiet ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 exit 3 ;; esac You'll then need to make this file executable: sudo chmod +x /etc/init.d/qm Once this file is in place, you can start, stop or restart OpenQM by using the "service" utility: /sbin/service qm start -or- /sbin/service qm stop To ensure that OpenQM will start on boot, enter the following: /sbin/chkconfig --add qm That's it! If you have any questions, problems, suggestions or corrections, please feel free to email me at geneb@deltasoft.com. -gwb 06Nov08