一、安装环境:
(1)、硬件环境:
RX2600服务器、HP LASERJET5000系列激光打印机、激光打印机内置JETDIRECT600N网卡
(2)软件环境:
HP-UX11i、HP JETDIRECT Printer INSTALLER for Unix(hppi)
二、安装过程:
2.1打印机的配置过程:
为了使用的方便,需要将服务器和激光打印机设置在同一个IP网段。激光打印机的设置的改变可以有几种方式:
(1)、在原来的设置的基础上修改:
可以直接的TELNET X.X.X.X到打印机上,这时候就可以直接地按照提示打”/”来查看当前的打印机配置参数。如果不清楚改变设置的命令的写法,可以打出一个问好,系统就会把打印机的命令都列出来。
也可以直接用浏览器来用网页的方式来浏览打印机的设置。这种方式可以看到系统的各种设置,也容易修改。如打印机的IP为:192.168.0.2,可输入地址:http://192.168.0.2访问打印机的配置主页。
用TELNET的方法很简单,不方便的地方是打印的命令都不能回显,所以很可能输入错误。如果输入错误的内容当退出后就再也连不上打印机,这时就需要采取第二种方法,先将打印机的配置RESET然后再从头操作。
(2)、将打印机的配置复位:
先将打印机的网线拔掉,然后按住打印机面板上的“执行”键,将打印机重新开机,这时打印机的显示为“COLD RESET”,然后松开“执行”键,这时打印机开始初始化。等到打印机出现READY后,打印一张测试页。这时打印机测试页上会有一个初始化后的IP地址,再通过这个IP地址来TELNET执行第一步的操作,改变打印机的IP设置。
在改变打印机的配置以后,会使得以前的局域网中的打印服务器连接不到打印机,因为这时它不能按照原来的IP地址找到打印机。只需要将配置面板中的打印机端口配置改一下对应的IP就可以了。
2.2 软件安装
(1)、下载打印机安装程序:
首先通过HP的网站下载打印机的对应型号的安装软件。
(2)、安装打印程序:
1、以root用户BINARY方式将HP11e134.SD文件FTP到/tmp目录下。
2、在客户端安装NETTERM软件等TELNET工具。并以 root用户登陆服务器。
3、服务器export TERM=vt100。
4、swinstall -s /tmp/HP11e134.SD。
5、选择Hewlett-Packard JetDirect Printer Installer for Unix这一行。
6、在菜单Actions下选择Install。
7、退出swinstall。
在软件安装后,其所在的目录为/opt/hpnpl/admin/,管理程序为hppi。
2.3 打印机配置:
1、运行hppi。
2、在如下的提示后选择1。
1) Spooler Administration (super-user only)
2) JetDirect Configuration (super-user only)
- TCP/IP configurable parameters
3) Diagnostics:
- diagnose printing problems
?) Help q) Quit
Please enter a selection (q - quit):1
3、出现如下的提示后选择1。
Spooler:
1) Add printer to local spooler
2) Delete printer from local spooler
3) Modify existing spooler queue(s)
4) Install New Model Script
5) Remove Model Script
?) Help q) Quit
Please enter selection:1
4、然后出现下面内容提示输入打印机IP:
Spooler:
1) Add printer to local spooler
2) Delete printer from local spooler
3) Modify existing spooler queue(s)
4) Install New Model Script
5) Remove Model Script
?) Help q) Quit
Please enter selection:1
Enter the network printer name or IP address (q - quit):172.28.118.4
5、接着是下面的内容,提示软件支持的打印选项。我们选择第5项。
The following is a list of suggested parameter values for this queue. You may change any settings by selecting the corresponding non-zero numbers.
The values will be used to configure this queue when '0' is selected. To abort the operation, press 'q'.
Configurable Parameters: Current Settings
------------------------ ----------------
1) Lp destination (queue) name: [172_1]
2) Status Log [(No Log)]
3) Queue Class [(Not assigned)]
4) Default Queue [NO]
5) Additional printer configuration...
Select an item for change, or '0' to configure (q - quit):5
6、出现以下的画面。选择第一项。
The following is a list of suggested parameter values for this printer.
To abort this operation, press 'q'.
Configurable Parameters: Current Settings
------------------------ ----------------
1) Model Script: [net_ljx000]
2) Default Printing Language [AUTO]
3) Job Recovery [ON]
4) True End-of-Job [ON]
5) Banner Page [ON]
6) PostScript Level [Level 2]
7) Banner Tray [default]
8) Banner Paper Size [default]
9) Duplex print [default]
Select an item for change, or q when done:1
7、出现以下的画面。
Below is a list of suggested printer model scripts for HP-UX: (Please note that the behavior is inconsistent if you select a modelscript other than the default used by the printer.)
Model Script Printer
------------ -------------------------------------------------
net_ljx000 HP LaserJet 4000/5000/8000/8100 and HP Mopier 320 printers
net_ljcolor HP Color LaserJet 4500/8500 printers
.
.
.
net_genericpcl3printer HP/Non-HP PCL 3 printers (see man page)
net_genericprinter HP/Non-HP printers with print options (see man page)
------------------ -------------------------------------------------
** If you are configuring SharedPrint, type "sp"
Enter model script name (q-quit):PCL5.nloo
上面的输入内容PCL5.nloo并不是以上的选项中的内容。系统的缺省的选项是net_ljx000,但是这个选项下却不能打印汉字。这里应该是一个BUG,而且更有趣的是,输入PCL5.nloo这样的选项软件能够接受,而且能打印汉字。
8、出现下面的选择,输入q退出。
The following is a list of suggested parameter values for this printer.
To abort this operation, press 'q'.
Configurable Parameters: Current Settings
------------------------ ----------------
1) Model Script: [PCL5.nloo]
2) Default Printing Language [N/A]
3) Job Recovery [ON]
4) True End-of-Job [N/A]
5) Banner Page [OFF]
6) PostScript Level [N/A]
7) Banner Tray [default]
8) Banner Paper Size [default]
9) Duplex print [N/A]
Select an item for change, or q when done: q
9、出现以下内容,以提示选择默认值,出现提示时回车继续。
The following is a list of suggested parameter values for this queue. You may change any settings by selecting the corresponding non-zero numbers.
The values will be used to configure this queue when '0' is selected.
To abort the operation, press 'q'.
Configurable Parameters: Current Settings
------------------------ ----------------
1) Lp destination (queue) name: [172_1]
2) Status Log [(No Log)]
3) Queue Class [(Not assigned)]
4) Default Queue [NO]
5) Additional printer configuration...
Select an item for change, or '0' to configure (q - quit):0
10、出现以下界面。172_1就是打印机的代号。
172_1.
Ready to shut down the spooler and configure the new print queue.
The spooler will be running again after the configuration is done.
WARNING: If there are jobs currently being printed, and the page
count is enabled (i.e. when True End-of-Job is turned on), this
shutdown and rerun of the spooler may result in incorrect page count.
OK to continue? (y/n/q, default=y)
11、出现以下画面。
Finished adding "172_1" to the spooler.
******************************************************
*****] ****
**** ] **** JetDirect Printer Installer for UNIX
**** ]]]]] ]]]]] **** Version E.10.34
**** ] ] ] ] ****
**** ] ] ]]]]] **** Spooler Administration
***** ] ****
****** ] **** User: (root) OS: (HP-UX B.11.23)
I N V E N T
*******************************************************
Spooler:
1) Add printer to local spooler
2) Delete printer from local spooler
3) Modify existing spooler queue(s)
4) Install New Model Script
5) Remove Model Script
?) Help q) Quit
Please enter selection:q
12、回到第3步的最初界面。再选择q回到第二步的主界面。选择3。
1) Spooler Administration (super-user only)
2) JetDirect Configuration (super-user only)
- TCP/IP configurable parameters
3) Diagnostics:
- diagnose printing problems
?) Help q) Quit
Please enter a selection (q - quit):3
三、用系统命令测试打印机:
lp -d 172_1 /etc/passwd
这里172_1是打印机安装的代号。/etc/passwd是要打印的文件。
lpstat -t
这里的打印命令以命令行的方式直接在TELNET的窗口中输入运行即可。
四、打印格式控制:
lp命令通过选项来控制打印的格式。HP-UX对打印的控制能力很弱,不能象WINDOWS系统一样进行灵活的格式控制。而且在HP机器上设置打印机的情况也不多,所以HP-UX的打印程序也不成熟。缺省的纸张是A4页面。以下是针对/home2/hqmg/spool的文件的格式进行打印的几个尝试选项作为参考。
基本命令格式:
lp -c -d172_1 -olandscape -ozh_CN.gb18030 -ofs -or8 -o12 -olpi12 -otl66 -onb /home7/tmp/fmgp0700716192125
1、-d172_1:指定打印机代号为172_1。
2、-olandscape指定打印为landscape(纵向打印)方式。
3、-ozh_CN.gb18030指定使用zh_CN.gb18030字库。
4、-onb确定不打印信息页面。
5、/home7/tmp/fmgp0700716192125为打印目标文件。
一个控制格式很好的格式是在一张A4纸张上打印两页,命令格式如下,其中的-o2选项就是指在一面纸张上打印两面。这个打印质量相当不错。
lp -c -o2 -d172_1 -olandscape -ozh_CN.gb18030 -ofs -or8 -o12 -olpi12 -otl66 -onb /home7/tmp/fmgp0700716192125