Chinaunix首页 | 论坛 | 博客
  • 博客访问: 101938829
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-05-20 13:19:55

Red Hat Enterprise Linux采用通用UNIX打印系统(CUPS), 最新的RHEL5中已经取消printconf-tui配置工具。要获得简单快捷的打印机配置,可以采用图形化工具system-config-printer,或者使用用CUPS的web接口来完成。

检查一下CUPS 运行所需要的软件包:
引用
bash-3.1# rpm -qa| grep cups
cups-1.2.4-11.5.3.el5
cups-devel-1.2.4-11.5.el5
hal-cups-utils-0.6.2-5
libgnomecups-0.2.2-8
cups-lpd-1.2.4-11.5.el5
cups-libs-1.2.4-11.5.3.el5

安装图形化配置工具system-config-printer(需要提前做好yum源)
引用
bash-3.1# yum install system-config-printer -y

启动cups服务,并设置其为自启动
引用

bash-3.1# service cups start
bash-3.1# chkconfig cups on

现在就可以在Gnome桌面下配置打印机了,从System->Administration->Printing运行图形配置界面,也可以直接在xterm运行system-config-printer
新版本的 CUPS默认设置不包括添加纯文本打印机,如果强制添加,会收到"client-error-not possible"错误,参考Cups官方的 Article,需要在/etc/cups/cups.conf中添加一行
引用
FileDevice yes

然后重新启动 cups服务
引用
service cups restart

现在就可以使用"New Printer"添加打印机了,在选择接口的时候使用"Other"一项,在"Enter Device URI"处填入file:/root/printer,这样我们的打印结果就在/root/printer文件中


选择打印机厂商的时候,使用"Generic"这一项,单击"Forward","Models"一项选择"text-only printer"即可,下方显示的"Drivers"即为texonly.ppd,继续"Forward","Apply"
 


回到主界面将刚才添加的打印机设置为默认"Make Default Printer"

现在就可以使用打印机了,测试一下:
引用
bash-3.1# lpr /usr/share/doc/grep-2.5.1/README
bash-3.1# less /root/printer

执行以上命令将会看到README的内容已经被打印到printer。

RHEL5 Cups服务还提供web方式配置打印机,在启动cups服务后,直接访问即可,通过对cups.conf进行相关设置,就可以限制网络上其它机器对本机631端口的访问控制,与httpd.conf极为相似。
阅读(252) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~