LPRng Build Notes $Id: LPRng.txt,v 1.1 2004/01/22 19:27:41 jmates Exp $ DESCRIPTION Covers LPRng version 3.6.26. LPRng is an advanced printing software solution intended to replace legacy BSD and SYSV print queuing systems. Use of LPRng may require the installation of several other companion utilities, such as the ifhp filters package, GhostScript, text2ps, psutils, file, and more, depending on the environment you are trying to support. Details on building these other packages will not be found in this document. INSTALLATION 1) Obtain and unpack the source code for LPRng from lprng.com: $ lwp-download ftp://ftp.lprng.com/pub/LPRng/LPRng/LPRng-stable.tgz Alternatively, RPM's for i386 and source builds are available, and would speed up the installation process of a generic client/server. $ tar xvzf LPRng-stable.tgz Unless you don't have a recent GNU tar, in which case: $ gunzip -c LPRng-stable.tgz | tar xvf - 2) Build the software: You may have to run certain commands first to remove the legacy printing system, especially on Solaris systems. See the LPRng-HOWTO documentation section 2.10.2 for more details on this. To build a genric client/server for a machine, use the following configure command: $ ./configure --prefix=/usr --sysconfdir=/etc If you are building a lightweight client system that will host no local queues and instead send all the jobs to a remote print server, run the following instead: $ ./configure --prefix=/usr --sysconfdir=/etc --disable-force_localhost Use the --help option to configure for more options, or read the LPRng-HOWTO document on other ways to configure LPRng, such as changing the uid/gid it runs as, and moving the server to a higher custom port to be able to install the binaries without the SUID bit set (which breaks compatibility with older/other LPR software, and pretty much forces you to run LPRng everywhere). Next, the usual make && make install bit: $ make $ su # make install 3) Post install fiddling. Assuming your system is properly supported by LPRng, the old lp printing system will be properly replaced (unless it wasn't installed under the /usr prefix to begin with!) and the system startup scripts should be altered to start LPRng. You should insure that LPRng is the only printing system by poking around in the various binary directories, and checking that it will startup properly by examining the init.d or rc.local files, depending on your system. If LPRng is installed and running properly, you should see something like the following running: # ps auwx | grep lp daemon 20457 0.0 0.8 2788 940 ? S 11:21 0:00 lpd Waiting The LPRng-HOWTO has more details on how to properly replace various default queuing systems. 4) Print Client Configuration LPRng supports "dumb" clients, where a lpd process does not need to be running on each client system. On client systems, lpd should be turned off, and measures should be taken to ensure it does not start up at boot. For example, under Solaris: # /etc/init.d/lprng stop # cd /etc/init.d # mv lprng lprng.dis Then, assuming default /etc/lpd.conf and /etc/lpd.perms files exist (lpr wants these to exist before it will happily print), users on the client can print without a printcap by invoking lpr with the remote queue notation to the print server print.example.edu: $ lpr -Plp@print.example.edu foo.ps To set a default printer, the PRINTER environment variable can be set: $ export PRINTER=lp@print.example.edu $ lpr foo.ps However, user's may not like having to specify @print after all the -P options on the command line, in which case a lightweight client /etc/printcap file should do the trick: lp: :client :mx=0:sh:force_localhost@ :lp=lp@print.example.edu Note the lack of any spool directory on the client. The force_localhost@ option disables the LPRng default of looking for a localhost lpd daemon. force_localhost@ is not needed if the client LPRng system was compiled with the disable-force_localhost option at configure time. Also, if any queue names are changed during the upgrade from legacy printing systems to LPRng, be sure to inform users that they may need to change what their PRINTER environment variable is set to! 5) Print Server Configuration LPRng has more configuration files than a stock lpd does, mainly becuase it supports more features. First off, you should move aside any /etc/hosts.lpd file; it may conflict with LPRng's much more featurefull /etc/lpd.perms file. Then, remove all the old queues (e.g. from under /var/spool/lpd), and move aside the old /etc/printcap file, and replace it with something better that supports the various features offered by LPRng. For example, in conjunction with the ifhp package, a HP Color LaserJet 4500 is quite easy to properly support: color: :client :mx=0:sh :lp=color@localhost color: :server :lpd_bounce :if=/usr/libexec/filters/ifhp :sd=/var/spool/lpd/%P :lf=/var/spool/lpd/%P/log :af=/var/spool/lpd/%P/acct :ifhp=model=hp4500 :lp=raw@hp4500-office.example.edu A client queue is also included, but would not be neccessary if you setup "black box" print servers which only accept remote jobs and in general do not have any printing users on them. After changing the /etc/printcap file, you can force lpd to reread the configuration by issuing: # lpc reread As a user authorized to run that command according to the /etc/lpd.perms file, typically root by default. A LPRng utility 'checkpc' makes it easy to check and apply the current printcap configuration to the spool directories needed to properly support the printer: # checkpc Should list all sorts of problems, depending on the state of your printer spool directory, while the following will verbosely try to fix and problems it finds: # checkpc -f -V The -f fix option is good for initial setup on a new print server, where you simply import a canned printcap file, clear out the old spool directory, and run checkpc to create the spool directories for you with the proper permissions. RESOURCES Much more information is contained in the LPRng-HOWTO docuement, as well as the ifhp-HOWTO, or the O'Reilly printing book: http://www.lprng.com/ http://www.lprng.com/LPRng-HOWTO.html http://www.oreilly.com/catalog/netprint/ There is also a LPRng mailing list: And a clicky setup tool that I have yet to investigate: http://www.uslinux.net/software/lprngtool/ NOTES LPRng requires the use of GNU make to properly install; otherwise, various make steps will fail in strange and unusual fashions. Therefore, on a Digital Unix machine with a bad gcc compiler, you will have to configure for the native CC: $ export PATH=/usr/bin:$PATH $ CC=cc ./configure --args... And then make sure that GNU make is invoked for the subsequent make steps: $ /usr/local/bin/make $ su # /usr/local/bin/make install The PATH is altered to make sure that the various compatible accessories to the native cc (e.g. ld, ranlib) are called instead of the GNU ones under /usr/local/bin. PORTS LPRng compiled on the following platforms: Digital Unix 5.0 Linux PPC 2000 (RedHat Linux 6) (via source RPM) OpenBSD 2.7, 2.8 (via packages system) Solaris 2.6 CHANGE LOG $Log: LPRng.txt,v $ Revision 1.1 2004/01/22 19:27:41 jmates Sync from subversion sandbox into prior CVS repository for website. Revision 1.1 2001/11/06 17:56:06 jmates Import of old talk on LPRng and similar. Revision 1.7 2000/12/14 19:51:03 jmates Added documentation on how to easily get /etc/printcap reread on the server side. Revision 1.6 2000/12/11 20:46:01 jmates Sucessful install on Solaris system. Revision 1.5 2000/12/11 20:45:03 jmates Client lpd disabling notes for Solaris. Revision 1.4 2000/12/11 20:07:50 jmates More prominent warning about replacing default queuing system. Better formatting in client configuration section. Revision 1.3 2000/12/11 19:27:32 jmates Documented force_localhost@ option for clients, which is necessary when dealing with stock LPRng installs from RPM. Tweaks and improvements. Revision 1.2 2000/12/07 18:36:58 jmates Major hackings to a working document. Revision 1.1 2000/12/06 22:07:11 jmates Initial import from template.