 |
» |
|
|
 |
This section deals with configuring printers according to
two methods: the traditional UNIX LP spooler and the HP Distributed
Print Server (HPDPS). For conceptual information about print-management topics,
see “Planning your Printer
Configuration”. For procedures on maintaining your printer environment, see “Managing Printers”. Configuring
Printers to Use the LP Spooler |  |
This section provides information on performing the following procedures: Initializing the LP Spooler Before you can use the LP spooler, you must initialize it. Using SAMIf you use SAM
to add a printer, SAM will prompt you to initialize the LP spooler. Using HP-UX CommandsYou can use HP-UX commands to initialize the LP spooler by
following these steps: Adding a Local Printer to the LP Spooler  |  |  |  |  | NOTE: Do not confuse adding a printer to the LP spooler with
adding a printer to your system: adding a printer to the LP spooler
involves configuring the LP spooler, whereas adding a printer to
your system involves connecting the printer to your computer and
configuring the needed drivers in the kernel. For information on
the latter, refer to Configuring HP-UX for Peripherals. |  |  |  |  |
Using SAMThe easiest way to add a local printer to the LP spooler is
to run SAM. SAM will also do some of the CDE configuration (if CDE
is being used) and some of the SharedPrint configuration (if you
are using a SharedPrint printer model). Using HP-UX CommandsEnsure that you have superuser capabilities. Stop
the LP spooler: For more information, see “Stopping and Restarting the LP Spooler ”. Add
the printer to the LP spooler. For example: /usr/sbin/lpadmin -plocal_printer -v/dev/lp -mHP_model -g7 |
See lpadmin(1M) for
details on the options. See “Printer
Model Files” for choices for the -m option. If the printer being added will be the default printer,
execute the following: /usr/sbin/lpadmin -dlocal_printer Allow
print requests to be accepted for the newly added printer. For example: /usr/sbin/accept local_printer See “Controlling the Flow of Print Requests” for
information on accept. Enable the newly added printer to process print requests.
For example: /usr/bin/enable local_printer |
See “Enabling or Disabling a Printer” for
details. Restart
the LP spooler: Test the printer using the LP spooler, then check the
LP spooler’s status. For example: lp -dlocal_printer /etc/passwd lpstat -t |
Adding
a Remote Printer to the LP Spooler To familiarize
yourself with remote spooling concepts, see “Remote Spooling”. The easiest way to add a printer to a remote system is to
run SAM. If you elect to use HP-UX commands, review the SAM procedure,
Step 4, as this information will also be required when performing
the task manually. Using SAM |  |  |  |  | NOTE: SAM does not verify that an actual printer exists on
a remote system. Be sure the printer is installed and configured,
and if necessary, use SAM to configure it on the remote system before
adding it as a remote printer. |  |  |  |  |
Invoke SAM, as superuser. Select Printers and Plotters. From the Action pulldown menu, choose Add Remote Printer/Plotter. Provide information for the following data fields: Whether Remote Printer is on a BSD system Whether to Allow Anyone to Cancel a Request Whether to Make this Printer the Default Destination
When all fields are filled in, select OK. SAM returns with troubleshooting information,
in case configuration was unsuccessful. Most likely problems will
be related to the remote system configuration. Check as follows: Edit /etc/services (on remote system), and if necessary, uncomment the
line beginning with printer by removing the #. Ensure no systems are restricted from access by /var/adm/inetd.sec. Make sure rlpdaemon is running.
Using HP-UX CommandsEnsure that you have superuser capabilities. Stop
the LP spooler: For more information, see “Stopping and Restarting the LP Spooler ”. Add
the remote printer. If the remote printer is on an HP-UX
system, enter: lpadmin -plocal_printer -v /dev/null -mrmodel \ -ormremote_machine -orpremote_dest -ocmrcmodel \ -osmrsmodel If the remote printer is not on an HP-UX system, enter: lpadmin -plocal_printer -v /dev/null -mrmodel \ -ormremote_machine -orpremote_dest -ocmrcmodel \ -osmrsmodel -ob3
See lpadmin(1M) for
details on the options. Also see “Printer
Model Files” for information to provide to the -m option. Allow print requests to be accepted for the newly added
remote printer. For example: /usr/sbin/accept local_printer If the printer being added will be the default printer,
execute the following: /usr/sbin/lpadmin -dlocal_printer Enable the newly added printer to process print requests.
For example: /usr/bin/enable local_printer Restart the LP spooler to process print requests. /usr/sbin/lpsched Send a sample print job
to the printer. If it prints, the remote printing
daemon (rlpdaemon) is active on the system and your task is completed. If your print job does not print, the remote printing
daemon (rlpdaemon) is not active yet on the remote machine. Activate the rlpdaemon on the host system where the remote printer resides,
as follows in the next step.
Examine the file /etc/inetd.conf and look for the following line: # printer stream tcp nowait root /usr/sbin/rlpdaemon rlpdaemon -i If a # sign appears at the beginning of the line, the rlpdaemon line is commented out, preventing the printer from printing
remotely. Edit the file /etc/inetd.conf to remove the # sign. Save the file. Check /etc/services and look for: # printer 515/tcp spooler #remote print spooling |
If a # sign appears at the beginning of the line, the
service is commented out, preventing the remote print spooler from
serving the printer. Edit the file to remove the # sign in the first column. Save the file. Reconfigure
the Internet daemon inetd, forcing it to reread the /etc/inetd.conf file. Invoke the following command: Also,
check entries in /var/adm/inetd.sec that restrict which systems can send remote print requests. Test the printer using the LP spooler, then check the
LP spooler’s status. For example: lp -dlocal_printer /etc/passwd lpstat -t |
Adding a Network-Based PrinterUsing SAMYou can use SAM to add a network-based printer that uses the
HP JetDirect Network Interface. The HP JetDirect software must be installed
on your system and you must be prepared to provide SAM with the
following: the printer’s node name (the
name associated with an Internet address) the local name that the LP spooler will use to refer
to the printer.
With HP JetDirect, printers can connect directly to the network.
The printer uses a LAN connection and the HP JetDirect software
transmits prints requests. For more information, see HP
JetDirect Network Interface Configuration Guide. Using HP-UX CommandsIf you do not use SAM, follow the instructions shipped with
your printer or the network interface card for the printer. For conceptual information,
read “Printer
Class”. You can use SAM to add a printer to a printer class when the
printer is being added to the spooler; otherwise, you must use HP-UX
commands. To use HP-UX commands, follow these steps after several
printers have been added to the LP spooler: Ensure that you have superuser capabilities. Stop the LP spooler: For more information, see “Stopping and Restarting the LP Spooler ”. Create the printer class, specifying the printer you
want to add to the class of printers. For example, to add a printer named laser1 to the class of printers named laser, enter: /usr/sbin/lpadmin -plaser1 -claser |
Only one printer can be added to a class at a time. If you
have more than one printer to add, repeat this command. Allow print requests to be accepted for the newly added
printer class. For example: Restart the LP spooler: /usr/sbin/lpsched
Removing
a Printer from the LP SpoolerUsing SAMInvoke
SAM as superuser. Select Printers and Plotters. Highlight the printer or plotter you are removing. From the Actions pull-down menu,
choose Remove ...
 |  |  |  |  | NOTE: SAM asks for confirmation before removing the printer
