歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> RHEL5下安裝純文本打印機試驗步驟記

RHEL5下安裝純文本打印機試驗步驟記

日期:2017/2/28 17:01:37   编辑:Linux教程

Red Hat Enterprise Linux采用通用UNIX打印系統(CUPS), 最新的RHEL5中已經取消printconf-tui配置工具。要獲得簡單快捷的打印機配置,可以采用圖形化工具system-config-printer,或者使用用CUPS的web接口http://localhost:631/來完成。

檢查一下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服務後,直接訪問http://localhost:631即可,通過對cups.conf進行相關設置,就可以限制網絡上其它機器對本機631端口的訪問控制,與httpd.conf極為相似。

Copyright © Linux教程網 All Rights Reserved