Red Hat Enterprise Linux采用通用UNIX打印系統(tǒng)(CUPS), 的RHEL5中已經(jīng)取消printconf-tui配置工具。要獲得簡單快捷的打印機(jī)配置,可以采用圖形化工具system-config-printer,或者使用用CUPS的web接口http://localhost:631/來完成。
檢查一下CUPS 運(yùn)行所需要的軟件包:
引用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服務(wù),并設(shè)置其為自啟動
引用
bash-3.1# service cups start
bash-3.1# chkconfig cups on
現(xiàn)在就可以在Gnome桌面下配置打印機(jī)了,從System->Administration->Printing運(yùn)行圖形配置界面,也可以直接在xterm運(yùn)行system-config-printer
新版本的 CUPS默認(rèn)設(shè)置不包括添加純文本打印機(jī),如果強(qiáng)制添加,會收到"client-error-not possible"錯誤,參考Cups官方的 Article,需要在/etc/cups/cups.conf中添加一行
引用FileDevice yes
然后重新啟動 cups服務(wù)
引用service cups restart
現(xiàn)在就可以使用"New Printer"添加打印機(jī)了,在選擇接口的時候使用"Other"一項(xiàng),在"Enter Device URI"處填入file:/root/printer,這樣我們的打印結(jié)果就在/root/printer文件中
選擇打印機(jī)廠商的時候,使用"Generic"這一項(xiàng),單擊"Forward","Models"一項(xiàng)選擇"text-only printer"即可,下方顯示的"Drivers"即為texonly.ppd,繼續(xù)"Forward","Apply"
回到主界面將剛才添加的打印機(jī)設(shè)置為默認(rèn)"Make Default Printer"
現(xiàn)在就可以使用打印機(jī)了,測試一下:
引用bash-3.1# lpr /usr/share/doc/grep-2.5.1/README
bash-3.1# less /root/printer
執(zhí)行以上命令將會看到README的內(nèi)容已經(jīng)被打印到printer。
RHEL5 Cups服務(wù)還提供web方式配置打印機(jī),在啟動cups服務(wù)后,直接訪問http://localhost:631即可,通過對cups.conf進(jìn)行相關(guān)設(shè)置,就可以限制網(wǎng)絡(luò)上其它機(jī)器對本機(jī)631端口的訪問控制,與httpd.conf極為相似。
在RHEL5系統(tǒng)下安裝純文本打印機(jī)試驗(yàn)方法
更新時間: 2008-06-17 13:17:38來源: 粵嵌教育瀏覽量:1010