from the LP spooler. If print jobs remain in the printer’s
queue or if the printer is the system default destination, SAM notifies
you. If you choose to remove a printer with jobs in its queue, SAM
cancels them. |  |  |  |  |
Using HP-UX commandsEnsure that you have superuser capabilities. (Optional): Notify users that you are removing the printer
from the system. Remove the printer from the configuration file of any
software application through which the device is accessed. (Refer
to the documentation accompanying the software application for instructions.) Stop the LP spooler: For more information, see “Stopping and Restarting the LP Spooler ”. (Optional): Deny any further print requests for the
printer. For example: /usr/sbin/reject -r"Use alternate printer." laser1 |
By doing this step, you can be assured that no new jobs will
appear before you remove the printer. Users will see the message “Use alternate printer” when they direct requests to a rejected
destination if the printer has not been removed. Once the printer
has been removed and users try to send a request, they will see
the message “Destination printer_name non-existent”. See “Controlling the Flow of Print Requests”. (Optional): Determine if there are any jobs in the printer’s
queue. For example: /usr/bin/lpstat -o laser1 (Optional):
Disable the printer to be removed. For example: /usr/bin/disable -r"Printer laser1 is disabled." laser1 You would issue the above disable command if there are jobs in the printer’s queue
and you do not want to wait for them to print before removing the
printer. Issuing the disable command shuts the printer down in an orderly manner. For more information, see “Enabling or Disabling a Printer”. Note that you can also specify the -c option
to the disable command to cancel all print requests for the printer. (Optional): If there are no jobs in the printer’s
queue, go on to Step 9. If there are jobs, decide whether to move
all pending print requests in the request directory to another printer
request directory or to cancel any requests. For example, to move
print requests: /usr/sbin/lpmove laser1 laser2 To cancel any requests: /usr/bin/cancel laser1 Remove
the printer from the LP spooler. For example: /usr/sbin/lpadmin -xlaser1 Restart the LP spooler: /usr/sbin/lpsched See lpshut(1M), lpadmin(1M), and lpsched(1M) for details on the command
options.
Removing a Printer from a Printer ClassRead “Printer
Class” to familiarize yourself
with this concept.  |  |  |  |  | NOTE: You cannot use SAM to remove a printer from a class. |  |  |  |  |
Using HP-UX commandsEnsure that you have superuser capabilities. Stop the LP spooler: /usr/sbin/lpshut For more information, see “Stopping and Restarting the LP Spooler ”. Remove
the printer from the class. For example: /usr/sbin/lpadmin -plaser1 -rclass Restart the LP spooler: /usr/sbin/lpsched
See lpshut(1M), lpadmin(1M), and lpsched(1M) for details on the command
options.
See “Printer
Class” to familiarize yourself with
this concept.  |  |  |  |  | NOTE: You cannot use SAM to remove a printer class. |  |  |  |  |
Using HP-UX commandsEnsure that you have superuser capabilities. Stop the LP spooler: /usr/sbin/lpshut For more information, see “Stopping and Restarting the LP Spooler ”. (Optional):
Deny any further print requests for the printer. For example: /usr/sbin/reject -r"Use alternate printer." laser1 (Optional): Determine if there are any jobs in the printer’s
queue. For example: /usr/bin/lpstat -o laser1 (Optional):
Move all pending print requests in the request directory for the
printer class to another printer or printer class. For example: /usr/sbin/lpmove laser1 laser2 Remove
the printer class. For example: /usr/sbin/lpadmin -xlaser Restart the LP spooler: /usr/sbin/lpsched See lpshut(1M), reject(1M), lpmove(1M), lpadmin(1M), and lpsched(1M) for details on the command
options.
 |  |  |  |  | NOTE: When you remove a printer class, the printers in the
class are not removed — you may still use them as individual
printers. If you remove all printers from a class, that printer
class is automatically removed. |  |  |  |  |
Configuring
Printers to Use HPDPS |  |
 |  |  |  |  | IMPORTANT: HPDPS is not supported on versions of HP-UX after
HP-UX 11i Version 1.0. |  |  |  |  |
This
section gives the following procedures for setting up and activating the
HP Distributed Print Services: For conceptual information about HPDPS, read “HP
Distributed Print Service (HPDPS)”. Install the requisite file sets, using swinstall. For more information, see “Determining
Filesets to Install and Where to Install Them”.  |  |  |  |  | NOTE: If you plan to use SAM to implement and administer HPDPS,
be sure to install an HPDPS client on the system from which you
will be running SAM. |  |  |  |  |
The easiest way to implement HPDPS is to use SAM to
create the HPDPS objects. Here is how to do so for an HPDPS Basic
Environment on a system for which the LP Spooler is already configured: As superuser, execute sam. Select Printers and Plotters. You
will see two choices HP Distributed Print Services and LP
Spooler. Before entering the HP Distributed Print Services area, select LP Spooler. Record information about the existing configuration
that you will need to provide it to HPDPS: Types of connection (local, network, or remote)
and any pertinent additional information, such as IP address Host system to which printer is configured
Go up to the previous SAM level, and then select HP Distributed Print Services to create HPDPS objects. You can add the HPDPS objects in any order. SAM will prompt
you until you have added all the components you need for a Basic Environment.
(This procedure documents one order, but not the only order.) To create HPDPS objects, select the Physical Printers icon. Once the screen changes to the Physical
Printers area, pull down the Actions menu to choose the kind of physical printer (for
example, an HP-UX LP printer) to add. SAM responds with a dialogue
box to add access to an HP-UX LP Spooler Printer by asking for the
following information: Location of HPDPS printer, supervisor,
and supervisor host LP destination, LP spooler host, and IP address,
to record where the HPDPS physical printer will send its print jobs If an HPDPS supervisor does not exist yet on your system,
SAM prompts you through a dialogue box to create one. If one does exist
on the system, SAM displays its information.
When you enter OK, SAM displays another dialogue box for more information
about the physical printer itself: Print queue If a print queue exists, SAM displays the print queue information; else,
SAM prompts you for print queue name, spooler, and spooler host.
You can also set job scheduling method (to priority-fifo or fifo) by choosing print queue options.
When you enter OK, if no Logical Printer object exists on your system, SAM
prompts you to create it with another dialogue box. Alternatively,
you can select Logical Printers from the List pull-down menu. Then, from the Actions pull-down menu, choose Add a Logical Printer. SAM prompts you for Logical Printer name, print
queue, and displays information about the print queue, including
spooler, spooler host, and physical printer(s). As you create the HPDPS objects (physical printer, logical
printer, print queue, spooler, and supervisor), SAM report the results
and prompts you to continue creating the objects until you have
created a minimal set. Exit SAM. To use HPDPS, you have to activate the spooler and supervisor daemons.
The simplest way to do so is to execute the following HP-UX commands: /opt/pd/bin/pdstartspl /opt/pd/bin/pdstartsuv
Verify your HPDPS configuration by sending a file to
an HPDPS-configured logical printer. For example, pdpr -p Logical1 /etc/passwd
Automatically
Starting HPDPSOnce you have implemented HPDPS on your system(s), you will
want to edit the start-up configuration file, /etc/rc.config.d/pd, to start the HPDPS daemons at system boot-up. For detailed information on doing so, see “Automatically
Starting HPDPS,” in Chapter 4 of the HP Distributed
Print Service Administration Guide. Modifying
Users’ Environments to Use HPDPSEnabling
Users to Access HPDPS PrintersDuring the installation process, HPDPS adds /opt/pd/bin to the HP-UX PATH environment variable.
For users to access HPDPS commands, they should have the same path
set in their environment. You (or your users) can add the path to the HPDPS executables
to their /etc/PATH file by issuing the following at prompt: PATH=$PATH:/opt/pd/bin Defining
a Default Logical PrinterFor users’ ease of use, set the PDPRINTER environment
variable to designate a default logical printer. For example, to set the value of PDPRINTER to laserjet1,
edit the systemwide /etc/profile file and add the line: export PRPRINTER=laserjet1 Users can also add the same line to their .profile files to set a default logical printer.
|